[RFC|Merged] Extensions
Re: [RFC|Merged] Extensions
I'm afraid I would be of little help to you guys, was just curious about the slow down in posting activity.
Re: [RFC|Merged] Extensions
i installed 3.1.dev in test local yesterday. but i could not see any Extensions tools in acp.
- imkingdavid
- Registered User
- Posts: 1050
- Joined: Thu Jul 30, 2009 12:06 pm
Re: [RFC|Merged] Extensions
That is because the ACP module is not yet finished.Meis2M wrote:i installed 3.1.dev in test local yesterday. but i could not see any Extensions tools in acp.
Re: [RFC|Merged] Extensions
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)
- imkingdavid
- Registered User
- Posts: 1050
- Joined: Thu Jul 30, 2009 12:06 pm
Re: [RFC|Merged] Extensions
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 likeemosbat 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)
<!-- 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.
Re: [RFC|Merged] Extensions
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?- imkingdavid
- Registered User
- Posts: 1050
- Joined: Thu Jul 30, 2009 12:06 pm
Re: [RFC|Merged] Extensions
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">
.Re: [RFC|Merged] Extensions
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.
- imkingdavid
- Registered User
- Posts: 1050
- Joined: Thu Jul 30, 2009 12:06 pm
Re: [RFC|Merged] Extensions
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.
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.