logo

eoCMS Developer
eoCMS Developer
Offline Offline
avatar
Posts: 1528
Plugin -info

WARNING: Epic post! More epic than most of paul's Tongue

Ok I have been looking through the navpanel new -info. I love the tables bit
Code:
$plugin['settings']['tables']['create']['navigation_menu'] = array(
   'columns' => 'id,name,link,item_order,rank,authid,window,height,width',
   'types'   => 'int(225),varchar(225),varchar(225),varchar(225),varchar(225),tinyint(1),text,int(5),int(5)',
   'keys'    => array(
      'primary' => 'id', # if 1st column == id=int=primary then auto_increment
      'key'     => 'item_order'
   )
);

Very good idea, Paul have you made a class/function yet to interpret these and generate the queries for the different DBs? Also, primary, I think the value should be appended with auto_incrament as many people might not want to name the column id, remember, eoCMS is not meant to be the limitation, but rather the coder Wink

The multiple version arrays. Im not too keen on those
Code:
$plugin['version']['created']  = '21st November 2008';
$plugin['version']['updated']  = '2009-06-05';
$plugin['version']['eocms']    = '0.8.2'; # min eoCMS version
$plugin['version']['major']    = '0';
$plugin['version']['minor']    = '3';
$plugin['version']['revision'] = '0'; # please update per -info change

I dont see the need for those, eocms version yes, but all the others can go into a /* comment */

I like the author though, that makes things easier to read
Code:
$plugin['author']['name']  = 'confuser';
$plugin['author']['site']  = 'http://eocms.com';

Need to add author email though.

Code:
$plugin['description']['short'] = 'Editable Navagation Panel Plugin';
$plugin['description']['long']  = 'The first plugin ever built for eoCMS, like a "quick links" list, where items can be regular urls, menu links, or any other eoCMS internal url, now has ordering (v2).';

Like this too, allows plugins to look more like the themes area, maybe add a screenshot array too?

Code:
$plugin['options']['plugin'] = 'Admin.php';

Too vague, I think it needs to be ['admin'] rather than plugin. Now I was thinking, currently, if you want multiple pages with a plugin (Non admin area), you need to make the layout similar to the index.php file, with the different includes or if/else statements depending on a certain $_GET. Maybe we could add a new $_GET called sa (secondary act), we could then have a ['layouts'] as an array, with the list of keys being the sa and values being the layout.

I think we should also add a $plugin['panels'] which is an array with a list of the Panel name as key, and folder as value. The panels can be stored within the plugin ie. Plugins/navpanel/panels. That way, plugins which have panels do not need to be put in the panels folder. Also, within the panels admin area, add an optgroup to separate the panels which are plugins from the rest or even make the optgroup the name of the plugin to make it easier to see which one it has come from. Also, it means that when a plugin is un-installed, the panels using that plugin can also be un-installed, this should prevent any errors occurring!

Lastly, I want eoCMS to be extremely flexible and modular, the less editing required by people making plugins the better. I propose that we add a new feature to plugins. Ability to include a layout on a specific act, at the beginning or the end. For example, if this was done, I could create a layout displaying the user's Mods that they have submitted to the database, this could then easily be included after the Profile Layout (act=profile) without even needing to edit anything. What you think?

Forgot one more thing. Plugin variables! It is really annoying having to type out especially in the admin panel something like this constantly for links
Code:
index.php?act=admin&opt=plugins&type=admin&sa=edit&id='.$_GET['id'].'&linkid=' . $p['id'] . '&'.$authid.'
$_GET['id'] is the plugin id.
Maybe we can make some Plugin Constants or variables? Constants might be easier as that means no need for global variables...
Last Edit: 14th July, 2009, 04:35:53 PM by confuser

Please do not PM me requesting support or anything, use the forums, thats what they are here for
eoCMS Developer
eoCMS Developer
Offline Offline
avatar
Posts: 1528
Re: Plugin -info

I know its epic but you really need to read it, as I want to start integrating this ASAP! XD

Please do not PM me requesting support or anything, use the forums, thats what they are here for
eoCMS Developer
eoCMS Developer
Offline Offline
avatar
Posts: 242
banancanardbanancanard@live.com
Re: Plugin -info

IT sounds good, as far as the links go, for posting a form and such I just use the PHP_SELF server var and it works just fine to post to itself.  Otherwise start the implementation so I can start releasing some plugins that are waiting for the finalization of the system.

"Control yourself. Take only what you need from it"
http://mrrsm.com
eoCMS Developer
eoCMS Developer
Offline Offline
avatar
Posts: 1528
Re: Plugin -info

I have started making a function to build the query Smile

Please do not PM me requesting support or anything, use the forums, thats what they are here for
eoCMS Developer
eoCMS Developer
Offline Offline
avatar
Posts: 1528
Re: Plugin -info

Done the create_sql function for MySQL and SQLite, need to still add a return or error upon fail IE the argument is not an array or the number of columns and types dont match. Paul I have a brilliant idea! We can remove all those sql files (install.create.php) etc and replace it this function. That way we only need one file with the creates! It will make life so much easier Grin

Please do not PM me requesting support or anything, use the forums, thats what they are here for
eoCMS Designer
eoCMS Designer
Offline Offline
avatar
Posts: 1290
tbarkass_willamson@hotmail.com
Re: Plugin -info

Excellent... is there any reason why this can't be moved to the Dev Talk board? XD

Seen a bug? Report it!
eoCMS Developer
eoCMS Developer
Offline Offline
avatar
Posts: 242
banancanardbanancanard@live.com
Re: Plugin -info

Cause we are being secretive for no reason what so ever.  Tongue

"Control yourself. Take only what you need from it"
http://mrrsm.com

Jump to:


0.06 seconds Queries: 14