The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
create new plugin
Hook Location: threadbit_display Title: usergroup check for threadstarter in threadbit Plugin PHP Code: PHP Code:
You could do Code:
<vb:if condition="in_array(6, $group)">This thread starter is in admin group</vb:if> This checks the primary and additional groups of a thread starter. |
#12
|
|||
|
|||
Thanks!
Like Lynne said about the additional queries, I really only want to do this one or two sections of the forum. Is there anyway to have the plug-in only run that query for specific forums? |
#13
|
||||
|
||||
PHP Code:
|
Благодарность от: | ||
kh99 |
#14
|
|||
|
|||
When I go to save the threadbit template after inserting your if conditional, I get the following error message:
"Warning: Invalid argument supplied for foreach() in [path]/includes/functions.php on line 3568 Forum Message The following error occurred when attempting to evaluate this template: %1$s This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish." |
#15
|
||||
|
||||
Quote:
The code works, I just messed up the "Specific forums" conditional. if (in_array($thread['forumid'], array(1,2,3))) please review other mods and vB code for proper usage. But other than that, the code is sound, and taken directly from forumdisplay.php --------------- Added [DATE]1361811270[/DATE] at [TIME]1361811270[/TIME] --------------- Quote:
--------------- Added [DATE]1361811317[/DATE] at [TIME]1361811317[/TIME] --------------- i didnt even mess up the conditional it all works 100% --------------- Added [DATE]1361811597[/DATE] at [TIME]1361811597[/TIME] --------------- It was throwing an error, try this code PHP Code:
|
#16
|
||||
|
||||
change 3,4,5 to forums you want it ran in.
--------------- Added [DATE]1361812033[/DATE] at [TIME]1361812033[/TIME] --------------- PHP Code:
|
#17
|
|||
|
|||
Still getting the same error.
I'm using vb 4.1.12 if that makes any difference (since you said you tested on 4.2)? I don't believe I have any mods doing anything in the threaddisplay hook or threadbit template at all so I can't think of what might be conflicting |
#18
|
||||
|
||||
post me the conditional you are using exactly as is. or just post the contents of threadbit template in code tags.
|
#19
|
||||
|
||||
I dont know
|
#20
|
||||
|
||||
lol, ridiculous.
--------------- Added [DATE]1361827948[/DATE] at [TIME]1361827948[/TIME] --------------- then when you upgrade its something else to remember to change. --------------- Added [DATE]1361828625[/DATE] at [TIME]1361828625[/TIME] --------------- also, my code accounts not only a users primary usergroup, but additional usergroups as well. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|