vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   VBGooglemapME Postbit Conditional (https://vborg.vbsupport.ru/showthread.php?t=125788)

glorify 09-03-2006 10:00 PM

VBGooglemapME Postbit Conditional
 
Obviously this is an add on for VBGooglemapME

Had a nice little hack that would have been buried in the 100 post release thread, so anyway, here's my contribution. (Works on 3.5.x and 3.6.x)

I wanted to have a link in the postbit to each members map. I also wanted it only to show up if a user had a pin stuck.

So I did. And it worked. Then I took it a step further.

If a member has a pin stuck in the map, his location is linked to the map and the default vb location is replaced with the link.

If a member does not have a pin stuck, the default vb Location is left untouched.

If nothing is filled out--nothing shows.

See screens. They all came from the same thread at the same time. (Demo)

VERY simple template edit. In postbit, find
Code:

<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
Replace with
Code:

<if condition="$post[findme]"><div class="smallfont">$post[findme]</div>
<else />
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div>
</if>
</if>

Done :)
Enjoy

glorify 09-04-2006 03:04 PM

Please click Install and rate it if ya like and are using :)

Ski-Whiz 09-04-2006 08:55 PM

I'll give this a shot..

Thanks Glorify!

glorify 09-04-2006 10:46 PM

Thanks. Hope ya like it :)

Ziki 09-05-2006 11:10 AM

Wrong forum but a nice tweak!

glorify 09-05-2006 01:48 PM

Thanks :)

glorify 09-07-2006 02:22 AM

field 2 is the default vb profile field #2 (Location)

$post[findme] was defined in the original ME version of the hack :)

glorify 01-20-2007 07:30 PM

Works in 3.6.4 as well :)

bulbasnore 04-29-2007 04:20 AM

Glorify, nice job!

We axed our location field display, it was just used for silliness, so I'm just using this:
PHP Code:

<if condition="$post[findme]"><div class="smallfont">$post[findme]</div>
</if> 

I translated the phrase "My location" to "MAP" and its working great.


Any thought on how to make the members 'pin' show and provide the link via that grapic, instead of the phrase?


All times are GMT. The time now is 05:01 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.01296 seconds
  • Memory Usage 1,727KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete