vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   i have a problem with a special counter (https://vborg.vbsupport.ru/showthread.php?t=69010)

dom' puiu 09-02-2004 04:02 PM

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

nexialys 09-02-2004 04:07 PM

because your $vboptions['spc_forumid'] is not an array in itself... that's all. you can't explode something that contain nothing.

dom' puiu 09-02-2004 04:14 PM

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.

rake 09-02-2004 04:41 PM

Quote:

Originally Posted by nexialys
because your $vboptions['spc_forumid'] is not an array in itself... that's all. you can't explode something that contain nothing.

It needs to be a string, not an array. You're exploding a string, to get an array.


dom' puiu, does it work? vBulletin generally doesn't spit out errors if something doesn't work, it just shows blank pages.

Salut. ;)

dom' puiu 09-02-2004 04:45 PM

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.

Tigga 09-02-2004 04:53 PM

You need to add $groupidul to the global variables section for your 'construct_postbit' function.

dom' puiu 09-02-2004 05:28 PM

it works!!!!!!!!!! thanks!!


All times are GMT. The time now is 02:08 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00970 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete