vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Mini Mods - Hide What's going on from guests! (https://vborg.vbsupport.ru/showthread.php?t=237485)

borbole 08-09-2010 02:53 PM

Quote:

Originally Posted by djbaxter (Post 2081324)
Wouldn't that show What's Going On to everybody EXCEPT Admins?

Sorry, if I wasn''t clearer at my previous post. I updated it with the exact code I posted here.

You should do that in reverse with the new condition. i.e. replace the what is going code with this other code:

HTML Code:

<vb:if condition="is_member_of($bbuserinfo, 6)">
<!-- what's going on box -->
        <div id="wgo" class="collapse wgo_block">
                <h2>
                <span>{vb:rawphrase whats_going_on}</span>
                </h2>
                <div class="floatcontainer">
                        {vb:raw template_hook.forumhome_wgo_pos1}
                        <vb:if condition="$show['loggedinusers']">
                        <!-- logged-in users -->
                        <div id="wgo_onlineusers" class="wgo_subblock">
                                <h3><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_online, {vb:raw totalonline}} <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>
                                        <ol class="commalist" id="wgo_onlineusers_list">
                                                {vb:raw activeusers}
                                        </ol>
                                </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">
                                <h3><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">
                                <h3><img src="{vb:stylevar imgdir_misc}/birthday.png" alt="{vb:rawphrase todays_birthdays}" />{vb:rawphrase todays_birthdays}</h3>
                                <ol class="commalist">
                                        {vb:raw birthdays}
                                </ol>
                        </div>
                        <!-- end today's birthdays -->
                        </vb:if>
                        {vb:raw template_hook.forumhome_wgo_pos4}
                        <div id="wgo_stats" class="wgo_subblock">
                                <h3><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">
                                <h3><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>
                                                <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:if condition="$vboptions['pt_hasprojectforums']">
                                                <dt><img src="{vb:stylevar imgdir_statusicon}/project_new-16.png" alt="{vb:rawphrase project_forum}" /></dt><dd>{vb:rawphrase project_forum}</dd>
                                        </vb:if>
                                        </dl>
                                </div>
                        </div>
                        {vb:raw template_hook.forumhome_wgo_pos5}
                </div>
        </div>
        <!-- end what's going on box -->
        <vb:else />
        <div class="collapse wgo_block" style="text-align: center;">
<h2><span>What's Going On is disabled for guests!</span></h2>
<div class="wgo_subblock" 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:if>


Dragonsys 08-09-2010 06:29 PM

Quote:

Originally Posted by djbaxter (Post 2081324)
Wouldn't that show What's Going On to everybody EXCEPT Admins?

no, it would only show to whatever group ID you put in place of the x (6 for Admins for example).

you would have to add a ! to make it for all except the group ID you select.

djbaxter 08-09-2010 07:10 PM

Quote:

Originally Posted by Dragonsys (Post 2081428)
no, it would only show to whatever group ID you put in place of the x (6 for Admins for example).

you would have to add a ! to make it for all except the group ID you select.

For the original script, that code would exclude Admins only from seeing WGO. For the amended script posted just above, it will ONLY show WGO to Admins.

borbole 08-09-2010 07:33 PM

Quote:

Originally Posted by djbaxter (Post 2081447)
For the original script, that code would exclude Admins only from seeing WGO. For the amended script posted just above, it will ONLY show WGO to Admins.

At my other post I said only that with the new code yous hould do the changes in reverse but forgot to post the whole code change. Anyway, it is not what you asked that, only admins be able to see the WGO section?

djbaxter 08-09-2010 08:08 PM

Quote:

Originally Posted by borbole (Post 2081458)
At my other post I said only that with the new code yous hould do the changes in reverse but forgot to post the whole code change. Anyway, it is not what you asked that, only admins be able to see the WGO section?

Yes it is. I was merely clarifying the post by Dragonsys.

I haven't tried your code yet - haven't had time - but it looks as though it should work perfectly.

borbole 08-09-2010 08:19 PM

Quote:

Originally Posted by djbaxter (Post 2081474)
Yes it is. I was merely clarifying the post by Dragonsys.

I haven't tried your code yet - haven't had time - but it looks as though it should work perfectly.

Ah, ok. Yes, it will work fine :)

rfranklin 08-10-2010 02:19 PM

Quote:

Originally Posted by borbole (Post 2081294)
That is beyond the scope of this mod. it is something entirely different.

I thought so but I thought I would ask. Thanks again for this mod though. Works great! :)

borbole 08-10-2010 02:20 PM

Quote:

Originally Posted by rfranklin (Post 2081733)
I thought so but I thought I would ask. Thanks again for this mod though. Works great! :)

Youa re welcome :)

peugeot405 08-14-2010 10:19 PM

Quote:

Originally Posted by borbole (Post 2081337)
Sorry, if I wasn''t clearer at my previous post. I updated it with the exact code I posted here.

You should do that in reverse with the new condition. i.e. replace the what is going code with this other code:

HTML Code:

<vb:if condition="is_member_of($bbuserinfo, 6)">
<!-- what's going on box -->
        <div id="wgo" class="collapse wgo_block">
                <h2>
                <span>{vb:rawphrase whats_going_on}</span>
                </h2>
                <div class="floatcontainer">
                        {vb:raw template_hook.forumhome_wgo_pos1}
                        <vb:if condition="$show['loggedinusers']">
                        <!-- logged-in users -->
                        <div id="wgo_onlineusers" class="wgo_subblock">
                                <h3><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_online, {vb:raw totalonline}} <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>
                                        <ol class="commalist" id="wgo_onlineusers_list">
                                                {vb:raw activeusers}
                                        </ol>
                                </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">
                                <h3><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">
                                <h3><img src="{vb:stylevar imgdir_misc}/birthday.png" alt="{vb:rawphrase todays_birthdays}" />{vb:rawphrase todays_birthdays}</h3>
                                <ol class="commalist">
                                        {vb:raw birthdays}
                                </ol>
                        </div>
                        <!-- end today's birthdays -->
                        </vb:if>
                        {vb:raw template_hook.forumhome_wgo_pos4}
                        <div id="wgo_stats" class="wgo_subblock">
                                <h3><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">
                                <h3><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>
                                                <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:if condition="$vboptions['pt_hasprojectforums']">
                                                <dt><img src="{vb:stylevar imgdir_statusicon}/project_new-16.png" alt="{vb:rawphrase project_forum}" /></dt><dd>{vb:rawphrase project_forum}</dd>
                                        </vb:if>
                                        </dl>
                                </div>
                        </div>
                        {vb:raw template_hook.forumhome_wgo_pos5}
                </div>
        </div>
        <!-- end what's going on box -->
        <vb:else />
        <div class="collapse wgo_block" style="text-align: center;">
<h2><span>What's Going On is disabled for guests!</span></h2>
<div class="wgo_subblock" 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:if>


sorry for my late replay.

working great now, but i seem to have a new problem.

I recently installed the site link manager on my board which is using
Code:

{vb:raw template_hook.forumhome_wgo_pos5}
so now those links are also hidden.

is there a way te solve this?

borbole 08-15-2010 01:27 PM

Quote:

Originally Posted by peugeot405 (Post 2083982)
sorry for my late replay.

working great now, but i seem to have a new problem.

I recently installed the site link manager on my board which is using
Code:

{vb:raw template_hook.forumhome_wgo_pos5}
so now those links are also hidden.

is there a way te solve this?


You will have to ask at that other mod''s thread about this.


All times are GMT. The time now is 03:51 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.01407 seconds
  • Memory Usage 1,848KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_html_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete