Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #11  
Old 04-09-2009, 07:53 PM
brandonroy brandonroy is offline
 
Join Date: Dec 2008
Location: Louisiana
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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
Reply With Quote
  #12  
Old 04-11-2009, 08:05 PM
g0dfather1984 g0dfather1984 is offline
 
Join Date: May 2008
Posts: 449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #13  
Old 04-11-2009, 08:07 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by g0dfather1984 View Post
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.
Reply With Quote
  #14  
Old 04-11-2009, 08:42 PM
g0dfather1984 g0dfather1984 is offline
 
Join Date: May 2008
Posts: 449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 -->
Reply With Quote
  #15  
Old 04-11-2009, 09:57 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #16  
Old 04-11-2009, 10:22 PM
g0dfather1984 g0dfather1984 is offline
 
Join Date: May 2008
Posts: 449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you, Lynne. Works great.
Reply With Quote
  #17  
Old 04-12-2009, 02:21 AM
MoviePropCollec MoviePropCollec is offline
 
Join Date: Dec 2007
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where do we put that?

Meaning Admin CP>Templates> etc like that.

Thanks
Reply With Quote
  #18  
Old 04-12-2009, 02:43 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's from the MEMBERINFO template, I believe. You can always take the comment line and do a Search in Template and find it.
Reply With Quote
  #19  
Old 04-13-2009, 05:43 AM
Dingo14 Dingo14 is offline
 
Join Date: Dec 2007
Posts: 182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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
Reply With Quote
  #20  
Old 04-13-2009, 02:53 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dingo14 View Post
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))">
Reply With Quote
Reply

Thread Tools
Display Modes

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 03:49 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.06541 seconds
  • Memory Usage 2,265KB
  • 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
  • (4)bbcode_html
  • (4)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
  • (2)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