Im using the NSN news module on my site, but have encountered a small hitch.
We are a pc hardware review site and so have lots of web news and affiliate news to post, usually this takes form as a small image + news title + plus little info then and clickable link which takes people directly to the news in question.
this works fine appart from the fact that the link opens the page in the same window - taking people away from my site (who wants to hit the back button 50 times to get back to my site?)
what i want to do is have the link open in a new window - sounds simple?
not in the case of nsn news module. for some reason it is cancelling out the fact i want it to do this.
here is the code im using:
Code:
<img src="image url goes in here" align="left"> <strong>Product name in here</strong>
a bit of info here...
<a href="review url address" target="_blank"><em>Full News @ site name here</em></a>
In the nsn news admin configuration it has a list of allowed html tags:
Hi thanks for the reply
I have looked in my mainfile.php in nuke root
and the only code i can find that reswembles the code you said i had to delete is:
Code:
function check_html ($str, $strip="") {
/* The core of this code has been lifted from phpslash */
/* which is licenced under the GPL. */
include("config.php");
if ($strip == "nohtml") $AllowableHTML = array('');
$str = eregi_replace("<[[:space:]]*([^>]*)[[:space:]]*>",'<\\1>', $str);
// Delete all spaces from html tags .
// Delete all attribs from Anchor, except an href, double quoted.
$str = eregi_replace("<[[:space:]]* img[[:space:]]*([^>]*)[[:space:]]*>", '', $str);
// Delete all img tags
$str = eregi_replace("<a[^>]*href[[:space:]]*=[[:space:]]*\"?javascript[[:punct:]]*\"?[^>]*>", '', $str);
// Delete javascript code from a href tags -- Zhen-Xjell @ http://nukecops.com
$tmp = "";
while (ereg("<(/?[[:alpha:]]*)[[:space:]]*([^>]*)>",$str,$reg)) {
$i = strpos($str,$reg[0]);
$l = strlen($reg[0]);
if ($reg[1][0] == "/") $tag = strtolower(substr($reg[1],1));
else $tag = strtolower($reg[1]);
if ($a = (isset($AllowableHTML[$tag])) ? $AllowableHTML[$tag] : 0)
if ($reg[1][0] == "/") $tag = "</$tag>";
elseif (($a == 1) || (empty($reg[2]))) $tag = "<$tag>";
else {
# Place here the double quote fix function.
$attrb_list=delQuotes($reg[2]);
// A VER
$attrb_list = str_replace("&","&",$attrb_list);
$attrb_list = str_replace("&","&",$attrb_list);
$tag = "<$tag" . $attrb_list . ">";
} # Attribs in tag allowed
else $tag = "";
$tmp .= substr($str,0,$i) . $tag;
$str = substr($str,$i+$l);
}
$str = $tmp . $str;
$str = str_replace("<br>", "<br />", $str);
return $str;
exit;
/* Squash PHP tags unconditionally */
$str = str_replace("<?","",$str);
return $str;
I cannot find anything else within the mainfile.php which matches what you wrote.
Last edited by darren1234 on Tue Nov 28, 2006 4:08 am; edited 1 time in total
Evaders99 Site Admin
Joined: Aug 17, 2003
Posts: 12389
Posted:
Sun Nov 26, 2006 9:16 pm
Looks like it was already removed.
What version of phpNuke are you using?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum