Topic: Hook requests
Did anyone say hooks? Please post your hook requests in this topic. Please try to be reasonable and to explain why you want a hook in that particular place.
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.3 extensions → Hook requests
Did anyone say hooks? Please post your hook requests in this topic. Please try to be reasonable and to explain why you want a hook in that particular place.
Hooks in parser.php (and more hooks in help.php) for adding new BBCode and smilies.
Oh, right. Sorry. Just read this post.
what is hooks ?
what is hooks ?
More info about the extension system can be found in our blog or by searching these forums.
One for appending links to $adnav_links would be handy if you're making a really large extension which uses several pages for options/management. (A gallery perhaps, or a death ray. But that wouldn't really need more than a fire button. Anways.)
All my other "hook needs" have been solved by workarounds, by using some hook nearby. (adding content to index.php above the forum listing for example) But I must say that it overall looks awesome.
One for appending links to $adnav_links would be handy if you're making a really large extension which uses several pages for options/management. (A gallery perhaps, or a death ray. But that wouldn't really need more than a fire button. Anways.)
You can use fn_generate_navlinks_end to add navlinks.
intedinmamma wrote:One for appending links to $adnav_links would be handy if you're making a really large extension which uses several pages for options/management. (A gallery perhaps, or a death ray. But that wouldn't really need more than a fire button. Anways.)
You can use fn_generate_navlinks_end to add navlinks.
Oops, should've mentioned that I meant the navigation for the admin pages.
liquidat0r wrote:intedinmamma wrote:One for appending links to $adnav_links would be handy if you're making a really large extension which uses several pages for options/management. (A gallery perhaps, or a death ray. But that wouldn't really need more than a fire button. Anways.)
You can use fn_generate_navlinks_end to add navlinks.
Oops, should've mentioned that I meant the navigation for the admin pages.
ca_admin_menu_new_sublink in common_admin.php ?
intedinmamma wrote:liquidat0r wrote:You can use fn_generate_navlinks_end to add navlinks.
Oops, should've mentioned that I meant the navigation for the admin pages.
ca_admin_menu_new_sublink in common_admin.php ?
Using that one will make the links appear in the very beginning of the navbar, unless I'm wrong about how arrays work in PHP.
Look into the array_insert function?
Some hooks in include/email.php would be nice for things like secure SMTP support and modifying email headers.
EDIT: Well, not secure SMTP as that seems to be in But still, put some hooks in there.
Hi,
A hook in place of the "Online" stat to be able to display them as we want.
For example : changing the color of a given group of users in the "Online" list of users.
i think there is nothing for that arround the line 92 of the footer.php .
Kind Regards.
Look into the array_insert function?
Forgive me if I'm wrong, but doesn't $array[] = 'value' add an element at the very end of the array? So even if I put my "Death Ray Control Panel?" at, let's say, position 3 (which I fail to see how it would be possible, cause there's no 0, 1 or 2), then adding elements would put them in position 4, 5, and so on... Honestly, I'm far from a PHP Guru, but this is how I always have thought arrays work.
Arrays in PHP aren't really like in other languages. You can insert values everywhere you want.
Too bad the array_insert() function doesn't exist, but it should be easy enough to implement. Something like this probably:
function array_insert(&$array, $offset, &$insertvals)
{
array_splice($array, $offset, 0, $insertvals);
}
Another thing I'd like to note is that there seems to be no way to add a section (?action=*) to profile.php. You'd have to add a new page to do so. Not very friendly for simple extensions wanting to have a user setting.
A hook around line 1118 in profile.php would do for that.
array_insert() exists in functions.php, so it's there.
//
// Inserts $element into $input at $offset
//
function array_insert(&$input, $offset, $element)
{
// Out of bounds checks
if ($offset > count($input))
$offset = count($input);
else if ($offset < 0)
$offset = 0;
array_splice($input, $offset, 0, 0);
$input[$offset] = $element;
}
But unless I'm totally wrong (this time to), this won't insert an element at position 5 if there's only 3 elements in the array.
Oh.
And it will insert it there, it'll just appear as element #4 because there is not actual #4. Logical, I'd say.
A hook in place of the "Online" stat to be able to display them as we want.
Yes, please. In our case, we want to display upcoming birthdays and events/shows.
vt_post_header_load - Line 249 viewtopic.php after "require PUN_ROOT.'header.php';" - ESSENTIAL - Poll mod, all the content for the poll to be displayed needs to be put immediatly after the header, as is convention on every modification ever written.
hd_announcement - Line 255 header.php after "// END SUBST - <!-- pun_alert -->" - RECOMMENDED - There is a hook for just about every other template type, why not annoucements?
vf_row_loop - Line 215 viewforum.php before "++$pun_page['item_count'];" - QUESTIONABLE - In viewforum the post row loop has no hook inside the loop. I realize loops are not exactly the best play for hooks, but its requires a lot of parsing later on if are not able to change post attributes 'on the fly'
Edit: Sorry Smartys
may i request a hook for handling external authentication ?
Most succesfull forums like vbulletin and invision power board handle external authentication quite well. I particulary like invision boards authentication system.
Most of the time, a forum is supposed to work with another cms like a blog, or a portal like mambo etc...
but integrating punbb with other systems is really painfull....hope this situation will change with future releases.
gautam.madeshia: We tried to place certain hooks specifically to make that easy. Could you look through the code and tell me where you think more hooks are needed?
Oh, and I disagree that integration is painful, although I certainly think 1.3 improves it
Userlist - "Sort results by" drop-down menu
Since additional columns can be displayed, it would nice to be able to sort on these additional columns.
A suggestion from me: a hook in admin/users.php to allow handling a new mass action.
Hooks in parser.php (and more hooks in help.php) for adding new BBCode and smilies.
Oh, right. Sorry. Just read this post.
may be the hooks for bbcode are not included in the new parser version ?
so your request seems to be legitimate
No, there are going to be hooks in the new parser, that's part of why it's the new parser
A hook in functions.php that allow you to add new functions in functions.php
I found a lot of hooks there. But not one that allowed you to add a new functions
('fn_new_function') or something like that. At the end of functions.php
I think it's needed if someone need a function for their stuff then they can just add it there
PunBB Forums → PunBB 1.3 extensions → Hook requests
Powered by PunBB, supported by Informer Technologies, Inc.