Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #21  
Old 03-30-2004, 02:24 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Then use the code I posted with bbuserinfo instead of post and see if that works.
Reply With Quote
  #22  
Old 03-30-2004, 02:28 PM
Yahhoon23 Yahhoon23 is offline
 
Join Date: Dec 2003
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah I did.

Maybe I didn't explain myself too well after u responded saying yes.

I asked if "<if condition="in_array(is_member_of($bbuserinfo, array(5,6,7,9)))">$quickreply</if>

in the same spot around $quickreply in the showthread template ?" was what I was supposed to use.

You replied with Yes.

So then I said well it still didn't work and it was giving me that error message at the top when viewing thread.

So obviously it creates an error along with not working using that code provided "<if condition="in_array(is_member_of($bbuserinfo, array(5,6,7,9)))">$quickreply</if>"
Reply With Quote
  #23  
Old 03-30-2004, 02:30 PM
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Senior Member
 
Join Date: Jan 2002
Location: Southern California
Posts: 1,694
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zachery
post is done per postbit part, and post isnt a varible that should be active on the showthread page at the bottom.
Even if $post was available, it would contain the userid of the last person to post in the thread, not the person viewing the thread.
Reply With Quote
  #24  
Old 03-30-2004, 02:30 PM
Yahhoon23 Yahhoon23 is offline
 
Join Date: Dec 2003
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I made one error. I had two instances of $quickreply. So I removed that, and now the quick reply box is gone for me, which isn't what I want, since I am the 7 usergroup.

The Warning: at the top still stays.

So basically it did the exact opposite of what I wanted it to do.
Reply With Quote
  #25  
Old 03-30-2004, 02:30 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to REPLACE $quickreply in the showthread template with that code.
Reply With Quote
  #26  
Old 03-30-2004, 02:33 PM
Yahhoon23 Yahhoon23 is offline
 
Join Date: Dec 2003
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, Re-read above post. I was posting it underneath $quickreply. So after removing that one, the Warning Parameter message stays when viewing thread, but the quick reply box is gone when it should still be there for my usergroup
Reply With Quote
  #27  
Old 03-30-2004, 02:33 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Wayne Luke
Even if $post was available, it would contain the userid of the last person to post in the thread, not the person viewing the thread.
So, you're saying using $post in that code wouldn't work?
Reply With Quote
  #28  
Old 03-30-2004, 02:34 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Yahhoon23
Yeah, Re-read above post. I was posting it underneath $quickreply. So after removing that one, the Warning Parameter message stays when viewing thread, but the quick reply box is gone when it should still be there for my usergroup
Like I said, try using the code I posted that uses the separate instances with the OR and change $post to $bbuserinfo.
Reply With Quote
  #29  
Old 03-30-2004, 02:35 PM
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Senior Member
 
Join Date: Jan 2002
Location: Southern California
Posts: 1,694
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
<if condition="in_array(is_member_of($bbuserinfo, array(5,6,7,9)))">$quickreply</if>
This will not work because it is incorrect logic. the structure for in_array has two required variables:
bool in_array ( mixed needle, array haystack [, bool strict])

The code above is only submitting one variable parameter, the result of the is_member_of () call. Secondly, is_member_of() does not account for an array of ID's to be passed to it. But only takes a single userid.

So, you would need to either install the change by Merk which allows an array to be sent to is_member_of or use individual conditions as outlined above but matching against $bbuserinfo instead of $post.
Reply With Quote
  #30  
Old 03-30-2004, 02:37 PM
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Senior Member
 
Join Date: Jan 2002
Location: Southern California
Posts: 1,694
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
So, you're saying using $post in that code wouldn't work?
Not to provide a reliable answer based on the viewer's permissions.

$post is an array that contains specific information about a post which is the information from the post table joined with the user table information of the person who made the post.
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 07:45 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
  • Page Generation 0.04390 seconds
  • Memory Usage 2,256KB
  • Queries Executed 11 (?)
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
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete