Autor Tema: Ayuda con cute news :P  (Leído 1280 veces)

Desconectado Shago

  • PHPero Avanzado
  • ****
  • Mensajes: 290
  • Karma: 3
  • :D
    • Ver Perfil
    • NINGUNO
Ayuda con cute news :P
« en: 14 de Marzo de 2008, 04:15:37 am »
bueno he instalado el cutenews pero la web que estoy haciendo es toda de negro y quiero quitarle los links que tienen las noticias y para ver los comentarios y todos esos links que estan abajo como hago? aqui les dejo el codigo

<?PHP

error_reporting 
(E_ALL E_NOTICE);

$cutepath =  __FILE__;
$cutepath preg_replace"&#39;\\\show_news\.php&#39;"""$cutepath);
$cutepath preg_replace"&#39;/show_news\.php&#39;"""$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 == &#39;rss&#39;){
   
include("$cutepath/data/rss_config.php");
}

//----------------------------------
// Check if we are included by PATH
//----------------------------------
if($HTTP_SERVER_VARS["HTTP_ACCEPT"] or $HTTP_SERVER_VARS["HTTP_ACCEPT_CHARSET"] or $HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"] or $HTTP_SERVER_VARS["HTTP_CONNECTION"]){ /* do nothing */ }
elseif(
eregi("show_news.php"$PHP_SELF)){
die(
"<h4>CuteNews has detected that you are including show_news.php using the URL to this file.<br>
This is incorrect and you must include it using the PATH to show_news.php</h4><br>Example:<br>
this is <font color=red>WRONG</font> :&nbsp;&nbsp; &lt;?PHP include(\"http://yoursite.com/cutenews/show_news.php\"); ?&gt;<br>
this is <font color=green>CORRECT</font>:&nbsp;&nbsp; &lt;?PHP include(\"cutenews/show_news.php\"); ?&gt;<br>
<br><BR>// <font size=2>if you think this message shouldn&#39;t be shown, open show_news.php and delete it from there</font>"
);
}
//----------------------------------
// End of the check
//----------------------------------

if(!isset($subaction) or $subaction == ""){ $subaction $POST["subaction"]; }

if(!isset(
$template) or $template == "" or strtolower($template) == "default"){ require_once("$cutepath/data/Default.tpl"); }
else{
        if(
file_exists("$cutepath/data/${template}.tpl")){ require("$cutepath/data/${template}.tpl"); }
    else{ die(
"Error!<br>the template <b>".htmlspecialchars($template)."</b> does not exists, note that templates are case sensetive and you must write the name exactly as it is"); }
}

// Prepare requested categories
if(eregi("[a-z]"$category)){
        die(
"<b>Error</b>!<br>CuteNews has detected that you use \$category = \"".htmlspecialchars($category)."\"; but you can call the categories only with their <b>ID</b> numbers and not with names<br>
    example:<br><blockquote>&lt;?PHP<br>\$category = \"1\";<br>include(\"path/to/show_news.php\");<br>?&gt;</blockquote>"
);
}
$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(
$subaction == "addcomment"){  $allow_add_comment        FALSE$allow_comments FALSE; }
    if(
$subaction == "showcomments"){ $allow_comments FALSE; }
    if((
$subaction == "showcomments" or $allow_comments == FALSE) 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 == "no"$allow_comments FALSE;

}
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[&#39;archive&#39;] and $_GET[&#39;archive&#39;] != &#39;&#39;){ $archive = $_GET[&#39;archive&#39;]; } // 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);
?>
Yo Estuve A los 10.000 Mensajes del Foro

Comunidad PHPeros

Ayuda con cute news :P
« en: 14 de Marzo de 2008, 04:15:37 am »

Desconectado mOrK

  • Moderador Global
  • PHPero Master
  • *****
  • Mensajes: 1.503
  • Karma: 43
  • :)
    • Ver Perfil
    • Sígueme en Twitter!
Re: Ayuda con cute news :P
« Respuesta #1 en: 14 de Marzo de 2008, 08:02:30 am »
Si mal no recuerdo: data/Default.tpl, ahí modificas el template del cutenews como te de la gana, dejando sólo la noticia, o con todo...

Era ese o Template.tpl (creo que estaban los dos, aunque su código es prácticamente igual, no recuerdo cual era el "bueno" (creo que default.tpl))

Saludos y suerte.

Desconectado Shago

  • PHPero Avanzado
  • ****
  • Mensajes: 290
  • Karma: 3
  • :D
    • Ver Perfil
    • NINGUNO
Re: Ayuda con cute news :P
« Respuesta #2 en: 14 de Marzo de 2008, 18:23:14 pm »
Gracias! ya pude con el Default.tpl
Yo Estuve A los 10.000 Mensajes del Foro