Cytat(Wieviór @ 13.03.2008, 16:18:50 )

Po prostu w pliku show_news.php musisz zmienić linijkę generującą adres, z
Kod
http://www.bartasp.superhost.pl/NJP/cutenews/
na:
Kod
http://www.bartasp.superhost.pl/NJP/newsy.php
Oczywiście nie kasując wszystkich tych warunków późniejszych.
include nie działa jak iframe, pamiętaj ;]
nie działa :\ co zamienić?
? Wyskakuje błąd .Nie wiem czy rozumiesz dokładnie o co mi chodziii w tym temacie?
Chce po naciśnieciu wiecej lub komentarz zeby wyswietlał mi sie w schemacie tak jak jest strona zrobiona a nie na białym okranie!!!plik show_news.php:<?PHP
error_reporting (E_ALL ^ E_NOTICE);
$cutepath = __FILE__;
$cutepath = preg_replace( "'\\\show_news\.php'", "", $cutepath);
$cutepath = preg_replace( "'/show_news\.php'", "", $cutepath);
require_once("$cutepath/inc/functions.inc.php");
require_once("$cutepath/data/config.php");
// If we are showing RSS, include some need variables.
if($template == 'rss'){
include("$cutepath/data/rss_config.php");
}
if(!isset($subaction) or $subaction == ""){ $subaction = $POST["subaction"]; }
if(!isset($template) or $template == "" or strtolower($template) == "default"){ require_once("$cutepath/data/tpl/Default.tpl"); }
else{
if(file_exists("$cutepath/data/tpl/${template}.tpl")){ require("$cutepath/data/tpl/${template}.tpl"); }
else{ die("B³±d!<br>Schemat <b>".htmlspecialchars($template)."</b> nie istnieje. Pamiêtaj, ¿e schematy rozró¿niaj± ma³e i wielkie znaki - musisz napisaæ nazwê dok³adnie tak samo."); }
}
// Prepare requested categories
if(eregi("[a-z]", $category)){
die("<b>B³±d</b>!<br>CuteNews wykry³o, ¿e u¿ywasz \$category = \"".htmlspecialchars($category)."\"; ale mo¿esz odnosiæ siê do kategorii tylko za pomoc± ich numerów <b>ID</b>, a nie za pomoc± ich nazw<br>
przyk³ad:<br><blockquote><?PHP<br>\$category = \"1\";<br>include(\"path/to/show_news.php\");<br>?></blockquote>");
}
// Negative Categories v1.0 - addblock
$negativeCategories = false;
if ($category[0] == '-') {
$negativeCategories = true;
$category = substr($category, 1);
}
// Negative Categories v1.0 - End addblock
$category = preg_replace("/ /", "", $category);
$tmp_cats_arr = explode(",", $category);
foreach($tmp_cats_arr as $key=>$value){
if($value != ""){ $requested_cats[$value] = TRUE; }
}
if($archive == ""){
$news_file = "$cutepath/data/news.txt";
$comm_file = "$cutepath/data/comments.txt";
}else{
$news_file = "$cutepath/data/archives/$archive.news.arch";
$comm_file = "$cutepath/data/archives/$archive.comments.arch";
}
$allow_add_comment = FALSE;
$allow_full_story = FALSE;
$allow_active_news = FALSE;
$allow_comments = FALSE;
//<<<------------ Detarime what user want to do
//if( $CN_HALT != TRUE and $static != TRUE and ($subaction == "showcomments" or $subaction == "showfull" or $subaction == "addcomment") and ((!isset($category) or $category == "") or ($requested_cats[$ucat] == TRUE ) ) ){
if( $CN_HALT != TRUE and $static != TRUE and ($subaction == "showcomments" or $subaction == "showfull" or $subaction == "addcomment") and ((!isset($category) or $category == "" or $negativeCategories == TRUE) or ($requested_cats[$ucat] == TRUE ) ) ){ if($subaction == "addcomment"){ $allow_add_comment = TRUE; $allow_comments = TRUE; }
if($subaction == "showcomments"){ $allow_comments = TRUE; }
if(($subaction == "showcomments" or $allow_comments == TRUE) and $config_show_full_with_comments == "yes"){$allow_full_story = TRUE; }
if($subaction == "showfull") $allow_full_story = TRUE;
if($subaction == "showfull" and $config_show_comments_with_full == "yes") $allow_comments = TRUE;
}
//Calendar
elseif($subaction == "showcalendar") $allow_show_calendar = TRUE;
//Calendar
else{
if($config_reverse_active == "yes"){ $reverse = TRUE; }
$allow_active_news = TRUE;
}
//----------->>> Detarime what user want to do
require("$cutepath/inc/shows.inc.php");
if($_GET['archive'] and $_GET['archive'] != ''){ $archive = $_GET['archive']; } // stupid fix ?
unset($static, $template, $requested_cats, $category, $catid, $cat,$reverse, $in_use, $archives_arr, $number, $no_prev, $no_next, $i, $showed, $prev, $used_archives);
?>
PLIK newsy.php:<?
/*****************************************************/
/* jPORTAL - internetowy system portalowy */
/*****************************************************/
/* autor: Pawel 'jaco' Jaczewski */
/* email: info@websys.pl */
/*****************************************************/
include('config.php');
#=====================================================#
if(isset($id)) {
banner_click($id);
}
#=====================================================#
function site_main() {
global $id;
$id = htmlspecialchars($id);
main_title_open();
echo'';
main_title_close();
main_text_open();
include ("http://www.bartasp.superhost.pl/NJP/cutenews/show_news.php");
main_text_close();
}
#=====================================================#
$site_title = '';
$meta_info = '';
include("theme/$theme/index.php");
?>