Hi,
and here is my second problem: Links users ad into their posts should open in a new window (Target _blank). I tried to modyfy tinymce theme, change com_phocaguestbook\views\phocaguestbook\tmpl\default.php to allow "target" in HTML-purifier but still links in guestbook entries are shown in the same window (target _self). Any hints for me?
Thanks in advance
Bernd
Links in new window
- Jan
- Phoca Hero
- Posts: 48736
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Links in new window
maybe you can use some php function like str_replace:
str_replace("_self", "_blank", $message);
Jan
str_replace("_self", "_blank", $message);
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 5
- Joined: 10 Apr 2009, 15:47
Re: Links in new window
Thanks for your tip, Jan.
But as I`m not fit in php (only basic understanding when reading existing code) I won`t be able to ad such functions. If it is just a tiny bit of code I have to ad into an existing file, maybe you could give me some instruction here. Otherwise, I keep the link-functionality disabled for my users. (I removed the link and unlink button and set display links to zero). As I posted before: all links in guestbook erntries should open in new window (target _blank), regardless if and what target user enters.
Greetings, Bernd
But as I`m not fit in php (only basic understanding when reading existing code) I won`t be able to ad such functions. If it is just a tiny bit of code I have to ad into an existing file, maybe you could give me some instruction here. Otherwise, I keep the link-functionality disabled for my users. (I removed the link and unlink button and set display links to zero). As I posted before: all links in guestbook erntries should open in new window (target _blank), regardless if and what target user enters.
Greetings, Bernd
-
- Phoca Newbie
- Posts: 2
- Joined: 14 May 2010, 15:16
- Location: Berlin / Leipzig
- Contact:
Re: Links in new window
Ahoj Jan,
Nemám najít Misto, kde jsem dal kód:
str_replace ("_self", "_blank", $ message);
muze vstoupit.
Prosím, Budte laskaví tak, jak PSAT ve kterém souboru, instalované na místě Kodu JE umožnit kterém propojení adresy otevřít v novem okně. Děkuji Vám ein
Ahoj Stefan und Karussell-Fanclub aus Berlin / Leipzig
Nemám najít Misto, kde jsem dal kód:
str_replace ("_self", "_blank", $ message);
muze vstoupit.
Prosím, Budte laskaví tak, jak PSAT ve kterém souboru, instalované na místě Kodu JE umožnit kterém propojení adresy otevřít v novem okně. Děkuji Vám ein
Ahoj Stefan und Karussell-Fanclub aus Berlin / Leipzig
- Jan
- Phoca Hero
- Posts: 48736
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Links in new window
com_phocaguestbook\views\phocaguestbook\tmpl\default.php
Before displaying the output, the str_replace will be done
Find the variable which include the output (I am sorry, I am not on my PC so I don't know its name) and add the str_replace function to this variable.
Jan
Before displaying the output, the str_replace will be done
Find the variable which include the output (I am sorry, I am not on my PC so I don't know its name) and add the str_replace function to this variable.
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 2
- Joined: 14 May 2010, 15:16
- Location: Berlin / Leipzig
- Contact:
Re: Links in new window
Ahoj,
Problem solved:
default.php file in line 160
changed to:
Greetings to Czech Republic and thanks for the nice guestbook
Stefan
Problem solved:
default.php file in line 160
Code: Select all
$gbPosts .= '<span><a href="'.$values->homesite.'">'.PhocaguestbookHelper::wordDelete($values->homesite, 50, '...').'</a></span>';
Code: Select all
$gbPosts .= '<span><a href="'.$values->homesite.'"target="_blank">'.PhocaguestbookHelper::wordDelete($values->homesite, 50, '...').'</a></span>';
Stefan
- Jan
- Phoca Hero
- Posts: 48736
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
-
- Phoca Member
- Posts: 13
- Joined: 26 Mar 2010, 13:22
Re: Links in new window
Hallo
danke diese Lösung habe ich auch gesucht!
danke diese Lösung habe ich auch gesucht!