Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-02-2004, 04:02 PM
dom' puiu dom' puiu is offline
 
Join Date: Jul 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 09-02-2004, 04:07 PM
nexialys
Guest
 
Posts: n/a
Default

because your $vboptions['spc_forumid'] is not an array in itself... that's all. you can't explode something that contain nothing.
Reply With Quote
  #3  
Old 09-02-2004, 04:14 PM
dom' puiu dom' puiu is offline
 
Join Date: Jul 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 09-02-2004, 04:41 PM
rake's Avatar
rake rake is offline
 
Join Date: Nov 2002
Posts: 311
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 09-02-2004, 04:45 PM
dom' puiu dom' puiu is offline
 
Join Date: Jul 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 09-02-2004, 04:53 PM
Tigga's Avatar
Tigga Tigga is offline
 
Join Date: Dec 2001
Location: Atlanta
Posts: 1,061
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to add $groupidul to the global variables section for your 'construct_postbit' function.
Reply With Quote
  #7  
Old 09-02-2004, 05:28 PM
dom' puiu dom' puiu is offline
 
Join Date: Jul 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it works!!!!!!!!!! thanks!!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:38 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04424 seconds
  • Memory Usage 2,211KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (6)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete