porting 3.0 mods to 3.1 extensions...

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.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.
asinshesq
Registered User
Posts: 156
Joined: Fri May 14, 2004 10:32 pm
Location: NYC

porting 3.0 mods to 3.1 extensions...

Post by asinshesq »

Is there a place where people are discussing how to approach porting 3.0 mods over to 3.1 extensions that is not so technical as to scare off mod authors like me who are pretty good at manipulating the core code but don't know anything about hooks, events, etc.? I have been reading a number of posts about this but they seem to presume a lot more knowledge than I have (I realize that mod authors can dig in and try to reverse engineer things but for people like me who are not coders in real life and who do this in their spare time that's probably not a practical solution).

In addition, an example with a live extension (and I don't mean a 'foobar' kind of example that lacks substance) along with some side-by-side commentary would be helpful.

Stepping back from the technicalities for a second, I find it surprising that people think every mod will be able to be turned into an extension. It seems to me that hooking into and out of the core code without changing the core code is unlikely to be flexible enough to cover everything authors do in mods (and it also seems that some mods necessarily conflict with other mods and need to be harmonized and it's hard to see how that happens with extensions). But I realize I am ignorant on how this all works and it's entirely possible that I am wrong about that. Thoughts?
Alan

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: porting 3.0 mods to 3.1 extensions...

Post by nickvergessen »

I made a little manual, when updating my old 3.0 Newspage Mod to a 3.1 Newspage Extension
https://github.com/nickvergessen/howto- ... phpbb31ext

Is that what you mean?
Member of the Development-TeamNo Support via PM

asinshesq
Registered User
Posts: 156
Joined: Fri May 14, 2004 10:32 pm
Location: NYC

Re: porting 3.0 mods to 3.1 extensions...

Post by asinshesq »

Yes, that looks extremely helpful, thanks. Now I've got something to study for the next few weeks ;)

Do you believe that it will always be possible for a clever enough author to port a mod to an extension that has no file edits? I keep thinking that it's one thing for an extension to do a standalone job (like modules do in the phpbb3.0.x acp) and it's another for an extension to change the way core code actually works, and while I realize that intercepting the action in the middle of core code will work for a lot of things mods do I would have guessed that it will not work for all. But that's just a guess...I would be grateful to hear your view.

Thanks for responding, and of course thanks to you and all of the authors for moving us forward on phpbb!
Alan

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

Re: porting 3.0 mods to 3.1 extensions...

Post by imkingdavid »

Injecting code via events is essentially the same as modifying the file to enter the code in place of the event. So as long as an event if available where you need it, anything you could do with a MOD, you should be able to do with an extension. Right now event coverage is rather low, so we're asking MOD authors to start working on porting their MODs to 3.1 extensions so that they can let us know what events they will need in the core in order for their extension to work in 3.1 when it is released.
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.

asinshesq
Registered User
Posts: 156
Joined: Fri May 14, 2004 10:32 pm
Location: NYC

Re: porting 3.0 mods to 3.1 extensions...

Post by asinshesq »

Does it allow you to divert at a given hook and then re-enter at a different hook (as a way to effectively skip or re-write some code or re-write a function call or make other changes)? I can see how that could be made to work, although I suspect that approach makes it harder rather than easier to resolve conflicts among different mods (I mean, extensions).
Alan


User avatar
rxu Online
Registered User
Posts: 164
Joined: Tue Apr 04, 2006 4:28 pm
Contact:

Re: porting 3.0 mods to 3.1 extensions...

Post by rxu »

Looking at the tutorial by Joas, it seems that creating extensions for 3.1 is rather impossible for regular community member unlike it was for 3.0 MODs.
Image


Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 373
Joined: Thu Sep 16, 2004 9:02 am
Contact:

Re: porting 3.0 mods to 3.1 extensions...

Post by Paul »

Is the composer file required? I dont seem to find it in the tuturial.

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: porting 3.0 mods to 3.1 extensions...

Post by nickvergessen »

paulus wrote:Is the composer file required? I dont seem to find it in the tuturial.
It is, I think it was not when I started the tut, so it is missin there.
Member of the Development-TeamNo Support via PM

Post Reply