1
balancedi
Re:Setting the target for links in some blocks
  • 2004/10/24 4:47

  • balancedi

  • Friend of XOOPS

  • Posts: 5

  • Since: 2004/8/11


To Guido:
When XOOPS interpets bb code links it adds target="_blank". So it reads:

[URL=yourlink]LinkText[/URL]

and changes it to:

<a href="yourlink" target="_blank">LinkText</a>

This forces a new window to open. If it simply left off the target="_blank" then the link would open in the current window. I'm not exactly sure why XOOPS does this. Maybe its some standard method of interpeting bb code.

At any rate, to make this easier for my users that aren't HTML savvy I edited the XOOPS core. For me this didn't seem to have any detrimental side effects on the rest of XOOPS. I edited the file /html/class/module.textsanitizer.php. There is a small function in there called &xoopsCodeDecode that handles this. I just removed everything that said target="blank". (Note: always make a backup before editing code.)


To Anyone:
Is there a way for me to recommend this little change to the XOOPS developers?


Solo71:
Thanks for the tip about Edito and multiMenu. They won't help me with this specific problem but they really look like very handly modules.



2
balancedi
Setting the target for links in some blocks
  • 2004/9/6 17:22

  • balancedi

  • Friend of XOOPS

  • Posts: 5

  • Since: 2004/8/11


I have a very simple custom block on my top page with a link to another content page. When I use bb code to make the link XOOPS automatically inserts target="_blank" into the link which causes the link to open a new window.

The only way I've found to get around this is to create the link with HTML code. This is fine for me but, the others that administer the site aren't HTML savvy and perfer to use the bb code.

I have the same problem with a block created with the Tiny Content module.

Is there an easy way to stop XOOPS from inserting the target="_blank" ?

Thanks in advance.





TopTop



Login

Who's Online

165 user(s) are online (90 user(s) are browsing Support Forums)


Members: 0


Guests: 165


more...

Donat-O-Meter

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

Latest GitHub Commits