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

Reply
 
Thread Tools
Same Window For Local Links Details »»
Same Window For Local Links
Version: 1.0.3, by Viper007Bond Viper007Bond is offline
Developer Last Online: Dec 2017 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.6.4 Rating:
Released: 11-06-2006 Last Update: 11-29-2006 Installs: 64
Uses Plugins
 
No support by the author.

Another really simple plugin from me.

I wanted local links (i.e. ones to other parts of the forum) to not open in a new tab. So, I wrote a little modifier to make that happen and decided to share the code.

Tested on my forum, but let me know if you encounter any issues.


How it works:

It hooks in at the end of the BBCode parser, after the parser has transformed the BBCode into HTML. My plugin then removes the target="_blank" off of links that start with your forum base URL.


Upgrading from version 1.0.1 or 1.0.0:

Delete the plugin and then install the new product.


It doesn't seem to be working on old posts!

The output of the BBCode parser and such is cached by vB. Just rebuilt your post cache (it's under "Update Counters") and all will be good.

==============================
DON'T FORGET TO CLICK INSTALL!


==============================

Show Your Support

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

Comments
  #12  
Old 11-08-2006, 12:13 AM
Viper007Bond's Avatar
Viper007Bond Viper007Bond is offline
 
Join Date: Oct 2006
Location: Portland, OR, USA
Posts: 224
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by abramelin
good but its going to open the attachment images in the same window too so this is not good :/
It shouldn't touch the items in the attachment box as I don't believe those are run though the BBCode parser (why would they be?).

However, yeah, [ATT ACH]12345[/ATTACH] would be probably be affected. I'll exclude attachment.php links.
Reply With Quote
  #13  
Old 11-08-2006, 12:17 AM
abramelin abramelin is offline
 
Join Date: Mar 2006
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if you can exclude them then im going to install this lovely simple mod,thanks.
Reply With Quote
  #14  
Old 11-08-2006, 01:57 AM
Viper007Bond's Avatar
Viper007Bond Viper007Bond is offline
 
Join Date: Oct 2006
Location: Portland, OR, USA
Posts: 224
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Gah, man I suck at regex.
Reply With Quote
  #15  
Old 11-08-2006, 09:13 AM
Viper007Bond's Avatar
Viper007Bond Viper007Bond is offline
 
Join Date: Oct 2006
Location: Portland, OR, USA
Posts: 224
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Alright, attachment.php is now excluded and will continue to open in a new tab/window.
Reply With Quote
  #16  
Old 11-10-2006, 02:15 PM
Nathan2006's Avatar
Nathan2006 Nathan2006 is offline
 
Join Date: Feb 2006
Location: UK
Posts: 862
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you Viper007Bond,

I requested something like this a long time ago because I hated new windows opening all the time on local links.

I always had to use the html code <a href=""><span style="color: blue;"> Here </span></a> to open links in the same window

But this great hack has now made me very happy

And also should be default on all VB boards.

Thanks again

Install
Reply With Quote
  #17  
Old 11-12-2006, 04:56 AM
funkmeister funkmeister is offline
 
Join Date: Oct 2004
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Just rebuilt your post cache (it's under "Update Counters") and all will be good.
Dumb question - which option in "Update Counters" needs to be used? Only one closest to what you describe is "Update Post Counts" - is that the one or a different one?

Anyway, works great (on my new posts) - thanks.
Reply With Quote
  #18  
Old 11-12-2006, 07:50 AM
Viper007Bond's Avatar
Viper007Bond Viper007Bond is offline
 
Join Date: Oct 2006
Location: Portland, OR, USA
Posts: 224
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by funkmeister
Dumb question - which option in "Update Counters" needs to be used? Only one closest to what you describe is "Update Post Counts" - is that the one or a different one?

Anyway, works great (on my new posts) - thanks.
No, the "Rebuild Post Cache" one. 6th one down.
Reply With Quote
  #19  
Old 11-12-2006, 02:07 PM
funkmeister funkmeister is offline
 
Join Date: Oct 2004
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Viper007Bond
No, the "Rebuild Post Cache" one. 6th one down.
Ummm, I don't have that one as an option - the 6th one down on my list is "Empty Signature Cache" - I'm on 3.6.2 - is this a new option only in 3.6.3 or is it reliant on someother setting in order for it to be made available as an option?

Also, can you add a feature to take into a count those "showthread" posts that include the syntax "showthread.php?p=22946#post22946" - these "normally" open in a new window and include a "Close Window" button on the bottom of the displayed page. Of course, when a user clicks it and with this add-on installed, it will prompt them to close it and in turn close down the whole browser, since it actually now opens in the same page. So can you make it so that these type of URL's continue to open in a new window.

Thanks.
Reply With Quote
  #20  
Old 11-12-2006, 09:41 PM
Viper007Bond's Avatar
Viper007Bond Viper007Bond is offline
 
Join Date: Oct 2006
Location: Portland, OR, USA
Posts: 224
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by funkmeister View Post
Ummm, I don't have that one as an option - the 6th one down on my list is "Empty Signature Cache" - I'm on 3.6.2 - is this a new option only in 3.6.3 or is it reliant on someother setting in order for it to be made available as an option?
No, I had the option in 3.6.2. Odd. *shrugs*

Quote:
Originally Posted by funkmeister View Post
Also, can you add a feature to take into a count those "showthread" posts that include the syntax "showthread.php?p=22946#post22946" - these "normally" open in a new window and include a "Close Window" button on the bottom of the displayed page. Of course, when a user clicks it and with this add-on installed, it will prompt them to close it and in turn close down the whole browser, since it actually now opens in the same page. So can you make it so that these type of URL's continue to open in a new window.

Thanks.
showpost.php you mean? And good point. Thanks.
Reply With Quote
  #21  
Old 11-12-2006, 11:28 PM
funkmeister funkmeister is offline
 
Join Date: Oct 2004
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Viper007Bond View Post
No, I had the option in 3.6.2. Odd. *shrugs*


showpost.php you mean? And good point. Thanks.
Yeah, I'm doing the same thing *shrug* and scratching my head

Yes, "showpost.php" is what I meant to say!
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 10:45 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.04957 seconds
  • Memory Usage 2,314KB
  • Queries Executed 25 (?)
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
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete