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)
-   -   Administrative and Maintenance Tools - Who's Online Clickable Location Icon (https://vborg.vbsupport.ru/showthread.php?t=285568)

Merjawy 07-14-2012 10:00 PM

Who's Online Clickable Location Icon
 
1 Attachment(s)
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 ( https://vborg.vbsupport.ru/images/icons/icon5.gif ) 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.

New Joe 07-15-2012 10:23 AM

Nice, I used to use this on vB3 good to see it back for vB4

Merjawy 07-15-2012 10:34 AM

Thanks Joe

New Joe 07-15-2012 11:08 AM

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.

Merjawy 07-15-2012 12:38 PM

1 Attachment(s)
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> 


New Joe 07-15-2012 01:48 PM

That worked great, thanks again.

Merjawy 07-15-2012 01:53 PM

Glad to hear

dsantana 07-16-2012 02:48 AM

Installed thanks... How could this be set so only admins could view the links?

Merjawy 07-16-2012 10:24 AM

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.

Mark.B 07-17-2012 04:14 PM

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


All times are GMT. The time now is 05:45 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.01040 seconds
  • Memory Usage 1,746KB
  • 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
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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