Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

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
  #2  
Old 11-07-2006, 06:22 AM
Viper007Bond's Avatar
Viper007Bond Viper007Bond is offline
 
Join Date: Oct 2006
Location: Portland, OR, USA
Posts: 224
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

CHANGELOG:
  • v1.0.3: if your base URL contains "www.", it's now optional and this plugin will affect both www.yoursite.com as well as yoursite.com
  • v1.0.2: cached versions of posts were still having their links open in new windows, this is now hopefully fixed
  • v1.0.1: attachment.php links now continue to open in a new window
  • v1.0.0: initial release
Reply With Quote
  #3  
Old 11-07-2006, 09:14 AM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks buddy!
Reply With Quote
  #4  
Old 11-07-2006, 02:20 PM
Cheertobi Cheertobi is offline
 
Join Date: Aug 2004
Location: Germany
Posts: 178
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

/me clicks install!

Thanks!
Reply With Quote
  #5  
Old 11-07-2006, 05:01 PM
4yBak 4yBak is offline
 
Join Date: Apr 2004
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how this plugin know which links are local? Or this plugin use own bb-code? Also, can you do option like: not display local links for specific usergropus (for example: unregistering users) ?
Reply With Quote
  #6  
Old 11-07-2006, 05:39 PM
TCattitude's Avatar
TCattitude TCattitude is offline
 
Join Date: Oct 2004
Location: Chile
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by 4yBak
how this plugin know which links are local? Or this plugin use own bb-code? Also, can you do option like: not display local links for specific usergropus (for example: unregistering users) ?
If the linked url have your vbulletin['bburl'] in that url, so the plugin re-write the "a href" code to change the "target" of the link, and left the link intact.

Nice and simple plugin
This really need to be a standard vbulletin option (local links not use "_blank" target; local links open in the same window)
Reply With Quote
  #7  
Old 11-07-2006, 05:56 PM
w1z4rd w1z4rd is offline
 
Join Date: Feb 2005
Location: MooseTown
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Finally, ... this works great just remember it does'nt take effect on posts before the installation unless you edit them. Sweet little plugin, thanks.
Reply With Quote
  #8  
Old 11-07-2006, 06:33 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 w1z4rd
Finally, ... this works great just remember it does'nt take effect on posts before the installation unless you edit them. Sweet little plugin, thanks.
No, it does, just flush your post cache.

This modifies the output of the BBCode parser (after the BBCode is applied) but that output gets cached by vB.
Reply With Quote
  #9  
Old 11-07-2006, 10:32 PM
PsicoByte PsicoByte is offline
 
Join Date: Sep 2006
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<font color="Lime">*install*</font>

Thanks!! :laugh:
Reply With Quote
  #10  
Old 11-08-2006, 12:09 AM
abramelin abramelin is offline
 
Join Date: Mar 2006
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

good but its going to open the attachment images in the same window too so this is not good :/
Reply With Quote
Reply

Thread Tools

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 04:07 PM.


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.04838 seconds
  • Memory Usage 2,285KB
  • 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
  • (2)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
  • (2)pagenav_pagelink
  • (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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete