Portal Themes

General Theme Discussions - target="_blank" not working in news

scotty - Sep 11, 2007 - 06:40 PM
Post subject: target="_blank" not working in news
I have been working on this problem fo 3 days. I run phpnuke 8.1 and using a free theme here called ambertech. So my version of AT is the one packaged in phpnuke 8.1.

I want my links in my news section to open in a new window. The code Im using is target="_blank". I see from the forums at nukecops that I have to allow the html in my config.php. here is what i added to my config.php

$AllowableHTML = array("b"=>1,
"i"=>1,
"a"=>2,
"em"=>1,
"br"=>1,
"strong"=>1,
"blockquote"=>1,
"tt"=>1,
"li"=>1,
"ol"=>1,
"H1"=>1,
"H2"=>1,
"H3"=>1,
"H4"=>1,
"center"=>1,
"img"=>2,
"alt"=>1,
"table"=>2,
"tr"=>2,
"td"=>2,
"p"=>2,
"div"=>2,
"font"=>2,
"p"=>1,
"p"=>1,
"target"=>2,
"href"=>2,

"hspace"=>2,
"embed"=>2,
"ul"=>1);

I have also tried adding this to my mainfile.php to no avail. My host is globat.com and Ive been using dreamweaver as my editor. Ive also tried to edit the config and main file with the onsite editor.

Any help would be great.


EDIT- I tried using the wysiwyg inside of phpnuke to open a new window for a link and that dosnt work either. -EDIT
mars - Sep 11, 2007 - 08:10 PM
Post subject: RE: target="_blank" not working in news
All you should need is the "a"=>2
Then make sure you have all the attributes in quotes when you make the link
IE
Code:

<a href="index.php" target="_blank">Link Text</a>

scotty - Sep 11, 2007 - 08:27 PM
Post subject:
$AllowableHTML = array("b"=>1,"i"=>1,"strike"=>1,"div"=>2,"u"=>1,"a"=>2,"em"=>1,"br"=>1,"strong"=>1,"blockquote"=>1,"tt"=>1,"li"=>1,"ol"=>1,"ul"=>1); Thats my new line in my config.php

$AllowableHTML=array("a"=>2);
Thats my new line from mainfile.php

<a href="http://www.wowarmory.com/"target="_blank">The Amory</a>
Thats my link in the news section.

It still opens in self window. When I open the story to edit it onsite the target="_blank"> is gone. Something is wiping out the code. Is there a way to disable the whole sites html check? Because Im at a total loss here.

The site is http://www.hordeforlife.com
mars - Sep 11, 2007 - 08:49 PM
Post subject:
Can you look for the line
Code:

   $str = eregi_replace("<a[^>]*href[[:space:]]*=[[:space:]]*\"?[[:space:]]*([^\" >]*)[[:space:]]*\"?[^>]*>",'<a href="\\1">', $str);


In your mainfile.php
Then put two slashes in front of it and try it
Code:

 //   $str = eregi_replace("<a[^>]*href[[:space:]]*=[[:space:]]*\"?[[:space:]]*([^\" >]*)[[:space:]]*\"?[^>]*>",'<a href="\\1">', $str);

scotty - Sep 11, 2007 - 08:54 PM
Post subject:
Your are my GOD. I bow to your greatness. I shall sacrifice small animals in your honor........well instead ill just buy a theme from you!
Thank you oh so very much!
mars - Sep 11, 2007 - 08:58 PM
Post subject:
Glad to help Wink
All times are GMT - 5 Hours
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits