1
bikeman
hyperlinks - why is only target 'blank' page
  • 2005/5/26 12:42

  • bikeman

  • Just popping in

  • Posts: 30

  • Since: 2005/5/24


I think I must be missing something but why are there no target options for hyperlinks? How do you link to a page without bringing up the page in a new window?

Thanks

2
ladon
Re: hyperlinks - why is only target 'blank' page
  • 2005/5/26 12:55

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


Target _blank is hardcoded I believe. Maybe you could force the link to open in the same window by adding a _parent or _self (in templates).

3
Shine
Re: hyperlinks - why is only target 'blank' page
  • 2005/5/26 13:09

  • Shine

  • Just can't stay away

  • Posts: 822

  • Since: 2002/7/22


<grinz> I know.
The fact is that there are 2 BB-codes.
[url] and [siteurl]
Strange enough both codes were given the target blank. If you ask me, [siteurl] should standard be without target blank.
You can adjust this within the core file:
class/module.textsanitizer.php

prox line: 154 you'll see
$patterns[] = "/[siteurl=(['"]?)([^"'<>]*)\1](.*)[/siteurl]/sU";
//$replacements[] = '<a href="'.XOOPS_URL.'/\2" target="_blank">\3</a>';

change this into:
$patterns[] = "/[siteurl=(['"]?)([^"'<>]*)\1](.*)[/siteurl]/sU";
        
// LVDH: Aanpassing target blank verwijderd
        
[i]//$replacements[] = '<a href="'.XOOPS_URL.'/\2" target="_blank">\3</a>';[/i]
        
[b]$replacements[] = '<a href="'.XOOPS_URL.'/\2">\3</a>';[/b]
        
// LVDH Einde


Comment the cursive out, and replace with the bold.

Grtz., Shine

4
JamesSAEP
Re: hyperlinks - why is only target 'blank' page
  • 2005/9/7 19:11

  • JamesSAEP

  • Just can't stay away

  • Posts: 732

  • Since: 2005/2/28


I've made this modification to the file and yes, it solved the issue of having a new page opening, but it did create a new problem:

The formatting of my news 1.4 articles were displaying weird. In the stories, all bold and color formatting tags were ignored (b][/b][color][/color]). Any text that had this was displayed in small text.

I'm using XOOPS 2.2.2

Any ideas?

5
bikeman
Re: hyperlinks - why is only target 'blank' page
  • 2005/12/19 22:18

  • bikeman

  • Just popping in

  • Posts: 30

  • Since: 2005/5/24


Beavis are you sure this worked for you?

I carefully did what was suggested and this mod definitely doesn't work!!!

6
JamesSAEP
Re: hyperlinks - why is only target 'blank' page
  • 2005/12/19 22:23

  • JamesSAEP

  • Just can't stay away

  • Posts: 732

  • Since: 2005/2/28


Yeah, it worked except for the issue I mentioned.

Login

Who's Online

148 user(s) are online (104 user(s) are browsing Support Forums)


Members: 0


Guests: 148


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits