| Featured |
Call of Duty 4 PHPNuke Theme, Call of Duty 4 PostNuke Theme, Call of Duty 4 Evo Theme, Call of Duty ...
$19.95
[ Enter Store ]
|
 |
| Main Menu |
|
|
 |
| Site Status |
Welcome Guest Join us!

  
 Registration is free and gives full access to site

Register | | | | Login:
|
| | | | | |  | Members: | | Today New: | 0 | | Yesterday: | 0 | | Total: | 6974 | | Last: | | leogetz |
| | | | | Online | | Members: | 0 | | Guests: | 7 | | Total: | 7 |
| | | | | Online Members | | No online members |
|
|
 |
|
| Author |
Message |
scotty |
|
Post subject: target="_blank" not working in news
Posted: Sep 11, 2007 - 06:40 PM
|
|
Joined: Sep 10, 2007
Posts: 5
Status: Offline
|
|
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 |
|
Post subject: RE: target="_blank" not working in news
Posted: Sep 11, 2007 - 08:10 PM
|
|
Site Admin

Joined: Aug 15, 2004
Posts: 3970
Status: Offline
|
|
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 |
|
Post subject:
Posted: Sep 11, 2007 - 08:27 PM
|
|
Joined: Sep 10, 2007
Posts: 5
Status: Offline
|
|
$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 |
|
Post subject:
Posted: Sep 11, 2007 - 08:49 PM
|
|
Site Admin

Joined: Aug 15, 2004
Posts: 3970
Status: Offline
|
|
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 |
|
Post subject:
Posted: Sep 11, 2007 - 08:54 PM
|
|
Joined: Sep 10, 2007
Posts: 5
Status: Offline
|
|
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 |
|
Post subject:
Posted: Sep 11, 2007 - 08:58 PM
|
|
Site Admin

Joined: Aug 15, 2004
Posts: 3970
Status: Offline
|
|
Glad to help  |
_________________
|
| |
|
|
|
 |
|
|
|
|
|