The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I'm trying to upgrade a mod of my own that I wrote and am having a couple of problems. Hopefully someone here can help me out a bit.
First I have this code located in the postbit_legacy template: Code:
<vb:if condition="is_member_of($vbulletin->userinfo, $vboptions[gm_user_groups_allowed]"> <div id="GuildMate_{vb:raw post.postid}"> <a class="smallfont" href="#">{vb:phrase gm_postbit_text}</a> <script type="text/javascript"> vbmenu_register("GuildMate_{vb:raw post.postid}", true); </script> </div> </vb:if> So for now, I've removed the condition. At this point, when some clicked on the link before, it would activate this code: Code:
<!-- START: Guild Mate {vb:raw post.postid} popup menu --> <div class="vbmenu_popup" id="GuildMate_{vb:raw post.postid}_menu" style="display:none"> <table cellpadding="4" cellspacing="1" border="0"> <tr> <td class="thead" colspan="3" align="center">{vb:phrase gm_modtitle}: {vb:phrase gm_modheader} $post[username]{vb:phrase gm_modheader2}</td> </tr> {vb:raw gm_char_data} </table> </div> <!-- END: Guild Mate $post[postid] popup menu --> Any help would be appreciated! --------------- Added 26 Dec 2009 at 19:30 --------------- I did want to say that everything appears to be generating as it should. The only problem is when clicking the link, the popup does not appear and it goes to the root level page. Checking the source, the menus are generated as they should be, everything LOOKs like it should work. I would like to add that I have in fact read all of the posts I can find on the popup menus and well.. still can't see what I'm doing wrong. |
#2
|
||||
|
||||
![]()
When you say it LOOKs correct, do you mean the page source is correct? If so, and you click on it and aren't going to the correct place, perhaps you have some .htaccess on your site that is redirecting you to the wrong place.
And you forgot a parenthesis: HTML Code:
<vb:if condition="is_member_of($bbuserinfo, $vboptions[gm_user_groups_allowed])">
|
#3
|
|||
|
|||
![]()
Well, I mean that what is rendered appears to be correct. I just don't think that the popup is ever happening. If I set the A HREF to "#", I can click it forever, no popups (at which point I don't to go any other page either), just nothing happens at all.
|
#4
|
||||
|
||||
![]()
Then, like I said, maybe the function isn't available on that page any longer. If you notice, it isn't used anywhere else in the postbit, so perhaps you need to include the function in a plugin for your mod.
|
#5
|
|||
|
|||
![]()
Ok, I have the usergroup issue fixed (thanks Lynne).
I still can't get the popup menu to show. I checked and that function is located in vbulletin-core.js. I checked the source of the page and that file is included. I'm still looking... just not sure what to look for. =) |
#6
|
||||
|
||||
![]()
If I recall correctly from vb3, your initial link (the first code you posted) needs to be in a td tag. Take a look at the vb3 article regarding dropdowns in the navbar. All the requirements are spelled out there.
|
#7
|
|||
|
|||
![]()
Tried the TD tag stuff, still no go.
Searched for and found several articles that probably fit the ones you mentioned (read them all), found this one specifically: https://vborg.vbsupport.ru/showthread.php?t=126649 Can't see what they are doing there that I'm not. Like I said, this code is running perfectly in vB3.8, just not in 4.0. After taking a closer look at it the vbmenu_register function, in VB4 the location is in vbulletin-core.js and in VB3 it's in vbulletin_global.js. However both functions are identical: Code:
function vbmenu_register(B,A,C){if(typeof (vBmenu)=="object"){return vBmenu.register(B,A)}else{return false}} --------------- Added [DATE]1261891833[/DATE] at [TIME]1261891833[/TIME] --------------- Ok, I think I got this figured out. Took me a while to find how the new popups are getting rendered but it looks like you have to use a UL/LI type setup and can't use the table/TD type of syntax any longer. Not sure if that statement is 100% true, I just know what is and isn't working. heh --------------- Added [DATE]1261896290[/DATE] at [TIME]1261896290[/TIME] --------------- Ok, so I was wrong (go figure), you can use tables just fine. The link you click on has to have the class of popupctrl and then you have to wrap what you want in the popup in a UL with the class popupbody. Anyway, I'm sure I don't fully understand how this works, but... I'm get'n there, thanks for your patience. =) |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|