bbcode URL in new window?? (General)

by KST, Thursday, November 05, 2009, 22:05 (5301 days ago)

Hey, i use mlf 2.1.1 and after update, all links open in same windows.

How can i made that?? Bevor update, it works...

greetings

bbcode URL in new window??

by Auge, Friday, November 06, 2009, 15:10 (5300 days ago) @ KST

Hello

Hey, i use mlf 2.1.1 and after update, all links open in same windows.

How can i made that??

How can you made what?

Bevor update, it works...

Now it works as well.

If you want to open the links in a new window you have to set the attribute "target" to all links and you have to change from doctype "XHTML 1.0 strict" to "XHTML 1.0 transitional". You'll find some discussions with solutions via the forums search.

Tschö, Auge

bbcode URL in new window??

by KST, Sunday, November 08, 2009, 17:28 (5298 days ago) @ Auge

Hab alles was ich hier im forum gefunden habe ausprobiert.
aber nichts davon scheint zu funktionieren oder ich mache irgendwo nen kleinen aber entscheidenden fehler...

Vorher hatte ich das auch immer so gemacht, wie hier in so mancher Anleitung, hab auch Ahnung von PHP und co aber jetzt mit dem update auf 2.1.1 geht das gar nicht mehr...

MFG
und vielen Dank

bbcode URL in new window??

by paullecorde, Tuesday, March 02, 2010, 00:22 (5185 days ago) @ Auge

Where do I set this attribute? in function.inc.php? And changing the doctype, is this at the top of main.tpl?

I was able to make links open in new windows in version 1 by adding target=\"_blank\" in the $string = preg_replace("#\[link section of functions.php, but version 2 is completely different.

I appreciate any suggestions.
Paul

If you want to open the links in a new window you have to set the attribute "target" to all links and you have to change from doctype "XHTML 1.0 strict" to "XHTML 1.0 transitional". You'll find some discussions with solutions via the forums search.

Tschö, Auge

Avatar

bbcode URL in new window??

by Auge ⌂, Tuesday, March 02, 2010, 13:13 (5184 days ago) @ paullecorde

Hello

Where do I set this attribute? in function.inc.php?

Yes, you have to set it in the functions for the Stringparser-BB-Code-Class. You'll find the functions wich generates the links from the bb-codes in line 387 (do_bbcode_url) and line 415 (do_bbcode_msg). Attention: The function do_bbcode_msg is exclusive for links to other messages in your forum. Normally it is not wanted to open these links in a new window or tab.

And changing the doctype, is this at the top of main.tpl?

Yes, the doctype is defined in the first line of the HTML-output.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

This is the doctype declaration for XHTML 1.0 transitional (could be in one line instead two lines as seen here).

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

"_blank" sucks

by Arnd, Tuesday, March 02, 2010, 17:33 (5184 days ago) @ KST

Nobody decides whether to open a new window or not but ME!

My Desktop belongs to me.

Arnd

RSS Feed of thread