https://www.icyphoenix.com/viewtopic.php?f=1&t=7143 ----------------------------------- Mighty Gorgon Sat 08 May, 2010 11:07 Guestbook Plugin Released For Debugging And Show Off ----------------------------------- Hi all, I have added to SVN ([url=http://www.assembla.com/code/icy_phoenix/subversion/nodes/extras/trunk/guestbooks]SVN Guestbook) a new plugin which I have developed for my own use, but I want to share with you to share the powerful of the new plugins engine which I have coded and will be included in next Icy Phoenix. Installing this plugin is really easy, you just need to copy all files to your Icy Phoenix root and then install it from ACP => Plugins. After you have installed it you can create a new guestbook from guestbooks.php and then manage it through guestbook.php. How it works is really straightforward. I have also created a CMS block to allow it's usage from a CMS page. New plugins folders and files structure should be really similar to the current Guestbook plugin, so you can get an idea on how a new plugin should be coded. I will create a small tutorial when I'm almost sure that the structure is stable and won't change. In the meantime just consider this as a draft: [list][*][b]adm[/b]: admin modules and settings (Guestbook plugin doesn't have working ACP modules yet... but you can see a demo of a couple of settings there just to show you how it works!) [*][b]docs[/b]: contains all files related to instructions or documentations [*][b]includes[/b]: contains plugin specific functions and classes [*][b]install[/b]: contains install/update/uninstall instructions which will be automatically managed in ACP [*][b]language[/b]: contains plugin specific languages [*][b]templates[/b]: contains plugin specific templates files[/list] If you have a bit of confidence with PHP you will see how easy is to add ACP modules, specific settings and installation instructions. Everything is working as stand alone using common classes and functions already present in Icy Phoenix (which I'm debugging from a lot of time...). You will only need to integrate special switches if your plugin should integrate with already present features... but I'm working on this aspect trying to create specific hooks to be used for special common features which may requires plugins (such as forums and topics). Here is a demo of the Guestbook plugin on a live website: [url=http://www.annuncidimatrimonio.com/guestbooks.php]Guestbooks List [url=http://www.annuncidimatrimonio.com/guestbook.php?gid=1]Stand Alone Guestbook [url=http://www.annuncidimatrimonio.com/users/lisaegiovanni/index.php?page=6]Guestbook Block In CMS Page Feedbacks are really welcome. Thanks. ----------------------------------- DWho Sat 08 May, 2010 12:53 Re: Guestbook Plugin Released For Debugging And Show Off ----------------------------------- Fantastic first chance i get I will try it out... great work :mrgreen: :mrgreen: ----------------------------------- Yros Sun 09 May, 2010 06:54 Re: Guestbook Plugin Released For Debugging And Show Off ----------------------------------- Nice idea. I'll give you some feedbacks as I just tried it but, before, I'd like to know the main purpose behind this mod because actually what I see is a kind of article writing by anyone in a specific page with specific com's etc ... So, what's the purpose ? By the way, these are some ideas around it to improve the plugin : 1st) being able to post the books from our profile (make a new part in the profile to do it). 2) being able to manage it (from ACP for main options/settings and from profile for cats / subsections). I think yet it's just a release to implement and try out the plugin system but these are still some interesting ideas that may be worth to be checked out ;) Just a point about plugin system : when you put the plugin in the directory and check your ACP, you see that you can " install " the mod and " enable " it. But both options does the same. It would be a good idea to make the difference like that : - install : install the tables and part required - enable : as it say ... just enable it to use it - disable : NOT UNININSTALL ! It only disable the mod as it would do for FTR or some over global vars. - uninstall : remove completely the mod by removing the parts of the BDD (- delete : delete the files of the mod from the server ?) Why ? Because, as I checked it, actually enable means install and disable means unininstall. But sometimes we may would like to simply disable it because we don't need it for some times or we'd like to check few things around it WITHOUT loosing the parts of the bdd linked to the plugin. I hope it will help you ;) Regards, ----------------------------------- spydie Sun 09 May, 2010 10:59 Re: Guestbook Plugin Released For Debugging And Show Off ----------------------------------- should be easy to add a switch to the modules ACP. Since ACP isĀ“nt working for this mod still. MG probably will add this option to there. ----------------------------------- Mighty Gorgon Sun 09 May, 2010 20:41 Re: Guestbook Plugin Released For Debugging And Show Off ----------------------------------- [b]Yros[/b], install, update, uninstall, enable, disable, means just what you are supposing. [list][*]INSTALL: installs all db tables [*]UPDATE: updates db where needed [*]UNINSTALL: removes all db entry related to the plugin [*]ENABLE: enables the plugin (once installed!) [*]DISABLE: disables the plugin (once installed!)[/list] Regarding the Guestbook Plugin the purpose is to allow each user to have its own guestbook where other users may leave greetings or comments... it's not a blog! It is like a "per user" public shoutbox. Finally, regarding ACP options, (as I wrote in the first post) Guestbooks plugin has just a demo ACP module with a couple of fake settings which won't affect everything. Those settings are there just to show how easy (under a developer point of view) is creating a new ACP module with the settings needed. ----------------------------------- Yros Mon 10 May, 2010 20:18 Re: Guestbook Plugin Released For Debugging And Show Off ----------------------------------- Yup, that's also what I thought ;) Btw the purpose is completed =) I just wanted to know a thing as I'm not really a good coder and that I couldn't answer by myself by looking the code but ... The files you put on your root/plugins/{name_of_the_plugin} REPLACE the olds one or ADD the contained code ? Because, for example, to adapt some actual mods into plugins, how would it be possible if they require some core files editing ? ----------------------------------- TheSteffen Thu 20 May, 2010 10:18 Re: Guestbook Plugin Released For Debugging And Show Off ----------------------------------- Thanks MG for charing this great guestbook plugin :thanks: