Forums / Cotonti / Core Labs / Archive / Plugin.php HEADER/FOOTER Generation

Orkan
#491 2008-08-16 04:48
Well, I will have to look closer at this whole modules idea - its not clear for me atm.
Do I need modules for simple AJAX calls in my plugins?
define('SED_NOGZIP', true);
require_once('./system/common.php');
ok, but where to define this?

I had thought about something similar to plug.php?r=myplugin with two differences.
1. It'll pick php files from /plugins/ajax dir instead (or better /plugins/myplugin/ajax/ - for better integrity)
2. An additional param in URL will tell the system where to leave common.php and go to your plugin code.

Example of URL's with additional param 'c':

a) $.get("plug.php?x=myplugin&c=short" ... only basic DB support (good for RSS feeds, etc...)
b) $.get("plug.php?x=myplugin&c=medium" ... DB + auth
c) $.get("plug.php?x=myplugin" ... similar to: plug.php?r=myplugin

Its rough but I hope you'll get the idea
Perl - the only language that looks the same before and after RSA encryption.