2016-03-26, 04:06 PM
I (and several others) need to extend handling not permitted forums. Forums with no read permission should
a) be shown locked and having no link to enter them
b) show last post data because then guests still can see that the board is active
Like this:
example for forum view as permitted member:
[attachment=35972]
example for forum view as NOT permitted member:
[attachment=35971]
So I need to write a plugin that does the different lock handling.
In functions_forumlist.php there exists a hook ($forum = $plugins->run_hooks("build_forumbits_forum", $forum)) BEFORE all the interesting stuff is being managed:
Setting lock icon, forum url, lastpost data, lastpost template, counters for posts and threads
So if I want to count the counters on my own (because they aren't counted) and add lastpost-information, that has been blanked out, and if I want to modify the lock icon and the forum url, I need an additional hook right before this line:
The new hook should work like the existing one, perhaps something like this:
Pretty please?
a) be shown locked and having no link to enter them
b) show last post data because then guests still can see that the board is active
Like this:
example for forum view as permitted member:
[attachment=35972]
example for forum view as NOT permitted member:
[attachment=35971]
So I need to write a plugin that does the different lock handling.
In functions_forumlist.php there exists a hook ($forum = $plugins->run_hooks("build_forumbits_forum", $forum)) BEFORE all the interesting stuff is being managed:
Setting lock icon, forum url, lastpost data, lastpost template, counters for posts and threads
So if I want to count the counters on my own (because they aren't counted) and add lastpost-information, that has been blanked out, and if I want to modify the lock icon and the forum url, I need an additional hook right before this line:
// Add the forum to the list
eval("\$forum_list .= \"".$templates->get("forumbit_depth$depth$forumcat")."\";");
The new hook should work like the existing one, perhaps something like this:
$forum = $plugins->run_hooks("after_build_forumbits_forum", $forum);
Pretty please?