Skip to main content Help Control Panel

Login   A+   A-

Community «   Discussion forum «   Post your requirements here «  

Can we run PHP scripts etc inside YACS

avatarBoen, Jan -- on Aug. 24 2006
We would like to manipulate a MySQL database from within YACS (i.e. do more than doing the SELECT thing and build a table).
Can we execute more complex code and show it while staying inside YACS (skins, menus,...)?

Thanks in advance


Jan
Bernard
avatar
from nearby-an-airport
Associate, 6674 posts

on Aug. 26 2006


Yes, with the help of some PHP scripts to interface with the MySQL database.

YACS offers three different levels of Application Programming Interface (API) where such scripts can be triggered:
  • hooks - code invoked on event (e.g., 'finalize' at the end of each page, etc.)
  • overlay - for structured data added to articles
  • behaviors - code, specific to some sections, invoked on event (under development)


On top of these, you can also change template files to add extra or navigation boxes to specific pages if you like.
Jan B
avatar
85 posts

inspired from Bernard on Aug. 28 2006


Bernard: Can you give me some examples or places where I can find some more information?
Bernard
avatar
from nearby-an-airport
Associate, 6674 posts

inspired from Jan B on Aug. 28 2006


Jan B: For hooks, read the script control/scan.php. For overlays, everything is in the overlays directory, including the overlays/overlay.php interface. For skins, look in the skins directory, then check some reference template, and the generic skins/page.php script. Examples of MySQL queries can be found in articles/articles.php.

Rate this page
Posted by Jan B on Aug. 24 2006, commented by Bernard on Aug. 24 2006, (popular)