[RFC|Merged] Extensions

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.
Post Reply
KnocksX
Registered User
Posts: 80
Joined: Thu Jul 19, 2012 2:03 am

Re: [RFC|Merged] Extensions

Post by KnocksX » Thu Jul 19, 2012 2:46 pm

I'm afraid I would be of little help to you guys, was just curious about the slow down in posting activity.

User avatar
Meis2M
Registered User
Posts: 410
Joined: Fri Apr 23, 2010 10:18 am
Contact:

Re: [RFC|Merged] Extensions

Post by Meis2M » Fri Jul 20, 2012 1:40 pm

i installed 3.1.dev in test local yesterday. but i could not see any Extensions tools in acp. :oops:

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

Re: [RFC|Merged] Extensions

Post by imkingdavid » Fri Jul 20, 2012 1:42 pm

Meis2M wrote:i installed 3.1.dev in test local yesterday. but i could not see any Extensions tools in acp. :oops:
That is because the ACP module is not yet finished.
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
Meis2M
Registered User
Posts: 410
Joined: Fri Apr 23, 2010 10:18 am
Contact:

Re: [RFC|Merged] Extensions

Post by Meis2M » Fri Jul 20, 2012 1:47 pm

oh. thanks imkingdavid.
my 3.1.dev test is here
http://www.php-bb.ir/3.1.dev/

admin
123456
:D

User avatar
emosbat
Registered User
Posts: 43
Joined: Fri Aug 24, 2012 8:49 am

Re: [RFC|Merged] Extensions

Post by emosbat » Fri Feb 01, 2013 4:42 pm

I need to know more about how extensions will works for template modifications? I mean, for example currently in modx we change header template file and add a link to that. how this happen in extensions? is there some sort of hooking system for template modification? (sorry if this is offtopic)

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

Re: [RFC|Merged] Extensions

Post by imkingdavid » Fri Feb 01, 2013 8:23 pm

emosbat wrote:I need to know more about how extensions will works for template modifications? I mean, for example currently in modx we change header template file and add a link to that. how this happen in extensions? is there some sort of hooking system for template modification? (sorry if this is offtopic)
We have implemented what are known as "template events". Basically, these are named locations in the existing code into which new template code can be injected. The events look like <!-- EVENT event_name --> and some have already been merged so you can look through the current template files of the develop branch (3.1) on the repository to see examples.

Currently, the coverage is lacking severely, so we would appreciate any feedback on where people may need new events. First, look to see what events are currently available (I believe there is an alphabetical list in the docs folder), determine if one of those will meet your needs, and if not, create a new topic in this forum (after reading the Readme topic) to request a new one. There should be one event per topic (and therefore one topic per event) in that forum so that we can keep things organized.

If you need further help, you may ask in the #phpbb-dev or #phpbb-coding channels on IRC (freenode server) or consult the wiki documentation on events.
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
tmbackoff
Registered User
Posts: 180
Joined: Sat Jun 12, 2010 3:25 am

Re: [RFC|Merged] Extensions

Post by tmbackoff » Thu Feb 07, 2013 4:29 pm

Question, how would this work with CSS files? If I have a MOD that uses it's own CSS file, currently I have to edit stylesheet.css to include it. Is there a CSS event?

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

Re: [RFC|Merged] Extensions

Post by imkingdavid » Thu Feb 07, 2013 4:57 pm

There is the event overall_header_head_append that comes right before the </head> tag in overall_header.html. You can use this to add something like <link href="{T_THEME_PATH}/mystyle.css" rel="stylesheet" type="text/css">.
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
VSE
Extension Customisations
Extension Customisations
Posts: 670
Joined: Mon Mar 08, 2010 9:18 am

Re: [RFC|Merged] Extensions

Post by VSE » Thu Feb 07, 2013 5:21 pm

Coding Guidelines could use some more documentation... especially on how to work with listeners and stuff... The existing info is good if you want to write a mod that is only a front end facing page, like a blog add-on... but what about actually injecting/modifying code in the core and all that fun stuff... haven't found any examples or info on any of that yet.
Has an irascible disposition.

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

Re: [RFC|Merged] Extensions

Post by imkingdavid » Thu Feb 07, 2013 8:07 pm

Yes, documentation is currently lacking. We plan to expand upon it once Alpha is released (and therefore the systems will be pretty much final; right now, things can still change a bit if necessary).

You are welcome to take a look at the code for my topic prefixes extension. This is an example of using both PHP and Template events. EDIT: here is a somewhat brief explanation of how the files in my extension are used and what purpose each serves. Let me know if you still don't understand something, and you're always welcome to ask on IRC.

EDIT 2: Note that until the EXreaction/feature/migrations-extensions branch is merged, it may take some work to get it installed properly. If decide to try it and need help, ask on IRC.
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.

Post Reply