1
krayc
SITEURL : does it have to open a new window???
  • 2004/2/25 21:08

  • krayc

  • Not too shy to talk

  • Posts: 107

  • Since: 2004/2/17


When use the tag [siteurl] in my content (news and tinycontent) it works fine, except clicking the link always opens a new broswer window and instead using the current window. Is there a way to override this? or another tag that I can use that will redirect the current browswer window?

2
regen_r8
Re: SITEURL : does it have to open a new window???
  • 2004/2/25 21:20

  • regen_r8

  • Not too shy to talk

  • Posts: 101

  • Since: 2002/5/23


You could simply embed the correct html anchor tag in your post, with the target attribute =_SELF.

-- The default bbcode rendering behaviour is to render all links inserted in a post as [bbcode] with a target=_BLANK

3
krayc
Re: SITEURL : does it have to open a new window???
  • 2004/2/26 2:00

  • krayc

  • Not too shy to talk

  • Posts: 107

  • Since: 2004/2/17


well I put this in my content for a link...

Michael Jordan

Now i have to say I know or nothing about HTML, I just looked up a online reference to tags, etc. and perhaps I didn't get it right, the link works, but it still opens it up in a new window.


4
God-fearer
Re: SITEURL : does it have to open a new window???
  • 2004/10/14 22:55

  • God-fearer

  • Just popping in

  • Posts: 8

  • Since: 2004/10/11


Hello !!!! what is the answer to these folks' questions?

I'm an idiot with the same problem ...

get me a link that does NOT open a new window ... help!

5
rlped
Re: SITEURL : does it have to open a new window???
  • 2004/10/14 23:04

  • rlped

  • Just popping in

  • Posts: 9

  • Since: 2004/9/29



6
rlped
Re: SITEURL : does it have to open a new window???
  • 2004/10/14 23:05

  • rlped

  • Just popping in

  • Posts: 9

  • Since: 2004/9/29



7
God-fearer
Re: SITEURL : does it have to open a new window???
  • 2004/10/15 0:07

  • God-fearer

  • Just popping in

  • Posts: 8

  • Since: 2004/10/11


This does NOT work! Thanks for the try, but it does not work.
Again ...

we do not want the target="_blank" attribute inserted into all the "a" tags of our news posts.

Help!

is there a way to escape bbcode?

help!


Quote:

8
ackbarr
Re: SITEURL : does it have to open a new window???

you can adjust the behavior of the siteurl bbcode with an extremely simple hack:

in the file /class/module.textsanitizer.php
look for the function: xoopsCodeDecode

in that function change:
$patterns[] = "/[siteurl=(['"]?)([^"'<>]*)\1](.*)[/siteurl]/sU";
    
$replacements[] = '.XOOPS_URL.'/\2" target="_blank">\3';

to
$patterns[] = "/[siteurl=(['"]?)([^"'<>]*)\1](.*)[/siteurl]/sU";
    
$replacements[] = '.XOOPS_URL.'/\2" >\3';


now urls using the [ siteurl ] bbcode will not open in a new window.

9
God-fearer
Re: SITEURL : does it have to open a new window???
  • 2004/10/15 14:36

  • God-fearer

  • Just popping in

  • Posts: 8

  • Since: 2004/10/11


Quote:
you can adjust the behavior of the siteurl bbcode with an extremely simple hack

This sounded like a smart answer, so i tried it, and guess what? It worked!

Thank you. Two follow-up questions ...

1) How does one trace the source of such an issue? e.g. we need to find where htmlentites are getting inserted for poll options in the poll module, but there is no reference to htmlentities or htmlspecialchars in the module ... it must be core XOOPS ... how does one find/trace to the right location?

2) WHO IS YOUR BOSS? We need to call him and tell him you need a raise!!! You have been very helpful.

God-fearer

10
evenu
Re: SITEURL : does it have to open a new window???
  • 2004/12/9 17:56

  • evenu

  • Just popping in

  • Posts: 1

  • Since: 2004/12/9


Quote:
now urls using the [ siteurl ] bbcode will not open in a new window.


Now, I tried that. No use :( I've even removed every target="_black" in the /class/module.textsanitizer.php. Still same. The link still opens in a new window. What am I doing wrong?

Are the changes to be updated somewhere? Where? Thanks in advance...

Login

Who's Online

281 user(s) are online (229 user(s) are browsing Support Forums)


Members: 0


Guests: 281


more...

Donat-O-Meter

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

Latest GitHub Commits