Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Hide What's going on from guests! Details »»
Hide What's going on from guests!
Version: 1.00, by borbole borbole is offline
Developer Last Online: Oct 2015 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.1.2 Rating:
Released: 03-03-2010 Last Update: Never Installs: 128
Template Edits
Re-useable Code Translations  
No support by the author.

This will hide the What''s going section from guests.

Find the following code at the Forumhome template:

HTML Code:
<!-- what's going on box -->
	<div id="wgo" class="collapse wgo_block block">
		<h2 class="blockhead">{vb:rawphrase whats_going_on}</h2>
		<div class="blockbody formcontrols floatcontainer">
			{vb:raw template_hook.forumhome_wgo_pos1}
			<vb:if condition="$show['loggedinusers']">
			<!-- logged-in users -->
			<div id="wgo_onlineusers" class="wgo_subblock section">
				<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase currently_active_users}" />{vb:rawphrase currently_active_users}</h3>
				<div>
					<p>{vb:rawphrase there_are_x_y_online_link, {vb:raw totalonline}, {vb:raw session.sessionurl_q}} <span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw numberregistered}, {vb:raw numberguest}}</span></p>
					<p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw recordusers}, {vb:raw recorddate}, {vb:raw recordtime}}</p>
					<vb:if condition="$activeusers">
					<ol class="commalist" id="wgo_onlineusers_list">
						<vb:each from="activeusers" value="loggedin">
							<li>{vb:stylevar dirmark}<a class="username" href="{vb:link member, {vb:raw loggedin}}">{vb:raw loggedin.musername}</a>{vb:raw loggedin.invisiblemark}{vb:raw loggedin.buddymark}{vb:raw loggedin.comma}</li>
						</vb:each>
					</ol>
					</vb:if>
				</div>
			</div>
			<!-- end logged-in users -->
			</vb:if>
			{vb:raw template_hook.forumhome_wgo_pos2}
			<vb:if condition="$show['upcomingevents']">
			<div id="wgo_events" class="wgo_subblock section">
				<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/event.png" alt="{vb:rawphrase todays_events}" /><vb:if condition="$show['todaysevents']">{vb:rawphrase todays_events}<vb:else />{vb:rawphrase upcoming_events_for_the_next_x_days, {vb:raw vboptions.showevents}}</vb:if></h3>
				<ol>
					{vb:raw upcomingevents}
				</ol>
			</div>
			</vb:if>
			{vb:raw template_hook.forumhome_wgo_pos3}
			<vb:if condition="$show['birthdays']">
			<!-- today's birthdays -->
			<div id="wgo_birthdays" class="wgo_subblock section">
				<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/birthday.png" alt="{vb:rawphrase todays_birthdays}" />{vb:rawphrase todays_birthdays}</h3>
				<ol class="commalist">
					<vb:each from="birthdays" value="row">
						<li><a href="{vb:link member, {vb:raw row}}">{vb:raw row.username}</a><vb:if condition="$row['age']"> ({vb:raw row.age})</vb:if>{vb:raw row.comma}</li>
					</vb:each>
				</ol>
			</div>
			<!-- end today's birthdays -->
			</vb:if>
			{vb:raw template_hook.forumhome_wgo_pos4}
			<div id="wgo_stats" class="wgo_subblock section">
				<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/forum_stats.png" alt="{vb:rawphrase x_statistics, {vb:raw vboptions.bbtitle}}" />{vb:rawphrase x_statistics, {vb:raw vboptions.bbtitle}}</h3>
				<div>
					<dl>
						<dt>{vb:rawphrase threads}</dt>
							<dd>{vb:raw totalthreads}</dd>
						<dt>{vb:rawphrase posts}</dt>
							<dd>{vb:raw totalposts}</dd>
						<dt>{vb:rawphrase members}</dt>
							<dd>{vb:raw numbermembers}</dd>
						<vb:if condition="$show['activemembers']">
                                                <dt>{vb:rawphrase active_members}</dt>
                                                         <dd>{vb:raw activemembers}</dd>
                                                </vb:if>
					</dl>
					<p>{vb:rawphrase welcome_to_our_newest_member_x, {vb:link member, {vb:raw newuserinfo}}, {vb:raw newuserinfo.username}}</p>
					{vb:raw template_hook.forumhome_wgo_stats}
				</div>
			</div>
			<div id="wgo_legend" class="wgo_subblock section">
				<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/legend.png" alt="{vb:rawphrase icon_legend}" />{vb:rawphrase icon_legend}</h3>
				<div>
					<dl id="icon_legends" class="icon_legends">
						<dt><img src="{vb:stylevar imgdir_statusicon}/forum_new-16.png" alt="{vb:rawphrase new_posts_forum}" /></dt><dd>{vb:rawphrase new_posts_forum}</dd>
						<dt><img src="{vb:stylevar imgdir_statusicon}/forum_old-16.png" alt="{vb:rawphrase no_new_posts_forum}" /></dt><dd>{vb:rawphrase no_new_posts_forum}</dd>
						<vb:if condition="$vboptions['showlocks']"><dt><img src="{vb:stylevar imgdir_statusicon}/forum_lock-16.png" alt="{vb:rawphrase forum_is_closed_for_posting}" /></dt><dd>{vb:rawphrase forum_is_closed_for_posting}</dd></vb:if>
						<dt><img src="{vb:stylevar imgdir_statusicon}/category-16.png" alt="{vb:rawphrase category_forum}" /></dt><dd>{vb:rawphrase category_forum}</dd>
						<dt><img src="{vb:stylevar imgdir_statusicon}/forum_link-16.png" alt="{vb:rawphrase link_forum}" /></dt><dd>{vb:rawphrase link_forum}</dd>
					{vb:raw template_hook.forumhome_icon_legend}
					</dl>
				</div>
			</div>
			{vb:raw template_hook.forumhome_wgo_pos5}
		</div>
	</div>
	<!-- end what's going on box -->
And replace it with:

HTML Code:
<vb:if condition="$show['guest']">
<div class="collapse wgo_block block" style="text-align: center;">
<h2 class="blockhead"><span>What's Going On is disabled for guests!</span></h2>
<div class="blockbody formcontrols floatcontainer" style="text-align: center;">		
<p>Hello there guest!<br />
To be able to view the Statistic Center, you must either <a href="register.php{vb:raw session.sessionurl_q}">{vb:rawphrase register}</a> or login. Thank you!</p>	
</div>	
</div>
<vb:else />
<!-- what's going on box -->
	<div id="wgo" class="collapse wgo_block block">
		<h2 class="blockhead">{vb:rawphrase whats_going_on}</h2>
		<div class="blockbody formcontrols floatcontainer">
			{vb:raw template_hook.forumhome_wgo_pos1}
			<vb:if condition="$show['loggedinusers']">
			<!-- logged-in users -->
			<div id="wgo_onlineusers" class="wgo_subblock section">
				<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase currently_active_users}" />{vb:rawphrase currently_active_users}</h3>
				<div>
					<p>{vb:rawphrase there_are_x_y_online_link, {vb:raw totalonline}, {vb:raw session.sessionurl_q}} <span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw numberregistered}, {vb:raw numberguest}}</span></p>
					<p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw recordusers}, {vb:raw recorddate}, {vb:raw recordtime}}</p>
					<vb:if condition="$activeusers">
					<ol class="commalist" id="wgo_onlineusers_list">
						<vb:each from="activeusers" value="loggedin">
							<li>{vb:stylevar dirmark}<a class="username" href="{vb:link member, {vb:raw loggedin}}">{vb:raw loggedin.musername}</a>{vb:raw loggedin.invisiblemark}{vb:raw loggedin.buddymark}{vb:raw loggedin.comma}</li>
						</vb:each>
					</ol>
					</vb:if>
				</div>
			</div>
			<!-- end logged-in users -->
			</vb:if>
			{vb:raw template_hook.forumhome_wgo_pos2}
			<vb:if condition="$show['upcomingevents']">
			<div id="wgo_events" class="wgo_subblock section">
				<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/event.png" alt="{vb:rawphrase todays_events}" /><vb:if condition="$show['todaysevents']">{vb:rawphrase todays_events}<vb:else />{vb:rawphrase upcoming_events_for_the_next_x_days, {vb:raw vboptions.showevents}}</vb:if></h3>
				<ol>
					{vb:raw upcomingevents}
				</ol>
			</div>
			</vb:if>
			{vb:raw template_hook.forumhome_wgo_pos3}
			<vb:if condition="$show['birthdays']">
			<!-- today's birthdays -->
			<div id="wgo_birthdays" class="wgo_subblock section">
				<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/birthday.png" alt="{vb:rawphrase todays_birthdays}" />{vb:rawphrase todays_birthdays}</h3>
				<ol class="commalist">
					<vb:each from="birthdays" value="row">
						<li><a href="{vb:link member, {vb:raw row}}">{vb:raw row.username}</a><vb:if condition="$row['age']"> ({vb:raw row.age})</vb:if>{vb:raw row.comma}</li>
					</vb:each>
				</ol>
			</div>
			<!-- end today's birthdays -->
			</vb:if>
			{vb:raw template_hook.forumhome_wgo_pos4}
			<div id="wgo_stats" class="wgo_subblock section">
				<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/forum_stats.png" alt="{vb:rawphrase x_statistics, {vb:raw vboptions.bbtitle}}" />{vb:rawphrase x_statistics, {vb:raw vboptions.bbtitle}}</h3>
				<div>
					<dl>
						<dt>{vb:rawphrase threads}</dt>
							<dd>{vb:raw totalthreads}</dd>
						<dt>{vb:rawphrase posts}</dt>
							<dd>{vb:raw totalposts}</dd>
						<dt>{vb:rawphrase members}</dt>
							<dd>{vb:raw numbermembers}</dd>
						<vb:if condition="$show['activemembers']">
                                                <dt>{vb:rawphrase active_members}</dt>
                                                         <dd>{vb:raw activemembers}</dd>
                                                </vb:if>
					</dl>
					<p>{vb:rawphrase welcome_to_our_newest_member_x, {vb:link member, {vb:raw newuserinfo}}, {vb:raw newuserinfo.username}}</p>
					{vb:raw template_hook.forumhome_wgo_stats}
				</div>
			</div>
			<div id="wgo_legend" class="wgo_subblock section">
				<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/legend.png" alt="{vb:rawphrase icon_legend}" />{vb:rawphrase icon_legend}</h3>
				<div>
					<dl id="icon_legends" class="icon_legends">
						<dt><img src="{vb:stylevar imgdir_statusicon}/forum_new-16.png" alt="{vb:rawphrase new_posts_forum}" /></dt><dd>{vb:rawphrase new_posts_forum}</dd>
						<dt><img src="{vb:stylevar imgdir_statusicon}/forum_old-16.png" alt="{vb:rawphrase no_new_posts_forum}" /></dt><dd>{vb:rawphrase no_new_posts_forum}</dd>
						<vb:if condition="$vboptions['showlocks']"><dt><img src="{vb:stylevar imgdir_statusicon}/forum_lock-16.png" alt="{vb:rawphrase forum_is_closed_for_posting}" /></dt><dd>{vb:rawphrase forum_is_closed_for_posting}</dd></vb:if>
						<dt><img src="{vb:stylevar imgdir_statusicon}/category-16.png" alt="{vb:rawphrase category_forum}" /></dt><dd>{vb:rawphrase category_forum}</dd>
						<dt><img src="{vb:stylevar imgdir_statusicon}/forum_link-16.png" alt="{vb:rawphrase link_forum}" /></dt><dd>{vb:rawphrase link_forum}</dd>
					{vb:raw template_hook.forumhome_icon_legend}
					</dl>
				</div>
			</div>
			{vb:raw template_hook.forumhome_wgo_pos5}
		</div>
	</div>
	<!-- end what's going on box -->
	</vb:if>
And replace the text I have placed with your own, that you want to show to guests instead of the What''s going on.

The end result can be seen at the attached screenshot.

Screenshots

File Type: png forum._1267721553932.png (6.4 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
Code Geass

Comments
  #72  
Old 11-28-2011, 10:35 PM
fookaa fookaa is offline
 
Join Date: Dec 2009
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by fookaa View Post
Hi,

Thanks for this, been looking around to find out how to do it

1 thing though....

See if as a guest you try to click on something you not permitted to view it redirects you to a big login box telling you you dont have permissions blaah login ect...

Can it not be made to just show that instead of the box you made ?

Ah ha

I found a nice way to do this

Instead of the code at the top use this

Code:
<vb:if condition="$show['guest']">
<vb:if condition="THIS_SCRIPT != 'register'" AND condition="$bbuserinfo['userid'] == 0">
	<meta HTTP-EQUIV="REFRESH" content="0; url=http://yoursite.com/subscription.php">
</vb:if>
<vb:else />
I put that under the

Code:
{vb:raw navbar}
Reply With Quote
  #73  
Old 11-30-2011, 03:10 PM
OldSchoolDSL OldSchoolDSL is offline
 
Join Date: Oct 2010
Posts: 1,196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The code has changed some, but this modification still works.

Installed 4.1.8
Reply With Quote
Благодарность от:
borbole
  #74  
Old 12-01-2011, 05:06 AM
bosanci28's Avatar
bosanci28 bosanci28 is offline
 
Join Date: Feb 2008
Location: USA - West Coast
Posts: 271
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed,works in vb 4.1.8! thanks.
Reply With Quote
Благодарность от:
borbole
  #75  
Old 02-23-2012, 03:52 AM
rfranklin rfranklin is offline
 
Join Date: Jan 2010
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone else have the commas disappear between online users for 4.1.10 or possibly earlier? I had to adjust the code to put them back in. Just curious.

Other than that it works great still.
Reply With Quote
  #76  
Old 04-23-2012, 03:09 PM
stealhead_dan stealhead_dan is offline
 
Join Date: Sep 2003
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

instead of

HTML Code:
{vb: raw birthdays}
in the modified code for version 4.1.12 you need to change replace the code with


HTML Code:
<vb:each from="birthdays" value="row">
						<li><a href="{vb:link member, {vb:raw row}}">{vb:raw row.username}</a><vb:if condition="$row['age']"> ({vb:raw row.age})</vb:if>{vb:raw row.comma}</li>
					</vb:each>
otherwise you get the word ARRAY showing for birthdays

works otherwise
Reply With Quote
  #77  
Old 05-10-2012, 12:00 PM
marccap's Avatar
marccap marccap is offline
 
Join Date: Feb 2012
Location: uk
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by stealhead_dan View Post
instead of

HTML Code:
{vb: raw birthdays}
in the modified code for version 4.1.12 you need to change replace the code with


HTML Code:
<vb:each from="birthdays" value="row">
						<li><a href="{vb:link member, {vb:raw row}}">{vb:raw row.username}</a><vb:if condition="$row['age']"> ({vb:raw row.age})</vb:if>{vb:raw row.comma}</li>
					</vb:each>
otherwise you get the word ARRAY showing for birthdays

works otherwise
Thanks for that as it shows array for me on 4.1.12 :up:
Reply With Quote
  #78  
Old 05-10-2012, 01:10 PM
New Joe's Avatar
New Joe New Joe is offline
 
Join Date: May 2009
Posts: 1,128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't get this.
I have options set on my Forum so guests can't see 'what's going on' without having to do anything like this.
Reply With Quote
Благодарность от:
djbaxter
  #79  
Old 05-10-2012, 01:26 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What options?
Reply With Quote
  #80  
Old 05-10-2012, 01:56 PM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by New Joe View Post
I don't get this.
I have options set on my Forum so guests can't see 'what's going on' without having to do anything like this.
Quote:
Originally Posted by Boofo View Post
What options?
1. Admin CP >> Usergroup >> Usergroup Manager

2. select Usergroup: Unregistered / Not Logged In

3. Who's Online Permissions -> Set all to No

No add-on needed. Already built in.
Reply With Quote
  #81  
Old 05-10-2012, 02:17 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That doesn't hide the whole What's Going On box, though, like this mod does.
Reply With Quote
Благодарность от:
djbaxter
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 10:48 AM.


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.07963 seconds
  • Memory Usage 2,388KB
  • Queries Executed 26 (?)
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
  • (2)bbcode_code
  • (6)bbcode_html
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (5)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete