Re: Hook requests
I just put my functions in co_common.
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.3 extensions → Hook requests
I just put my functions in co_common.
I think it would be easier to find if that was moved to functions. Because i looked there first, then later found "co_common" in common.php
co_common is the place for that. You can't add a hook to functions.php because it's loaded too early.
A hook in post.php before line 190 and edit.php before line 127 would be nice. To be able to add in our own $errors.
oh and maybe a hook after line 272 in admin/groups.php in case we added in our own group options
Some hooks in include/email.php would be nice for things like secure SMTP support and modifying email headers.
Done.
Hi,
A hook in place of the "Online" stat to be able to display them as we want.
Done. One before the list, one after and one in the loop. Using the one in the loop, it should be easy to, for example, assign a special CSS class to administrators etc.
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.
I added a hook at the end of header.php instead. Just check PUN_PAGE and do your output if you're on the right page.
Wouldn't a hook in viewtopic right before <div class="paged-head"> make more sense by the way? In my opinion, the poll is a part of the topic and should appear "inside the topic" and not above the paging and posting links.
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?
What good would a hook do there? If you want to modify the announcement, you can do it anywhere before that.
vf_row_loop - Line 215 viewforum.php before "++$pun_page['item_count'];"
Done.
Userlist - "Sort results by" drop-down menu
Done.
A suggestion from me: a hook in admin/users.php to allow handling a new mass action.
Done.
A hook in post.php before line 190 and edit.php before line 127 would be nice. To be able to add in our own $errors.
You probably could use po_form_submitted and and ed_form_submitted, but I added hooks nonetheless.
oh and maybe a hook after line 272 in admin/groups.php in case we added in our own group options
Done (a few lines further down though).
Did I miss any?
The profile.php one I suggested for adding sections I think.
The profile.php one I suggested for adding sections I think.
Done.
Took me a while to figure out you were talking about what I refer to as an action, not a section Support for adding new sections was already there.
Yeah, sorry
Hooks for adding permissions in admin/forums.php.
Hooks for adding permissions in admin/forums.php.
preferably looking at this section
// Check if the new settings differ from the old
Hmm, a tricky one. Not sure exactly how to do that. We could add a variable, e.g. $ext_has_changed_setting, and then check that in the big if(), but that's kind of a hack. We would then have to do something similar with the next if().
Anyone else have an idea?
Anyone else have an idea?
if(count(array_intersect($perms_new, $perms_old)) != count($perms_new))
{
if(count(array_intersect($perms_new, $perms_default)) == count($perms_new))
{
// Delete
}
else
{
// Insert/Update
}
}
It should be quite easy to build the queries and the form directly from $perms. If done right, you will just have to add elements to $perms and $perms_default to add permissions. Forms, validation and queries are so similar that it will work most of the time, and when it doesn't you can always use some other hook. Depending on how it's all implemented you might have to use array_intersect_assoc() instead of array_intersect(), as the latter doesn't care about indexes.
User list
- Be able to add columns before/after the Username. This is our user list: country (flag icon), website (link) , ebay (link), blog (link), then username, real name.
Last time i had to integrate punbb with my intranet, i had to edit the punbb source files. I dont know how much things have change since then.
However, for an external auth system to work properly, following hooks may be neccesary:
1. a hook just before the actual login is performed. users may sync user accounts just before the actual login process. ( like wordpress's wp_authenticate hook )
2. a simple sample plugin should be included with new releases, for performing authentication against external database and ldap. These are the most common scenario, and will serve most people.
we can provide easy options for users to fill up:
database connection params, external db table name, name of user field, name of pass field, password hash scheme ( must support atleast md5 and sha1 )
If the external db is using different password encryption scheme ( for example , django uses random salt + sha1 hash ), user must be able to provide a custom fucntion to verify the passwords.
Invision board provides an easy to use sample plugin, that I modified a little bit for integration with django user database.
3. some more hooks to for proper user interface integration in case of external sso:
a. hook to enable / disable password update field within punbb ( just like wordpress's "show_password_fields" hook )
b. hook to get custom registration url, to show on top menu bar. ( to redirect user to external registration system , instead of redirecting to punbb's registration page )
c. hook to enable/disable password retrieve and reset function in punbb ( just like wordpress's "retrieve_password" and 'password_reset' hooks )
In short, SSO is not "just" user integration. Its about user interface too. And a forum should not try to be the CMS, but try to accompany a CMS. It's destined to work with external systems, so its SSO system should be really flexible.
And please take a look at wodpress's hooks. they seem to have covered almost everything imagineable...from output filters to sso...
And as much as i hate invision board, i had to use it this time, because i was able to get it working with django user db in just 10-15 minutes ...
But i am so much in love with punbb's slick interface, that I cant wait to replace it with punbb...
hi,
the current 1.3 beta seems to have lots of hooks for sso
Are there any docs for the new APIs ??
the dev page http://punbb.org/docs/dev.html dont have any info ...
Not yet, no, as everything is still subject to change
gautam.madeshia: It would be great if you could look at the actual code before requesting hooks. I just glanced through your post, but I think most of the hooks you suggest have already been put in.
gautam.madeshia: It would be great if you could look at the actual code before requesting hooks. I just glanced through your post, but I think most of the hooks you suggest have already been put in.
Yup, i was going through the code
It seems that you people have placed lots of hooks .... almost every place has got some kind of hook.
It's nice to see punbb devs taking such interest in making punbb expandable using hooks and plugins
I will let you know if some specific place may need any kind of hook as soon as soon as I finish browsing the code.
Thanks for your prompt replys Smartys.
No problem, I'm glad the hook placements are working out
Hook requests
Image Awards
Image Rank System
Those are examples of modifications that you want ported to extensions, not hooks.
Hello!
Hooks and feature request:
- display the forums moderators (like in punbb 1.2 or/and on viewforum.php)
- display the forums description on viewforum.php
- display the last topic on index.php
- different icons for new / no new threads on index.php and new / no new posts on viewforum.php (?)
- add attachments / polls to posts
Don't hit me...
Those are examples of modifications that you want ported to extensions, not hooks.
index.php
- Hook to add column(s) before the forum column. For example, be able add icons to distinguish the different forums.
viewforum.php
- Hook to add column(s) before the subject column. In our case, the column is for thumbnails of items for sale. This column could also be use for post icons.
PunBB Forums → PunBB 1.3 extensions → Hook requests
Powered by PunBB, supported by Informer Technologies, Inc.