vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Can someone help with the popup menus in Vb? (https://vborg.vbsupport.ru/showthread.php?t=101588)

tomf 11-28-2005 09:39 PM

i still don't get it...maybe you can post a screenshot and mark the place :)

sbryan 11-28-2005 10:25 PM

1 Attachment(s)
here you go Tomf, thanks :)

I want to display the custom form field that contains members Xbox Live Gamertag value under their post info as Gamertag : XXXXvalueXXXX

Then when it is clicked it displays the following code in a small popup.

<iframe src="http://gamercard.xbox.com/insertgamertaghere.card" scrolling="no" frameBorder="0" height="140" width="204"></iframe>


insertgamertaghere.card will need to be XXXXvalueXXXX, the value from the custom form field.

as mentioned, before 3.5.1 i already had the gamertag value displaying in the postbit, not linked though as this is a new feature from Microsoft for Xbox Live gamers.

*EDIT*

i've worked out how to get those custom fields displaying in postbit_legacy again with this code

<if condition="$post[field7]!=''">
<span class="smallfont"><b>Playing:</b> $post[field7]</span>
</if>
<br>
<if condition="$post[field8]!=''">
<span class="smallfont"><b>Gamertag:</b> $post[field8]</span>
</if>

now i just need to link in the Gamertag using the popup VB menu system with that Xbox Live Gamercard URL/Iframe code in it. If someone can help that would be incredible :D

Cyricx 11-28-2005 10:52 PM

What your looking for is to have like a window that opens and closes right? sorta like what I did with the collapsable postbit / rpg menus?

sbryan 11-28-2005 11:08 PM

yep thats it! ive got the stuff displaying now, just need to link the gamertag one with the snazzy vb menus and the iframe.

Cyricx 11-28-2005 11:38 PM

Okay, my site is down so I can't test this.

This code uses a combination of my rpg menu hack and the collapsable postbit, with a code fix from Oblivion.

I'm totally guessing here but PLEASE let me know if it works. Because if it does I'll likely be able to do my collapsable postbit without a code edit :)

So, just add this where you want it.

Code:

<!-- ##### START HACK - Gamertag Info ##### -->
<if condition="$post[field8]!=''">
<span class="smallfont"><b>Gamertag:</b> <div id="gamertagpostmenu_<if condition="THIS_SCRIPT == 'private'">99<else />$post[postcount]</if>">$post[username]<script type="text/javascript"> vbmenu_register("gamertagpostmenu_<if condition="THIS_SCRIPT == 'private'">99<else />$post[postcount]</if>", true); </script>
</div>
<div class="vbmenu_popup" id="gamertagpostmenu_<if condition="THIS_SCRIPT == 'private'">99<else />$post[postcount]</if>_menu" style="display:none">
 <iframe src="$post[field8]" scrolling="no" frameBorder="0" height="140" width="204"></iframe>
</div>
<br />
</if>
<!-- ##### END HACK - Gamertag Info ##### -->

I suck at html so I'm really not sure how the iframe and div will interact.

Also, I'm guessing that field8 they put the full url in?

sbryan 11-28-2005 11:57 PM

no field8 is just their gamertag so i need the URL in the iFrame

which i assume will be as follows?

<iframe src="http://gamercard.xbox.com/$post[field8].card" scrolling="no" frameBorder="0" height="140" width="204"></iframe>

lemme give it a shot :D

I used this :

<!-- ##### START HACK - Gamertag Info ##### -->
<if condition="$post[field8]!=''">
<span class="smallfont"><b>Gamertag:</b> <div id="gamertagpostmenu_<if condition="THIS_SCRIPT == 'private'">99<else />$post[postcount]</if>">$post[username]<script type="text/javascript"> vbmenu_register("gamertagpostmenu_<if condition="THIS_SCRIPT == 'private'">99<else />$post[postcount]</if>", true); </script>
</div>
<div class="vbmenu_popup" id="gamertagpostmenu_<if condition="THIS_SCRIPT == 'private'">99<else />$post[postcount]</if>_menu" style="display:none">
<iframe src="http://gamercard.xbox.com/$post[field8].card" scrolling="no" frameBorder="0" height="140" width="204"></iframe>
</div>
<br />
</if>
<!-- ##### END HACK - Gamertag Info ##### -->

And it displays as :

Gamertag :
Shane

(the actual value of $post[field8] for me should be Spagman)

you can see it on my site at : http://www.xboxworld.com.au/forum/sh...579#post526579

i will change it back to normal for now.

Cyricx 11-29-2005 12:38 AM

Hmm, it's because the DIV forces a carriage return.

Hmm.. well, I'm not sure how to do it with keeping the gamertag and username separate, but this will work for certain, though it won't have the indention that you were looking for in your screenie.

Code:

<!-- ##### START HACK - Gamertag Info ##### -->
<if condition="$post[field8]!=''">
<div id="gamertagpostmenu_<if condition="THIS_SCRIPT == 'private'">99<else />$post[postcount]</if>"><b>Gamertag:</b> $post[field8]<script type="text/javascript"> vbmenu_register("gamertagpostmenu_<if condition="THIS_SCRIPT == 'private'">99<else />$post[postcount]</if>", true); </script>
</div>
<div class="vbmenu_popup" id="gamertagpostmenu_<if condition="THIS_SCRIPT == 'private'">99<else />$post[postcount]</if>_menu" style="display:none">
<iframe src="http://gamercard.xbox.com/$post[field8].card" scrolling="no" frameBorder="0" height="140" width="204"></iframe>
</div>
<br />
</if>
<!-- ##### END HACK - Gamertag Info ##### -->

Try that :)

sbryan 11-29-2005 12:48 AM

wow that works!!! :D looks awesome!

thanks heaps Cyricx.

can i ask one last thing, when you mouse over it and click it works fine, but the mouse pointer doesnt change. is there a way to do that / and / or underline the Gamertag so that its visually noticeable as a link?

sorry to bug you further!

Cyricx 11-29-2005 03:38 PM

Yeah, that's the only thing thats bug me about this code is the whole noticable link thing.

This will underline the gamers tag

Code:

<!-- ##### START HACK - Gamertag Info ##### -->
<if condition="$post[field8]!=''">
<div id="gamertagpostmenu_<if condition="THIS_SCRIPT == 'private'">99<else />$post[postcount]</if>"><b>Gamertag:</b> <u>$post[field8]</u><script type="text/javascript"> vbmenu_register("gamertagpostmenu_<if condition="THIS_SCRIPT == 'private'">99<else />$post[postcount]</if>", true); </script>
</div>
<div class="vbmenu_popup" id="gamertagpostmenu_<if condition="THIS_SCRIPT == 'private'">99<else />$post[postcount]</if>_menu" style="display:none">
<iframe src="http://gamercard.xbox.com/$post[field8].card" scrolling="no" frameBorder="0" height="140" width="204"></iframe>
</div>
<br />
</if>
<!-- ##### END HACK - Gamertag Info ##### -->



All times are GMT. The time now is 03:18 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.01963 seconds
  • Memory Usage 1,748KB
  • 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
  • (3)bbcode_code_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
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete