Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Javascript links in popup menus! Details »»
Javascript links in popup menus!
Version: 1.00, by mousi mousi is offline
Developer Last Online: Aug 2008 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 05-07-2006 Last Update: 05-07-2006 Installs: 4
Code Changes Is in Beta Stage  
No support by the author.

What is this hack?
Have you ever noticed that when there are links in the popup menus that use javascript, you must click on the text for the link to work? For example try "Quick Links->Open Buddy List" in this forum. If you just click on the td area and not on the text, the popup window doesn't show up.

You can fix this with this hack!

Modification:
1)Open ./clientscript/vbulletin_menu.js

2)Find:
Code:
tds[i].onclick = vB_Popup_Events.prototype.menuoption_onclick_link;
3)Replace it with:
Code:
var alphas = fetch_tags(tds[i], 'a');
if (alphas[0].onclick) {
	tds[i].onclick = alphas[0].onclick;
} else {
	tds[i].onclick = vB_Popup_Events.prototype.menuoption_onclick_link;
}
That's it. Now if you have a link like the following in a popup, it will work if you click on the entire td area:
Code:
<td class="vbmenu_option"><a href="#" onclick="doSomething();">Something</a></td>
This is my first hack. It's not something big, but I think it's usefull. If you like it please click Install.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 05-08-2006, 01:49 AM
Ahsin1 Ahsin1 is offline
 
Join Date: Mar 2006
Location: Toronto, Canada
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Screen Shots?
Reply With Quote
  #3  
Old 05-08-2006, 03:41 AM
mousi mousi is offline
 
Join Date: Feb 2006
Location: Greece
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ahsin1
Screen Shots?
Added one
Reply With Quote
  #4  
Old 05-08-2006, 04:18 AM
yinyang's Avatar
yinyang yinyang is offline
 
Join Date: May 2004
Location: Los Angeles
Posts: 580
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

demo?
Reply With Quote
  #5  
Old 05-08-2006, 04:30 AM
mousi mousi is offline
 
Join Date: Feb 2006
Location: Greece
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not available demo right now... I will update later
Reply With Quote
  #6  
Old 05-08-2006, 06:14 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can't you just do the label tags for this?
Reply With Quote
  #7  
Old 05-08-2006, 06:24 AM
mousi mousi is offline
 
Join Date: Feb 2006
Location: Greece
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
Can't you just do the label tags for this?
Hmmm... I didn't understand this! What do you mean? Do what with label tags?
Reply With Quote
  #8  
Old 05-08-2006, 03:33 PM
htscpl's Avatar
htscpl htscpl is offline
 
Join Date: Sep 2003
Location: Houston
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*** installs ***

Not sure if it works or not. Most of my popup menus already had click on the box feature. In the 'User CP' is where I wanted it to work but those are not popups so not sure ??
Reply With Quote
  #9  
Old 05-08-2006, 06:47 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks man!
Reply With Quote
  #10  
Old 05-08-2006, 08:49 PM
mousi mousi is offline
 
Join Date: Feb 2006
Location: Greece
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by htscpl
*** installs ***

Not sure if it works or not. Most of my popup menus already had click on the box feature. In the 'User CP' is where I wanted it to work but those are not popups so not sure ??
These are not that kind of links. They are just simple <a href="something.php"> links. I know those worked fine
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:35 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04412 seconds
  • Memory Usage 2,287KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete