Jump to content

Recommended Posts

I'm working on a writing content management system which I initially wrote for myself but am now extending. There's a demo at [a href=\"http://books.zatechcorp.com\" target=\"_blank\"]http://books.zatechcorp.com[/a].

I have the theme system down pat but I'm trying to write a plugin system that allows others to write plugins that extends the functionality of the CMS. I've searched all over the internet but I can't find anything related to developing a plugin system for one's own custom software.

Can anyone give me specifics of what I'd need and what to keep in mind while developing it?
Link to comment
https://forums.phpfreaks.com/topic/11839-writing-a-php-plugin-system/
Share on other sites

[!--quoteo(post=383108:date=Jun 13 2006, 05:46 AM:name=azuka)--][div class=\'quotetop\']QUOTE(azuka @ Jun 13 2006, 05:46 AM) [snapback]383108[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I'm working on a writing content management system which I initially wrote for myself but am now extending. There's a demo at [a href=\"http://books.zatechcorp.com\" target=\"_blank\"]http://books.zatechcorp.com[/a].

I have the theme system down pat but I'm trying to write a plugin system that allows others to write plugins that extends the functionality of the CMS. I've searched all over the internet but I can't find anything related to developing a plugin system for one's own custom software.

Can anyone give me specifics of what I'd need and what to keep in mind while developing it?
[/quote]

Do you mean you want to offer users to add there own code to the existing code and shere there findings to others.

I think afther a time this will happen automatickly.
[!--quoteo(post=383113:date=Jun 13 2006, 06:05 AM:name=azuka)--][div class=\'quotetop\']QUOTE(azuka @ Jun 13 2006, 06:05 AM) [snapback]383113[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I don't really mean that. Have you noticed the plugins for Wordpress, components for Joomla and such?

I don't want to write badly arhitected code that'll be difficult to extend in any direction, which is why I'm seeking help.
[/quote]

Why dont you code a lot of add on's and sell them as extra added mods.

[!--quoteo(post=383119:date=Jun 13 2006, 06:30 AM:name=redarrow)--][div class=\'quotetop\']QUOTE(redarrow @ Jun 13 2006, 06:30 AM) [snapback]383119[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Why dont you code a lot of add on's and sell them as extra added mods.
[/quote]


You wont users to add Theme's to your existing project is that correct like word press.

sorry know i understand.

I thort a Theme was just css and images designd in the way the user wants them.
[!--quoteo(post=383150:date=Jun 13 2006, 08:12 AM:name=azuka)--][div class=\'quotetop\']QUOTE(azuka @ Jun 13 2006, 08:12 AM) [snapback]383150[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Well, we seem to be misunderstanding each other. I've already written the theme / template system and it works perfectly.

I'm saying I want to implement a feature that allows others to write and install plugins for the system.
[/quote]

what in php like a built in text editor

and sorry forthe confussion you project is 10/10 is it gpl
[!--quoteo(post=383151:date=Jun 13 2006, 04:17 AM:name=redarrow)--][div class=\'quotetop\']QUOTE(redarrow @ Jun 13 2006, 04:17 AM) [snapback]383151[/snapback][/div][div class=\'quotemain\'][!--quotec--]

what in php like a built in text editor

and sorry forthe confussion you project is 10/10 is it gpl [/quote]

Well, it's quite personal, although I don't mind releasing the code. I'm an amateur writer and I needed something for online purposes.

Some people have met me online indicating interest in it so I'm trying to work on it and ensure that if other developers work on it with me, we won't need to do a complete rewrite.
[!--quoteo(post=383156:date=Jun 13 2006, 09:42 AM:name=azuka)--][div class=\'quotetop\']QUOTE(azuka @ Jun 13 2006, 09:42 AM) [snapback]383156[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Well, it's quite personal, although I don't mind releasing the code. I'm an amateur writer and I needed something for online purposes.

Some people have met me online indicating interest in it so I'm trying to work on it and ensure that if other developers work on it with me, we won't need to do a complete rewrite.
[/quote]
You can't be too stressed about the code being changed, it doesn't meant that anything is lost, but a good system for plug in's is quite messy I suppose. The entire code must accomodate for these plugins (depending on what level of plugins you want.
[!--quoteo(post=383196:date=Jun 13 2006, 10:48 AM:name=joquius)--][div class=\'quotetop\']QUOTE(joquius @ Jun 13 2006, 10:48 AM) [snapback]383196[/snapback][/div][div class=\'quotemain\'][!--quotec--]
You can't be too stressed about the code being changed, it doesn't meant that anything is lost, but a good system for plug in's is quite messy I suppose. The entire code must accomodate for these plugins (depending on what level of plugins you want.
[/quote]

This is the advice i give you as my self a amatur programmer .

when we make scripts i no that they fell close to our self lol, And it herts to have others tinker about with them and alter the code it is so upsetting as were all attached to our own code.

But i personally found a way around that felling buy giving the code away for free, and let users alter my beloved code and comment and help to inprove the project at hand.

When user submit code that is a good mod, I dont release it as a free mod i let users pay for upgrades and now my confedence as a programmer comes back, knowing that ok the task is free to all on hotscripts.com but for a small fee for a nice mod they pay nice!.

At the same time i ask my communty of downloading friends what mods they would like and then i set my self a task to get those mods built some i give for free and the others that are ask so meny times i charge.

So in essence a good inforstructure of a free gpl script can give a huge income if planned carefully.

My rules ok lol.

1. The free script comes with the basic and addon's i charge for.

2. Users can donate there time with there own added code.

3. If donated code is so good use it as a paying mod.

4. If the donated code is a 5/5 code link it as a donnated mod.

5. In the forum of the code make mods that are wanted.

6. Sell wanted mods or donate the mod as a 5/5 code.

7. Sit back administrate the site properly and watch my paypal account grow lol.


Hope this help good luck

Always remember if it to good to be true it probly is.
redarrow has made quite an important point.

another option is to make a php file which can be included into any other php page which includes all the portal code (login, permissions, etc.) then give the mod makers the option to add link any new page they make (which includes your include.php page) this way integrating their code into your portal system. What do you think?
Well, there's a file called 'functions.php' which includes 'normal' function files and another called 'admin-functions.php' which includes admin-specific files so I get your point.

I have to admit I've been very busy and haven't touched my code for two weeks now. I'll work on it.

Perhaps my biggest problem is that I'd never written a CMS before [I started programming last year] so I get scared that I'm leaving security holes open and such, even though I keep current with security practices.

Does having a plugin system leave the system open to vulnerabilities? On the other hand, I want others to be able to extend my work without having a need to rewrite major portions of code to suit themselves, then having problems upgrading.
as I said before, if you create a "master file" which deals with the basics: (design, user control and db use) in a method that has a wide compatability there should be no problem. what I would normally advise is to create the page down to what you could call the first cell of the second line (for instance the left sidebar on this website) and then to add you just add any code after that. you may want to create a file of "pre-html commands" for posting information that requires redirecting or setting cookies, etc. where people can add that kind of function.

If this is the first time you have written such a thing, and you having been programming for a year, you wanna get some beta testers on the site before going too far with it. It'll stream line the process.

Good luck in any case.
[!--quoteo(post=383453:date=Jun 13 2006, 04:23 PM:name=joquius)--][div class=\'quotetop\']QUOTE(joquius @ Jun 13 2006, 04:23 PM) [snapback]383453[/snapback][/div][div class=\'quotemain\'][!--quotec--]
as I said before, if you create a "master file" which deals with the basics: (design, user control and db use) in a method that has a wide compatability there should be no problem. what I would normally advise is to create the page down to what you could call the first cell of the second line (for instance the left sidebar on this website) and then to add you just add any code after that. you may want to create a file of "pre-html commands" for posting information that requires redirecting or setting cookies, etc. where people can add that kind of function.

If this is the first time you have written such a thing, and you having been programming for a year, you wanna get some beta testers on the site before going too far with it. It'll stream line the process.

Good luck in any case.
[/quote]


You can also check out phpNuke [a href=\"http://phpnuke.org/modules.php?name=Downloads&d_op=viewdownload&cid=1\" target=\"_blank\"]http://phpnuke.org/modules.php?name=Downlo...wdownload&cid=1[/a] This is a spectacularly coded CMS and its open source so you can backwards engineer it. I'm currently working on backwards engineering it and making a website to explain how it works.
Like I said, everything is abstracted so the CMS doesn't care where the data is coming from - MySQL, MSSQL, or using PEAR itself.

This isn't a traditional 'CMS' that fits generic purposes. It's geared specially towards writers.

phpfreak101, isn't PHPNuke rather complex? I thought there'd be perhaps some CMS or some tutorial that shows how to create a plugin system whose APi you can expose?

Studying the entire PHPNuke CMS sounds like overload to me. Of course, I could be wrong...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.