Witam. Nie wiem jak zrobic, aby po kliknieciu w link strona otwierala sie w nowym oknie.
Probowalem tak ale nie dziala:
[a]http://www.bet.p2u.pl target=_blank[a2]Forum sportowe[/a]
<? $news_path=$path["dirname"]; require "$news_path/news/config.php"; if($debug==0){ } function err_msg($message_text){ echo "<p align=\"center\" style=\"font-family: $font_face; font-size:$font_size;\"> $message_text</p>\n"; } function show_news($show_num, $newsid){ require "$news_path/news/config.php"; $newsdata="$news_path/news/data/newsdata.dat"; $max=$news_total-$show_num; if($_GET["list"]=="all"){ $max=0; } if($max<0){$max=0;} if($newsid!=-1){ $news_total=$newsid+1; $max=$newsid; } $NEWSHEADTEXT="\nNowo¶ci w serwisie:"; }elseif($_GET["news_action"]=="more"){ $NEWSHEADTEXT="\nPe³ny tekst newsa:"; }elseif($_GET["news_action"]=="comments" || $_GET["news_action"]=="new_comment"){ $NEWSHEADTEXT="\nPodgl±d newsa:"; } include "$news_path/news/template/$theme/top.tpl"; for($i=$news_total-1; $i>=$max; $i--){ $NEWSTITLE=$data[0]; $NEWSDATE=$data[1].", ".$data[2]; $img_file=$news_path."/news/images/topics/".$data[7]; if($max_img_width>0 && $img_size[0]>$max_img_width){$resize=$img_size[0]-$max_img_width;}else{$resize=0;} $width=$img_size[0]-$resize; } if($data[7]!=""){$NEWSIMAGE="<center> <img src=\"".$page_url."news/images/topics/".$data[7]."\" border=\"0\" width=\"".$width."\"> </center>\n";} else{$NEWSIMAGE="<center> <img src=\"$default_img\" border=\"0\"\"> </center>\n";} if($default_img=="" && $data[7]==""){$NEWSIMAGE="";} if($disable_images==1){$NEWSIMAGE="";} if($show_mail=="on"){ $NEWSAUTHOR="<a href=\"mailto:$data[5]\">$data[4]</a>\n"; }else{ $NEWSAUTHOR=$data[4]; } if($newsid>-1){ $max_length=$words_all; }else{ $max_length=$max_news_length; if($max_length>=$words_all){ $max_length=$words_all; }else{ $add_end=("..."); } } $NEWSBODY=""; for($z=0; $z<$max_length; $z++){ $NEWSBODY .= " ".$newstext[$z]; } $NEWSBODY=$NEWSBODY.$add_end; if($add_end!=""){ $NEWSFULLSHOW=" \n[ <a href=".$_SERVER["PHP_SELF"]."?news_action=more&newsid=$i> czytaj wiêcej</a> ]\n"; }else{ $NEWSFULLSHOW=""; } $NEWSBODY=$NEWSBODY.$NEWSFULLSHOW; if($disable_comments!=1 && ($_GET["news_action"]=="display" || $_GET["news_action"]=="" || $_GET["news_action"]=="more")){ $NEWSCOMMENTS="<a href=".$_SERVER["PHP_SELF"]."?news_action=comments&news_base=$comment_file&newsid=$i> komentarze</a> [".$data[6]."]\n"; $NEWSADDCOMMENT="<a href=".$_SERVER["PHP_SELF"]."?news_action=new_comment&news_base=$comment_file&newsid=$i> skomentuj</a>\n"; $NEWSCOMMENTSLINKS=$NEWSCOMMENTS." | ".$NEWSADDCOMMENT; $NEWSPRINT="<a href=".$page_url."news/printnews.php?newsid=$i target=\"_blank\"> drukuj</a>\n"; }else{ $NEWSCOMMENTSLINKS=""; } $NEWSMENULINKS=$NEWSCOMMENTSLINKS; if($disable_print==0 && $disable_comments!=1 && $NEWSMENULINKS!=""){ $NEWSMENULINKS.=" | "; } if($disable_print==0){ $NEWSMENULINKS.=$NEWSPRINT; } $PRINTPAGE="$news_path/news/printnews.php"; include "$news_path/news/template/$theme/news.tpl"; } if($_GET["list"]=="" && $newsid==-1){ $BOTTOMLINKS="<a href=\"".$_SERVER["PHP_SELF"]."?list=all\"> wszystkie newsy</a> [$news_total]\n"; }else{ $BOTTOMLINKS="<a href=\"".$_SERVER["PHP_SELF"]."\"> ostatnie newsy</a> [$show_num]\n"; } $BOTTOMLINKS="<a href=\"news/admin.php\"> administracja</a> | ".$BOTTOMLINKS; if($news_total<=$show_num){ $BOTTOMLINKS="<a href=\"news/admin.php\"> administracja</a>"; } if($_GET["news_action"]=="more"){ $BOTTOMLINKS="<a href=\"".$_SERVER["PHP_SELF"]."\"> ostatnie newsy</a> [$show_num]"; } include "$news_path/news/template/$theme/bottom.tpl"; if($_GET["news_action"]==""||$_GET["news_action"]=="display" || $_GET["news_base"]=="" || $_GET["news_action"]=="more"){ } }else{ echo "<p align=\"center\"> Plik z newsami \"$newsdata\" nie zosta³ odnaleziony!</p>\n"; } } function show_comments($newsid, $news_base){ require "$news_path/news/config.php"; if($disable_comments==1){ err_msg("<b>Obs³uga komentarzy jest wy³±czona!</b>\n"); }else{ show_news($show_num,$_GET["newsid"]); $comments_file=$news_path."/news/data/comments/$news_base.dat"; err_msg("<b>Nie odnaleziono bazy komentarzy dla wybranego newsa!</b><br><br> [ <a href=\"".$_SERVER["PHP_SELF"]."?news_action=new_comment&newsid=".$_GET["newsid"]."&news_base=".$_GET["news_base"]."\"> skomentuj</a> ]"); }else{ $NEWSHEADTEXT="Komentarze do newsa:\n"; include "$news_path/news/template/$theme/top.tpl"; for($x=0; $x<$comments_no; $x++){ $COMMENTDATE=$data[3].", ".$data[4]; $COMMENTSBODY=$data[2]; $COMMENTSAUTHOR="<a href=\"mailto:"."$data[1]"."\">"."$data[0]"."</a>"; if($COMMENTSHOSTDATA==""){ $COMMENTSHOSTDATA="brak danych"; } if($COMMENTSIPDATA==""){ $COMMENTSIPDATA="brak danych"; } include "$news_path/news/template/$theme/comment.tpl"; } $BOTTOMLINKS="<a href=".$_SERVER["PHP_SELF"]."?news_action=new_comment&news_base=$news_base&newsid=$newsid> skomentuj</a> | <a href=\"#top\">do góry</a> | <a href=\"".$_SERVER["PHP_SELF"]."\"> ostatnie newsy</a> [$show_num]\n"; include "$news_path/news/template/$theme/bottom.tpl"; } ?>
<?php if($_POST["savenews"]==" zapisz "){ $newsbody=str_replace("[a2]", "\" >", $newsbody); if($newsnr=="" || $newsdate=="" || $newshour=="" || $newstitle=="" || $newsbody=="" || $newsauthor=="" || $newsemail==""){ ?>
<?php $newsbody=str_replace("[a2]", "\" >", $newsbody); ?>
<?php $newsbody = preg_replace('/.*?(http://)?(www.)?([a-zA-Z0-9@#%&_=~?/.-]+.)([a-zA-Z0-9]{2,4})?.*?/','<a target="_blank" href="http://www.34">www.34</a>',$newsbody); $newsbody = preg_replace('/+.)([a-zA-Z0-9]{2,4})?.*?](.*?)/','<a target="_blank" href="http://34">5</a>',$newsbody); ?>