Author |
Message |
12/06/2007 02:46:55
|
CHwebby
Beginner
Joined: 12/04/2006 13:03:04
Messages: 15
Offline
|
I have my guestbook set up in frames. Clicking on the home icon within posts works and opens in a new window just fine. But where can I add code (maybe base target code) so when someone posts a link in their guestbook entry that that also will open in a new window. Right now it gets stuck in my frames.
|
|
12/06/2007 08:15:33
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
|
You'd have to edit the AGcode eregi_replace function in vars.class.php.
|
Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
12/06/2007 16:20:13
|
CHwebby
Beginner
Joined: 12/04/2006 13:03:04
Messages: 15
Offline
|
thanx I'm a php n00b. I tried the below following to no avail. Am I missing something here?
function AGCode($string) {
$string=eregi_replace("\\[img\\](http://[^\\[]+)\\[/img\\]","<img src=\"\\1\" border=0>",$string);
$string=eregi_replace("\\[b\\]([^\\[]*)\\[/b\\]","<b>\\1</b>",$string);
$string=eregi_replace("\\[i\\]([^\\[]*)\\[/i\\]","<i>\\1</i>",$string);
$string=eregi_replace("\\[email\\]([^\\[]*)\\[/email\\]","<a href=\"mailto:\\1\">\\1</a>",$string);
$string=eregi_replace("\\[url\\]www.([^\\[]*)\\[/url\\]","<a href=\"http://www.\\1\" target=\"new\">\\1</a>",$string);
$string=eregi_replace("\\[url\\]([^\\[]*)\\[/url\\]","<a href=\"\\1\" target=\"new\">\\1</a>",$string);
$string=eregi_replace("\\[url=http://([^\\[]+)\\]([^\\[]*)\\[/url\\]","<a href=\"http://\\1\" target=\"new\">\\2</a>",$string);
return $string;
}
|
|
12/06/2007 16:28:42
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
|
target=\"_blank\"
|
Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
12/06/2007 18:59:52
|
CHwebby
Beginner
Joined: 12/04/2006 13:03:04
Messages: 15
Offline
|
thanx... target blank was what was originally there but it still didn't open up in a new window.
Hmmmmm weird
|
|
|