Self-contained MODs

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.2.x. If you need support for phpBB 3.2.x please visit the 3.2.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: Self-contained MODs

Post by naderman » Sat May 21, 2011 11:17 am

3.1 will contain a hook system to modify the behaviour of phpBB without code changes. So many MODs can be implemented without the need for anything like AutoMOD.

uk_martin
Registered User
Posts: 8
Joined: Thu Jun 30, 2011 12:26 pm

Re: Self-contained MODs

Post by uk_martin » Fri Jul 01, 2011 1:11 pm

As I see it, yes having self-contained folders containing MOD's is all well and good, and sure, you can delete the folders, and the MOD is gone.

HOWEVER, the problem continues with the codebase changes to template, language, config files etc and with database changes.

I think that the further development of AutoMOD may be a better way to go with this, (call it "AutoMOD 3.1" if you like) in such a way that "AutoMOD 3.1" retains a full record of changes to files and the database that it makes during installation and that it also has a full uninstall routine that undoes any alterations to files and the database. It would need to be sophisticated enough to cope with inline edits of template files (etc) and that its current method of keeping backup files and replacing Modded files with the backup at the time of uninstallation is dropped. The system is fine for as long as there is only one MOD in the system, but if several MOD's are installed and the first of these is then uninstalled, the backup files won't contain the alterations that later MODs created.

I would also suggest and that full AutoMOD standards compliance is mandatory for any new MOD released, in order to ensure that a measure of reliability is introduced.

nekkidblogger
Registered User
Posts: 7
Joined: Mon Jul 18, 2011 6:24 pm

Re: Self-contained MODs

Post by nekkidblogger » Mon Jul 18, 2011 7:06 pm

In my opinion you should go much further: Look closely at WordPress.

It ought to be possible to go directly from the Admin panel to the mod repository, search it, find a mod you like, and then click it and have it auto-installed. Likewise, there should be a list of installed mods in the Admin panel, and the ability to uninstall with one click.

That philosophy, by the way, ought to go for updates to phpBB as well: Admins should be able to see (easily) which version they have and whether a newer version is available. If they want, they should be able to upgrade by simply clicking on the link to the most recent version.

There is no reason whatsoever why people should have to download mods and updates to their hard-drives and upload them to their servers from there - much less to download, unzip, and then upload.

In my humble opinion, the focus on streamlined, simple, one-click and ready to go installs, upgrades, and changes in theme layouts and functionality ought to be a very high priority. It's not easy, and it requires very clear guidelines for modders as well as developers, but it can be done. That's the kind of philosophy that has made WordPress such a fabulous success - there are now over 50 millions blogs using it. And people using it don't need to know anything about CSS, HTML, PHP or MySQL. If you know it, fine - you can get things done others can't do and customize more, but you can run a WordPress blog and do fine without ever changing a line of code, downloading a single file to your PC or ever uploading to the server. That's a huge acheivement for WordPress and, I think, a smart philosophy for rapid growth and expansion of the user base.

Best,
Peter

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: Self-contained MODs

Post by callumacrae » Tue Jul 19, 2011 3:50 pm

nekkidblogger wrote:In my opinion you should go much further: Look closely at WordPress.

It ought to be possible to go directly from the Admin panel to the mod repository, search it, find a mod you like, and then click it and have it auto-installed. Likewise, there should be a list of installed mods in the Admin panel, and the ability to uninstall with one click.

That philosophy, by the way, ought to go for updates to phpBB as well: Admins should be able to see (easily) which version they have and whether a newer version is available. If they want, they should be able to upgrade by simply clicking on the link to the most recent version.

There is no reason whatsoever why people should have to download mods and updates to their hard-drives and upload them to their servers from there - much less to download, unzip, and then upload.

In my humble opinion, the focus on streamlined, simple, one-click and ready to go installs, upgrades, and changes in theme layouts and functionality ought to be a very high priority. It's not easy, and it requires very clear guidelines for modders as well as developers, but it can be done. That's the kind of philosophy that has made WordPress such a fabulous success - there are now over 50 millions blogs using it. And people using it don't need to know anything about CSS, HTML, PHP or MySQL. If you know it, fine - you can get things done others can't do and customize more, but you can run a WordPress blog and do fine without ever changing a line of code, downloading a single file to your PC or ever uploading to the server. That's a huge acheivement for WordPress and, I think, a smart philosophy for rapid growth and expansion of the user base.

Best,
Peter
I've heard mentions of something like this for 3.2, but it definitely won't be happening in 3.1. I would like to see this, too :)

~Callum
Made by developers, for developers!
My blog

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: Self-contained MODs

Post by imkingdavid » Fri Jul 29, 2011 9:56 pm

This is a great idea, but how will it work with MODs that still have to make edits that cannot be acheived with the hook system? One example I can think of is adding constants for new database tables. It is generally accepted/expected to edit the includes/constants.php file and add new constants at the end. Perhaps one way around this is to have MOD authors include a new file called constants_modname.php and then that file is automatically found and included if present? This is how I did it in one of my mods to reduce the code edits; I added a new file for constants for that MOD and automatically included it in a hook.

Also, how will it work with MODs that have need of a front-facing file? For instance, a MOD that adds an articles system might add a file called or articles.php. If the proposal were put in place, the user would have to go to board/includes/mods/articles.php instead of just articles.php.

Or perhaps we could do what some other software does and use index.php as the front-end file and use a query string to go to specific places, i.e. index.php?page=articles or index.php?p=viewtopic
But that might be a bit extensive of a change for 3.1.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: Self-contained MODs

Post by naderman » Sun Jul 31, 2011 1:24 am

imkingdavid wrote:Or perhaps we could do what some other software does and use index.php as the front-end file and use a query string to go to specific places, i.e. index.php?page=articles or index.php?p=viewtopic
But that might be a bit extensive of a change for 3.1.
I think this would absolutely be doable as a hook for 3.1. We'll keep the other files in phpBB as they are. But as you point out, this would allow hooks to add new pages easily.

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: Self-contained MODs

Post by imkingdavid » Sun Jul 31, 2011 6:19 pm

naderman wrote:
imkingdavid wrote:Or perhaps we could do what some other software does and use index.php as the front-end file and use a query string to go to specific places, i.e. index.php?page=articles or index.php?p=viewtopic
But that might be a bit extensive of a change for 3.1.
I think this would absolutely be doable as a hook for 3.1. We'll keep the other files in phpBB as they are. But as you point out, this would allow hooks to add new pages easily.
Should that be made an RFC or sub-RFC for this self contained MODs idea?
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: Self-contained MODs

Post by naderman » Thu Aug 04, 2011 11:30 pm

It should really just be a hook request RFC I think.

Danielx64
Registered User
Posts: 304
Joined: Mon Feb 08, 2010 3:42 am

Re: Self-contained MODs

Post by Danielx64 » Sat Nov 26, 2011 2:57 am

naderman wrote:
imkingdavid wrote:Or perhaps we could do what some other software does and use index.php as the front-end file and use a query string to go to specific places, i.e. index.php?page=articles or index.php?p=viewtopic
But that might be a bit extensive of a change for 3.1.
I think this would absolutely be doable as a hook for 3.1. We'll keep the other files in phpBB as they are. But as you point out, this would allow hooks to add new pages easily.
I think that is going to be a bad move. One example, What if someonw wants to (and yes you can do it right now) have a gallery mod installed in gallery.domain.com and their forum in forums.domain.com. If we go to having index.php as the main hook for everything like in ip.board, it may cause some issues for those who want to run different part of their site in a different subdomain.

User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: Self-contained MODs

Post by naderman » Sat Nov 26, 2011 2:14 pm

We have never supported anything like that in the past and you can still simply put new files on your subdomain, nobody is stopping you.

Post Reply