Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications

Reply
 
Thread Tools
Who's Online Clickable Location Icon Details »»
Who's Online Clickable Location Icon
Version: 1.1, by Merjawy Merjawy is offline
Developer Last Online: Mar 2016 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 4.2.x Rating:
Released: 07-14-2012 Last Update: Never Installs: 19
Template Edits
Re-useable Code Code Changes Translations  
No support by the author.

This is a little mod that I use on my boards and wanted to share with the community.

What does it do?

This mod will make the "question mark" icon ( ) in Who's Online clickable so you can see the real location of the visitor on your forum.

Time= 1 minute
Files to edit= 0
Templates to edit=1

Install:

Edit template WHOSONLINE:

Find this code:
PHP Code:
 <vb:if condition="$userinfo['show']['reallocation']"><img src="{vb:stylevar imgdir_misc}/question_icon.gif" alt="{vb:raw userinfo.location}" /></vb:if> 
Replace it with this code:
PHP Code:
 <vb:if condition="$userinfo['show']['reallocation']"><a href="{vb:raw userinfo.location}" target="_"><img src="{vb:stylevar imgdir_misc}/question_icon.gif" alt="{vb:raw userinfo.location}" /></a></vb:if> 
This will open the link in a new page/tab.

If you want the link to open in same page:
Replace the original code above with this code:

PHP Code:
 <vb:if condition="$userinfo['show']['reallocation']"><a href="{vb:raw userinfo.location}"><img src="{vb:stylevar imgdir_misc}/question_icon.gif" alt="{vb:raw userinfo.location}" /></a></vb:if> 



I hope you find this mod of some use.
I tested this on vB 4.2.0 and 4.2.1 Alpha

7/17/12 Updated missing closing </a> tag

If you enjoy my mod, please consider marking it as "Installed". Any comments are welcome.

Screenshots

File Type: jpg 2012-07-15_0637.jpg (82.0 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
Brakedirt, elsa23

Comments
  #2  
Old 07-15-2012, 10:23 AM
New Joe's Avatar
New Joe New Joe is offline
 
Join Date: May 2009
Posts: 1,128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice, I used to use this on vB3 good to see it back for vB4
Reply With Quote
Благодарность от:
Merjawy
  #3  
Old 07-15-2012, 10:34 AM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Joe
Reply With Quote
  #4  
Old 07-15-2012, 11:08 AM
New Joe's Avatar
New Joe New Joe is offline
 
Join Date: May 2009
Posts: 1,128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you know what code would need to be edited for this to work on versions before 4.2.0?

I just checked in the Template for 4.1.3 and this first code wasn't there.
Reply With Quote
  #5  
Old 07-15-2012, 12:38 PM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For vb 4.1.3 you need to change the code in whosonlinebit template instead

Find this code:

PHP Code:
 <vb:if condition="$show['reallocation']"><img src="{vb:stylevar imgdir_misc}/question_icon.gif" alt="{vb:raw userinfo.location}" /></vb:if> 

Replace it with:

PHP Code:
 <vb:if condition="$show['reallocation']"><a href="{vb:raw userinfo.location}" target="_">
<
img src="{vb:stylevar imgdir_misc}/question_icon.gif" alt="{vb:raw userinfo.location}" /></a></vb:if> 
Attached Images
File Type: jpg 2012-07-15_0940.jpg (62.0 KB, 0 views)
Reply With Quote
Благодарность от:
New Joe
  #6  
Old 07-15-2012, 01:48 PM
New Joe's Avatar
New Joe New Joe is offline
 
Join Date: May 2009
Posts: 1,128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That worked great, thanks again.
Reply With Quote
  #7  
Old 07-15-2012, 01:53 PM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad to hear
Reply With Quote
  #8  
Old 07-16-2012, 02:48 AM
dsantana dsantana is offline
 
Join Date: Dec 2011
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed thanks... How could this be set so only admins could view the links?
Reply With Quote
  #9  
Old 07-16-2012, 10:24 AM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks dsantana,...

This is really a simple code, and others can't see what they aren't allowed to see before.
Noone can view any location unless they have permission.
But there are ways to do what you want.
Either allow only Admins to view Who's Online, or simple condition will do.
Reply With Quote
  #10  
Old 07-17-2012, 04:14 PM
Mark.B Mark.B is offline
Senior Member
 
Join Date: Feb 2004
Posts: 1,354
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code is missing the closing "</a>" tag right before the "</vb:if>"
Reply With Quote
Reply

Thread Tools

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 12:06 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.08522 seconds
  • Memory Usage 2,332KB
  • 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
  • (5)bbcode_php
  • (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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (4)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (2)postbit_attachment
  • (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_postinfo_query
  • fetch_postinfo
  • 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