vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Hide the admin "current activity" in profile? (https://vborg.vbsupport.ru/showthread.php?t=210684)

brandonroy 04-09-2009 06:53 PM

Quote:

Originally Posted by Lynne (Post 1787394)
Ah, I see. Try changing it to:
HTML Code:

<if condition="$prepared['userid'] != '2'">
the code that shows current activity
</if>

That should show the activity unless you are on member #2's page. Test it and see. You may have to use $userinfo instead of $prepared in other templates.

Awesome! Works great. Thanks Lynne ;)

g0dfather1984 04-11-2009 07:05 PM

Thank you both for this information.

One question, what would one put to hide the last activity?

I have the current activity hiding, but now want last activity as well.

Thank you once again.

Lynne 04-11-2009 07:07 PM

Quote:

Originally Posted by g0dfather1984 (Post 1789176)
Thank you both for this information.

One question, what would one put to hide the last activity?

I have the current activity hiding, but now want last activity as well.

Thank you once again.

Put the same condition around the lines for last activity. It should be right above the current activity line.

g0dfather1984 04-11-2009 07:42 PM

Sorry, having a brain lapse here. This is what I have but it's currently not working. What am I doing wrong?

<!-- current activity -->
<if condition="$prepared['userid'] != '1'">
</if>
<if condition="$prepared['lastactivitydate'] OR $prepared['action']">
<div class="alt2 smallfont block_row" id="activity_info">
<if condition="$prepared['lastactivitydate']">
<div id="last_online">
<span class="shade">$vbphrase[last_activity]:</span> $prepared[lastactivitydate]<if condition="!$show['detailedtime']"><if condition="$prepared['userid'] != '1'">
</if> <span class="time">$prepared[lastactivitytime]</span></if>
</div>
</if>
<if condition="$prepared['action']">
<span class="shade">$vbphrase[current_activity]:</span> $prepared[action] $prepared[where]
</if>
</div>
</if>
<!-- / current activity -->

Lynne 04-11-2009 08:57 PM

You realize you opened the condition on line 2 and closed it on line 3 with nothing in it? And then you did that again?

You probably want something like this (not tested - you will have to test it):
HTML Code:

<if condition="$prepared['userid'] != '1'">
                <!-- current activity -->
                <if condition="$prepared['lastactivitydate'] OR $prepared['action']">
                    <div class="alt2 smallfont block_row" id="activity_info">
                        <if condition="$prepared['lastactivitydate']">
                            <div id="last_online">
                                <span class="shade">$vbphrase[last_activity]:</span> $prepared[lastactivitydate]<if condition="!$show['detailedtime']"> <span class="time">$prepared[lastactivitytime]</span></if>
                            </div>
                        </if>
                        <if condition="$prepared['action']">
                            <span class="shade">$vbphrase[current_activity]:</span> $prepared[action] $prepared[where]
                        </if>
                    </div>
                </if>
                <!-- / current activity -->
</if>

That shows the current activity of everyone's profile except userid 1. If that give an error, combine the first two conditions into one.

g0dfather1984 04-11-2009 09:22 PM

Thank you, Lynne. Works great.

MoviePropCollec 04-12-2009 01:21 AM

Where do we put that?

Meaning Admin CP>Templates> etc like that.

Thanks ;)

Lynne 04-12-2009 01:43 AM

It's from the MEMBERINFO template, I believe. You can always take the comment line and do a Search in Template and find it.

Dingo14 04-13-2009 04:43 AM

Quote:

Originally Posted by Lynne (Post 1789238)
You realize you opened the condition on line 2 and closed it on line 3 with nothing in it? And then you did that again?

You probably want something like this (not tested - you will have to test it):
HTML Code:

<if condition="$prepared['userid'] != '1'">
                <!-- current activity -->
                <if condition="$prepared['lastactivitydate'] OR $prepared['action']">
                    <div class="alt2 smallfont block_row" id="activity_info">
                        <if condition="$prepared['lastactivitydate']">
                            <div id="last_online">
                                <span class="shade">$vbphrase[last_activity]:</span> $prepared[lastactivitydate]<if condition="!$show['detailedtime']"> <span class="time">$prepared[lastactivitytime]</span></if>
                            </div>
                        </if>
                        <if condition="$prepared['action']">
                            <span class="shade">$vbphrase[current_activity]:</span> $prepared[action] $prepared[where]
                        </if>
                    </div>
                </if>
                <!-- / current activity -->
</if>

That shows the current activity of everyone's profile except userid 1. If that give an error, combine the first two conditions into one.

Lynne this works great could you tell me how I can add a second admin into this so it doesn't show the activity thanks, i tried <if condition="$prepared['userid'] != '1,3'"> but doesn't work any help would be great

Lynne 04-13-2009 01:53 PM

Quote:

Originally Posted by Dingo14 (Post 1790022)
Lynne this works great could you tell me how I can add a second admin into this so it doesn't show the activity thanks, i tried <if condition="$prepared['userid'] != '1,3'"> but doesn't work any help would be great

Try this:
HTML Code:

<if condition="!in_array($prepared['userid'], array(1,3))">


All times are GMT. The time now is 08:53 AM.

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.01793 seconds
  • Memory Usage 1,756KB
  • 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
  • (4)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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