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

Reply
 
Thread Tools Display Modes
  #1  
Old 01-17-2003, 10:52 PM
Figment Figment is offline
 
Join Date: Nov 2001
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default I want to hide $activeusers and $browsers from guests

Searched high and low and cannot find a hack that would allow me to hide active user and browsing user information from specific user groups (in particular, guests)

Does anyone know of such a thing??

TIA
Reply With Quote
  #2  
Old 01-18-2003, 03:51 PM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In index.php find:

PHP Code:
      eval("\$activeusers .= \", ".gettemplate('forumhome_loggedinuser')."\";");
    }
  }
  
$DB_site->free_result($loggedins); 
replace with:

PHP Code:
      eval("\$activeusers .= \", ".gettemplate('forumhome_loggedinuser')."\";");
    }
  }
  
$DB_site->free_result($loggedins);
  
  if (
$bbuserinfo[userid]==0) {
    
$activeusers="";
  } 
now in forumdisplay.php fine:

PHP Code:
        }
        eval(
"\$onlineusers .= \"".gettemplate('forumdisplay_loggedinusers')."\";");
    }

and replace with:

PHP Code:
        }
        eval(
"\$onlineusers .= \"".gettemplate('forumdisplay_loggedinusers')."\";");
    }
}
  if (
$bbuserinfo[userid]==0) {
    
$browsers="";
  } 
that should do it..
Reply With Quote
  #3  
Old 01-18-2003, 08:07 PM
Figment Figment is offline
 
Join Date: Nov 2001
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the reply.

Sorry, I obviously didn't explain very clearly. Your solution does part of what I am trying to achieve. On the forum homepage, I want to hide the entire section (see attached) from guests

Edit: Unless I did something wrong (which I have checked many times) it seems to be working so the guests can see the loggedinusers template, whilst as admin I cannot !
Attached Images
File Type: jpg online.jpg (14.3 KB, 0 views)
Reply With Quote
  #4  
Old 01-20-2003, 01:08 PM
Silenced Soul's Avatar
Silenced Soul Silenced Soul is offline
 
Join Date: Apr 2002
Location: holdin' it down for tha 303
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it should work, check and make sure that you didn't change on of the $bbuserinfo[userid]==0. Because if you set it to anything, such as 1 or such, then one of your members, in this case, you cannot see it whilst the guests can.

If that doesn't work, try putting:

PHP Code:
eval("\$activeusers .= \", ".gettemplate('forumhome_loggedinuser')."\";");
    }
  }
  
$DB_site->free_result($loggedins);
  
  if (
$bbuserinfo[userid]==&& $bbuserinfo[usergroupid]==1]) {
    
$activeusers="";
  } 
PHP Code:
}
        eval(
"\$onlineusers .= \"".gettemplate('forumdisplay_loggedinusers')."\";");
    }
}
  if (
$bbuserinfo[userid]==&& $bbuserinfo[usergroupid]==1) {
    
$browsers="";
  } 
that might make the fix.
Reply With Quote
  #5  
Old 01-20-2003, 10:02 PM
Figment Figment is offline
 
Join Date: Nov 2001
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Silenced soul.

Tried your version, got a parse error in index.php on the if...... line

Retried with Neos suggestion and the names of the logged in users and browsers are no longer visible to guests, but the forumhome_loggedinusers template is still visible (albeit without any names)

I could really do with this template not being visible to guests either, as it shows the number of members/guests online, which I would prefer them not to see.

Any more ideas?

TIA
Reply With Quote
  #6  
Old 01-21-2003, 01:43 AM
nuno's Avatar
nuno nuno is offline
 
Join Date: Oct 2001
Posts: 469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

index.php
find
PHP Code:
if ($displayloggedin
replace with
PHP Code:
if ($displayloggedin and $bbuserinfo[userid] >= 1
forumdisplay.php
find
PHP Code:
if ($showforumusers
replace with
PHP Code:
if ($showforumusers and $bbuserinfo[userid] >= 1
That's all folks.
Reply With Quote
  #7  
Old 01-21-2003, 06:18 AM
Figment Figment is offline
 
Join Date: Nov 2001
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Nuno, that did the trick

Thanks to you other guys for your help too
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 02:31 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.04067 seconds
  • Memory Usage 2,256KB
  • Queries Executed 12 (?)
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
  • (10)bbcode_php
  • (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
  • (1)postbit_attachment
  • (7)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_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
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete