View Full Version : Can someone help with the popup menus in Vb?
sbryan
11-26-2005, 11:18 AM
You know how you click on a posters username in a post/thread to get their public profile/send a PM etc
Can anyone please help me add another option to that?
what option do you want to add?
go to your style manager and edit the template postbits/postbit
find: <div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none">
and in this table add some new <tr class="vbmenu_option"><td>your code</td></tr>
sbryan
11-26-2005, 09:50 PM
what option do you want to add?
go to your style manager and edit the template postbits/postbit
find: <div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none">
and in this table add some new <tr class="vbmenu_option"><td>your code</td></tr>
hi Tom i want to display the value of a custom form field from the users profile, but then it links to an external source with a variable that is the value entered into the form.
Lea Verou
11-27-2005, 01:12 AM
hi Tom i want to display the value of a custom form field from the users profile, but then it links to an external source with a variable that is the value entered into the form.
The code you should add would be (substitute field5 for the actual name of the profile field):
<if condition="$post[field5]">
<tr class="vbmenu_option"><td><a href="$post[field5]>$post[field5]</a></td></tr>
</if>
I hope I understood correctly what you need...
sbryan
11-27-2005, 05:02 AM
Ok to summarise, basically to make myself clear as i have a habit of not explaining properly and confusing myself :D
I have a custom form field that has peoples Xbox Live gamertags that they enter. It used to display under their post count etc (if a value was entered) as Gamertag : XXXX (XXXX being the value entered).
What i would like to do now is put that back since upgrading to 3.5.1. It should only display if it has a value entered.
Then after it displays, it should have a VB menu style link on it that displays the following from xbox.com (external URL) :
<iframe src="http://gamercard.xbox.com/XXXX" scrolling="no" frameBorder="0" height="140" width="204"></iframe>
(i hope the code displays as code properly)
So it needs to feed the form field value into the URL as well.
I've seen it done elsewhere so it can be done, but i'm just having issues getting it working since upgrading.
Any help appreciated!
Lea Verou
11-27-2005, 01:07 PM
If it's in the postbit just keep in mind that the value of the field is $post[field5] (substitute field5 for the actual name of the field)
Apart from that I didn't understand... You want to use an iframe on the postbit?????
sbryan
11-27-2005, 07:32 PM
not actually in the postbit, only when you click on a link for it.
eg : Gamertag : Spagman
Spagman is the value of a custom form field, when you click on it, it would then use the nifty vbulletin popup menu system to then display the iframe content.
peterska2
11-27-2005, 10:23 PM
Theres a mod released somewhere for xbox live gamertags for 3.5.x
Have a look around the 3.5.x forums or search for gamertag and I'm sure it will come up
so if I'm right you want to add your own popup menu and not modify the "username popup" ?
where do you wanna add it?
sbryan
11-27-2005, 10:38 PM
thanks, yeah its easy enough to add this to display but as mentioned, i would like it as a clickable option in a seperate popup menu from the 'username popup' so that nothing in the standard menus breaks or goes weird.
i still don't get it...maybe you can post a screenshot and mark the place :)
sbryan
11-28-2005, 10:25 PM
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.
<!-- ##### 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/showthread.php?p=526579#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.
<!-- ##### 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
<!-- ##### 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 ##### -->
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.