You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 207 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - NSN News module - need links to open in new browser [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
darren1234
Private
Private


Joined: Nov 12, 2006
Posts: 39


PostPosted: Thu Nov 23, 2006 3:24 am Reply with quoteBack to top

Hi wondered if someone could help me out.

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:
Code:
b=>1
i=>1
a=>2
em=>1
br=>1
strong=>1
blockquote=>1
tt=>1
li=>1
ol=>1
ul=>1
p=>1
hr=>1
align=>2
img=>2


i have tried just about everything i can think of when it comes to the target_blank code

ive tried:
Code:
target="_blank"=>1
target="_blank"=>2
target=>1
target=>2


anybody have any ideas?
thanks
Find all posts by darren1234View user's profileSend private message
darren1234
Private
Private


Joined: Nov 12, 2006
Posts: 39


PostPosted: Fri Nov 24, 2006 2:54 pm Reply with quoteBack to top

Anyone?
Find all posts by darren1234View user's profileSend private message
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12482


PostPosted: Sat Nov 25, 2006 12:06 am Reply with quoteBack to top

In mainfile.php

Code:

DELETE

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

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
darren1234
Private
Private


Joined: Nov 12, 2006
Posts: 39


PostPosted: Sat Nov 25, 2006 3:31 am Reply with quoteBack to top

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("&amp;","&",$attrb_list);
         $attrb_list = str_replace("&","&amp;",$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
Find all posts by darren1234View user's profileSend private message
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12482


PostPosted: Sun Nov 26, 2006 9:16 pm Reply with quoteBack to top

Looks like it was already removed.
What version of phpNuke are you using?

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
darren1234
Private
Private


Joined: Nov 12, 2006
Posts: 39


PostPosted: Tue Nov 28, 2006 4:07 am Reply with quoteBack to top

im using patched nuke 7.9
Find all posts by darren1234View user's profileSend private message
darren1234
Private
Private


Joined: Nov 12, 2006
Posts: 39


PostPosted: Wed Nov 29, 2006 4:09 pm Reply with quoteBack to top

can anybody help with this?
Find all posts by darren1234View user's profileSend private message
neralex
Nuke Cadet
Nuke Cadet


Joined: Jan 21, 2007
Posts: 4


PostPosted: Sat Jan 20, 2007 3:41 pm Reply with quoteBack to top

Evaders99 wrote:
In mainfile.php

Code:

DELETE

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


not in the mainfile!!
you must uncomment this line in the nsnne_func.php. this file was locatet in the includes folder of your phpnuke-root.

open includes/nsnne_func.php search in the near of line 81 for:
Code:
function ne_check_html($str, $strip=0) {


in this function search in the near of line 90 for:
Code:
$str = eregi_replace("<a[^>]*href[[:space:]]*=[[:space:]]*\"?[[:space:]]*([^\" >]*)[[:space:]]*\"?[^>]*>",'<a href="\\1">', $str);


and now uncomment or delete this line:
Code:
//$str = eregi_replace("<a[^>]*href[[:space:]]*=[[:space:]]*\"?[[:space:]]*([^\" >]*)[[:space:]]*\"?[^>]*>",'<a href="\\1">', $str);


Problem fixit Wink
Find all posts by neralexView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.088 Seconds - 237 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::