![]() |
Plugin using global_complete hook, cant exclude from a forum using if conditional
This is replacement code from kh99, using global_complete hook, its works good
Code:
$find = 'Post New Thread'; but now i want to exclude a forum already tried wrap it using below if conditional, but its not works Code:
if ($foruminfo['forumid'] != 123) Code:
if ($thread['forumid'] != 123) Code:
if ($post['forumid'] != 123) please help guys |
Try the hook location "forum_display_start" and the plugin PHP code:
PHP Code:
|
its not only for forumdisplay, but for showthread too
it is better using forum_display_start hook or global_complete? |
You have a "Post New Thread" button on your "showthread" pages?
|
Quote:
|
Ah okay, your initial post led me to believe you were trying to change the text that displays in the "Post New Thread" button. :)
|
Quote:
so what is the right if conditional to exclude a forum with global_complete hook? |
The forumid data does not appear to be available at that hook.
|
try $GLOBAL['forumid']
|
Quote:
Code:
if ($GLOBAL['forumid'] != 123) any other code? Quote:
|
global_complete is one of the last things called. I think what you want is something like global_setup_complete.
I was looking at code a little, and while I'm sure in th past I've suggested that people use $forumid or $GLOBALS['forumid'] (it has an 'S' at the end), it looks like that's a bad one to use unless you're using a hook that's only called on forum.php. It looks like most of the time, $foruminfo['forumid'] is what you'd want (unless you know you're interested in $threadinfo or $post). |
Quote:
global_setup_complete hook not works thank you kh99, MarkFL & Easy5s.net |
Quote:
|
All times are GMT. The time now is 05:20 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|