vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Mini Mods - Same Window For Local Links (https://vborg.vbsupport.ru/showthread.php?t=130966)

adonfun 12-27-2006 11:24 PM

Thanks, great mod!! Installed it

I rebuilded the post cach but I get the message that a popup was prevented to open in FF...

Or do I have to wait for a while? :)

TheMilkCarton 07-29-2007 01:57 PM

Hmm... it's been a long time since anyone has said anything, but I'll be hopeful that someone can answer this..

I looked in the plugin code and it SEEMS to exclude "attachment.php" so that attachments still open in a new window, but it's still stripping "target="_blank"" from attachment links.

I highlighted the attachment.php code in red:
Code:

if ( FALSE !== strstr($vbulletin->options['bburl'], '://www.') ) {
    $locallinks_search = '#\<a href="' . str_replace('://www.', '(://www.|://)', $vbulletin->options['bburl']) . '/((?!attachment.php).*?)" target="_blank"\>#i';
    $locallinks_replace = '<a href="' . $vbulletin->options['bburl'] . '/$2">';

    $text = preg_replace($locallinks_search, $locallinks_replace, $text);
    $this->cached['text'] = preg_replace($locallinks_search, $locallinks_replace, $this->cached['text']);
} else {
    $locallinks_search = '#\<a href="' . $vbulletin->options['bburl'] . '/((?!attachment.php).*?)" target="_blank"\>#i';
    $locallinks_replace = '<a href="' . $vbulletin->options['bburl'] . '/$1">';

    $text = preg_replace($locallinks_search, $locallinks_replace, $text);
    $this->cached['text'] = preg_replace($locallinks_search, $locallinks_replace, $this->cached['text']);
}

So is this code excluding or including attachment.php? I'm not exactly fluent in regex. :)

vuiveclub 02-20-2008 11:43 AM

Hello
Can I use this mod for some forums only, I do not want to use for my all board. Thank you :)

inciarco 02-20-2008 02:32 PM

Great Mod!! :up::up::up:

Works Fine with vB 3.6.7 PL1!! :up::up::up:

Thanks For Sharing It!! ;)

My Best Regards!! ;)

:)

Dingo14 03-04-2008 12:09 AM

installed works great thanks

andreamarucci 03-05-2008 03:39 PM

installed! My compliments, now I test this one...

plasticsurgery 04-27-2008 08:20 PM

Just installed. Thanks so much!!!

justchil 05-03-2008 01:25 AM

Quote:

Originally Posted by Viper007Bond (Post 1129770)
Check your vB URL in your options page. This plugin uses it to determine if a link is local or not. For testing, make sure to use a URL that starts with EXACTLY that string.


This helped me! I didn't have www. but am using it in my urls :) Cheers!

karrerax 05-11-2008 04:17 PM

GREAT . I was im looking for !!!

Cliks install

andreamarucci 05-13-2008 09:24 AM

I've upgraded to 3.7. Does this work on 3,7?

Dingo14 08-02-2008 09:59 PM

same question will this work on 3.7

Milez 04-23-2009 09:33 PM

Tested and working on vB 3.8.2. Thanks to the author :)

Bommando 07-23-2009 02:18 PM

Thanks for this. It's been bugging me for a while.

Installed :)

plasticsurgery 06-11-2010 02:40 AM

Is there a version of this available for vB 4.0?

MikesSite 11-02-2011 03:59 PM

Works on 3.8 but conflicts with AME


All times are GMT. The time now is 01:37 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.01151 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (15)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete