cotonti.com : Plugin.php HEADER/FOOTER Generation https://www.cotonti.com Neueste Themenbeiträge Cotonti en Fri, 19 Dec 2025 16:33:20 -0000 Trustmaster Sa, 16 Aug 2008 05:36:27 -0000 Orkan 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]]>
Sa, 16 Aug 2008 04:48:42 -0000
Trustmaster Coding Guide. This feature actually existed for ages in Seditio and Asmo can show you an example how to create top-level modules for Seditio, we just need to make it more coder and user friendly.

As for gzhandler, could define some constant in the beginning of main file and check it in common.php:
define('SED_NOGZIP', true);
require_once('./system/common.php');
in common.php:
if(!defined('SED_NOGZIP'))
{
// Switch gzip on, etc.
}
]]>
Fr, 15 Aug 2008 20:01:18 -0000
Orkan plugins/code then you call your plugin with: plug.php?r=myplugin


..but what is more important...
I got a site with a lot of ajax stuff and the current common.php istn practical at all.
Sometimes I need access to DB only, another time I need DB + user rights only.
The biggest problem is the ob_start('ob_gzhandler'); - you cant redo the gzip compression if not needed (eg, when outputting big JPG files it takes years to compress it)

My idea is to split common.php file into 3 if - else parts - driven by an GET param. Right now I use external php files with only parts from common.php - really odd :p]]>
Fr, 15 Aug 2008 17:34:48 -0000
Lombi
xml files
xml sitemaps
robots.txt
anything else

Your thoughts?]]>
Mo, 04 Aug 2008 19:18:48 -0000