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

Reply
 
Thread Tools Display Modes
  #1  
Old 06-16-2006, 08:00 PM
moonclamp's Avatar
moonclamp moonclamp is offline
 
Join Date: May 2004
Location: London
Posts: 516
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default conditional for "who is online"

I've created a usergroup for people who's contact info I want hidden (email form, messenger details etc) regardless of what they have entered before.

I've got <if condition="$bbuserinfo[usergroupid] == 15"><else /> for the templates that they might see

I've got <if condition="$userinfo[usergroupid] == 15"><else /> for the memberinfo template

I've got <if condition="$post[usergroupid] == 15"><else /> for the postbit template

However I can't find anything that works for the who's online page

<if condition="$vboptions[usergroupid] == 15"></else> doesn't seem to do anything, neither do any of the above.

Any suggestions?
Reply With Quote
  #2  
Old 06-16-2006, 10:23 PM
Freesteyelz's Avatar
Freesteyelz Freesteyelz is offline
 
Join Date: Jan 2006
Posts: 1,552
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try:
Code:
<if condition="is_member_of($post,15)">
<else />
Who's online codes here...
</if>
The $post is the display conditional. Meaning Usergroup 15 will not have their info (e.g., e-mail, IM's) displayed in Who's Online.

*Note:
$post = Content that's displayed on page.
$bbuserinfo = Restriction or allowance to the end user (the one who's viewing the page).
Reply With Quote
  #3  
Old 06-16-2006, 10:58 PM
moonclamp's Avatar
moonclamp moonclamp is offline
 
Join Date: May 2004
Location: London
Posts: 516
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cheers, I've tried that like this and it doesn't do a thing, this is in the whosonlinebit template

<if condition="is_member_of($post,15)"><else />
$userinfo[aimicon]
$userinfo[icqicon]
$userinfo[msnicon]
$userinfo[yahooicon]
</if>
Reply With Quote
  #4  
Old 06-16-2006, 11:12 PM
Freesteyelz's Avatar
Freesteyelz Freesteyelz is offline
 
Join Date: Jan 2006
Posts: 1,552
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You have it in reversed that's why. It should be:

Code:
<if condition="is_member_of($post,15)">
<else /> 
$userinfo[aimicon]
$userinfo[icqicon]
$userinfo[msnicon]
$userinfo[yahooicon]
</if>
In between the <if> and <else /> is what you do not want to display for Usergroup 15.
Reply With Quote
  #5  
Old 06-16-2006, 11:13 PM
moonclamp's Avatar
moonclamp moonclamp is offline
 
Join Date: May 2004
Location: London
Posts: 516
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

doh ... I need to sleep more

Edit: No I don't, that hides everything for everyone
Reply With Quote
  #6  
Old 06-17-2006, 12:21 AM
Freesteyelz's Avatar
Freesteyelz Freesteyelz is offline
 
Join Date: Jan 2006
Posts: 1,552
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That code will work on most vB pages. I'm wondering, then, if the conditional can't detect the Usergroups that show up on Who's Online. If that's the case then a template conditional may not help; you'll may need to look at a PHP edit.
Reply With Quote
  #7  
Old 06-17-2006, 02:55 AM
moonclamp's Avatar
moonclamp moonclamp is offline
 
Join Date: May 2004
Location: London
Posts: 516
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Freesteyelz
That code will work on most vB pages. I'm wondering, then, if the conditional can't detect the Usergroups that show up on Who's Online. If that's the case then a template conditional may not help; you'll may need to look at a PHP edit.
Yeah that's what i'm wondering too. Thanks for helping though.
Reply With Quote
  #8  
Old 06-17-2006, 05:02 AM
Freesteyelz's Avatar
Freesteyelz Freesteyelz is offline
 
Join Date: Jan 2006
Posts: 1,552
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm sorry I couldn't be of much help. If you do find a solution please post back so others can benefit from it.
Reply With Quote
  #9  
Old 06-17-2006, 05:47 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

AFAIK, the WOL uses $userinfo, not $post, changing that should work.
Reply With Quote
  #10  
Old 06-17-2006, 09:22 AM
moonclamp's Avatar
moonclamp moonclamp is offline
 
Join Date: May 2004
Location: London
Posts: 516
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's what I tried in the firstplace.

if condition="$userinfo[usergroupid] == 15">

doesn't work so I tried this

<if condition="is_member_of($userinfo,15)">

and still nothing, I'm thinking that online.php needs something adding to it.
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 11:41 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.06090 seconds
  • Memory Usage 2,252KB
  • 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
  • (2)bbcode_code
  • (1)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
  • (1)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