The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
i have a problem with a special counter
I have the following problem:
in my forum i have a special counter. i want this counter to apper in the showthread section of the forum. but only at the users from some usergroups i set. i modified the postbit template: <if condition="in_array('$bbuserinfo[usergroupid]', $groupidul)"> $vboptions[spc_name]: $post[spc_posts]<br> </if> and in the phpinclude_start i have put this: $groupidul=explode(", ",$vboptions['spc_forumid']); but i get the following error: Warning: in_array(): Wrong datatype for second argument in /home/virtual/site13/fst/var/www/html/forum/includes/functions_showthread.php(640) : eval()'d code on line 67 i know that it sais the $groupidul is not an array but i dont know why |
#2
|
|||
|
|||
because your $vboptions['spc_forumid'] is not an array in itself... that's all. you can't explode something that contain nothing.
|
#3
|
|||
|
|||
i have changed functions_databuild.php this way:
$spc_forumid=explode(", ",$vboptions['spc_forumid']); $spc_usergroupid=explode(", ",$vboptions['spc_usergroupid']); if($vboptions['spc_status']==1 && in_array("$threadinfo[forumid]",$spc_forumid) && in_array("$bbuserinfo[usergroupid]",$spc_usergroupid)){ .............some code............... } and it works. it doesn't shows errors. |
#4
|
||||
|
||||
Quote:
dom' puiu, does it work? vBulletin generally doesn't spit out errors if something doesn't work, it just shows blank pages. Salut. |
#5
|
|||
|
|||
no it doesn't works. it shows the forum. but on the top of the page it gives me that error.
and i don't get the picture. |
#6
|
||||
|
||||
You need to add $groupidul to the global variables section for your 'construct_postbit' function.
|
#7
|
|||
|
|||
it works!!!!!!!!!! thanks!!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|