Autor Tema: [AYUDA] Cutenews con las tildes y las ñ  (Leído 2608 veces)

Desconectado Jaime

  • PHPerit@
  • *
  • Mensajes: 10
  • Karma: 1
    • Ver Perfil
[AYUDA] Cutenews con las tildes y las ñ
« en: 20 de Octubre de 2009, 20:06:06 pm »
Hola. Tengo el cutenews y las tildes y las ñ en mi web se me ven como "?", he intentado cambiar código HTML de la noticia del cutenews este metodo:

Ñ = ñ
Á = á
É = é
Í = í
Ó = ó
Ü = ú

Pero tampoco funciona :S

Este es el head de mi web:
Código: [Seleccionar]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">

<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta name="description" content=""/>
<meta name="keywords" content="" />
<meta name="author" content="" />
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<title>TITULO</title>
</head>

Este problema solo me sucede con el cutenews, los demás texto externos al cutenews se ven perfectamente sin tener que cambiar nada.
ESPERO HABERME EXPLICADO. GRACIAS!! ;)
« Última modificación: 20 de Octubre de 2009, 20:14:32 pm por Jaime »

Comunidad PHPeros

[AYUDA] Cutenews con las tildes y las ñ
« en: 20 de Octubre de 2009, 20:06:06 pm »

Desconectado crunch

  • PHPer@ Fijo
  • ***
  • Mensajes: 168
  • Karma: 1
    • Ver Perfil
Re:[AYUDA] Cutenews con las tildes y las ñ
« Respuesta #1 en: 20 de Octubre de 2009, 20:32:38 pm »
Está pregunta ya está respondida en el foro.
No se debe al head de la web, se debe al head del archivo show_news.php

La codificación no está de la forma adecuada.

Sustituye la línea del head que sea algo así:
Código: [Seleccionar]
  <meta http-equiv="content-type" content="text/html; charset=..../>Y pon esto:
Código: [Seleccionar]
  <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
Espero que te haya servido, cualquier duda comentamela ;)

Desconectado Jaime

  • PHPerit@
  • *
  • Mensajes: 10
  • Karma: 1
    • Ver Perfil
Re:[AYUDA] Cutenews con las tildes y las ñ
« Respuesta #2 en: 24 de Octubre de 2009, 03:27:31 am »
Hola. Tengo el cutenews y las tildes y las ñ en mi web se me ven como "?", he intentado cambiar código HTML de la noticia del cutenews este metodo:

Ñ = &ntilde;
Á = &aacute;
É = &eacute;
Í = &iacute;
Ó = &oacute;
Ü = &uacute;

Pero tampoco funciona :S

Este es el head de mi web:
Código: [Seleccionar]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">

<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta name="description" content=""/>
<meta name="keywords" content="" />
<meta name="author" content="" />
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<title>TITULO</title>
</head>

Este problema solo me sucede con el cutenews, los demás texto externos al cutenews se ven perfectamente sin tener que cambiar nada.
ESPERO HABERME EXPLICADO. GRACIAS!! ;)

Muchas gracias, siento el doble post. Que raro no vi el otro :S

Desconectado Jaime

  • PHPerit@
  • *
  • Mensajes: 10
  • Karma: 1
    • Ver Perfil
Re:[AYUDA] Cutenews con las tildes y las ñ
« Respuesta #3 en: 24 de Octubre de 2009, 03:37:37 am »
Otra cosa, en show_news.php no me sale lo de meta. Este es el documento:
Código: [Seleccionar]
<?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");
}

//----------------------------------
// Check if we are included by PATH
//----------------------------------
if($_SERVER["HTTP_ACCEPT"] or $_SERVER["HTTP_ACCEPT_CHARSET"] or $_SERVER["HTTP_ACCEPT_ENCODING"] or $_SERVER["HTTP_CONNECTION"]){ /* do nothing */ }
elseif(eregi("show_news.php", $PHP_SELF)){
die("<h4>CuteNews ha detectado que estás incluyendo <b>show_news.php</b> usando la URL a este archivo.<br>
Esto es incorrecto. Debes incluirlo usando la RUTA a show_news.php</h4><br>Ejemplo:<br>
esto es <font color=red>INCORRECTO</font> :&nbsp;&nbsp; &lt;?PHP include(\"http://yoursite.com/cutenews/show_news.php\"); ?&gt;<br>
esto es <font color=green>CORRECTO</font>:&nbsp;&nbsp; &lt;?PHP include(\"cutenews/show_news.php\"); ?&gt;<br>
<br><BR>// <font size=2>si piensas que este mensaje no debe ser mostrado, abre show_news.php y borra este mensaje</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>el tema (skin) <b>".htmlspecialchars($template)."</b> no existe.<br> NOTA: Los temas son 'sensibles' a mayúsculas y minúsculas por lo que debes escribir el nombra tal y como es"); }
}

// Prepare requested categories
if(eregi("[a-z]", $category)){
        die("<b>Error</b>!<br>CuteNews ha detectado que usas \$category = \"".htmlspecialchars($category)."\"; pero solo puedes llamar a las categorías con sus números de <b>ID</b> y no con nombres<br>
    ejemplo:<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        = 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;

}
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);
?>
<!-- News Powered by CuteNews: http://cutephp.com/ -->
« Última modificación: 24 de Octubre de 2009, 03:39:47 am por Jaime »

Desconectado crunch

  • PHPer@ Fijo
  • ***
  • Mensajes: 168
  • Karma: 1
    • Ver Perfil
Re:[AYUDA] Cutenews con las tildes y las ñ
« Respuesta #4 en: 24 de Octubre de 2009, 11:20:06 am »
Sustituye tu show_news.php por esto ;)

Código: [Seleccionar]
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>

<body>
</body>
</html>
<?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");
}

//----------------------------------
// Check if we are included by PATH
//----------------------------------
if($_SERVER["HTTP_ACCEPT"] or $_SERVER["HTTP_ACCEPT_CHARSET"] or $_SERVER["HTTP_ACCEPT_ENCODING"] or $_SERVER["HTTP_CONNECTION"]){ /* do nothing */ }
elseif(eregi("show_news.php", $PHP_SELF)){
die("<h4>CuteNews ha detectado que estás incluyendo <b>show_news.php</b> usando la URL a este archivo.<br>
Esto es incorrecto. Debes incluirlo usando la RUTA a show_news.php</h4><br>Ejemplo:<br>
esto es <font color=red>INCORRECTO</font> :&nbsp;&nbsp; &lt;?PHP include(\"http://yoursite.com/cutenews/show_news.php\"); ?&gt;<br>
esto es <font color=green>CORRECTO</font>:&nbsp;&nbsp; &lt;?PHP include(\"cutenews/show_news.php\"); ?&gt;<br>
<br><BR>// <font size=2>si piensas que este mensaje no debe ser mostrado, abre show_news.php y borra este mensaje</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>el tema (skin) <b>".htmlspecialchars($template)."</b> no existe.<br> NOTA: Los temas son 'sensibles' a mayúsculas y minúsculas por lo que debes escribir el nombra tal y como es"); }
}

// Prepare requested categories
if(eregi("[a-z]", $category)){
        die("<b>Error</b>!<br>CuteNews ha detectado que usas \$category = \"".htmlspecialchars($category)."\"; pero solo puedes llamar a las categorías con sus números de <b>ID</b> y no con nombres<br>
    ejemplo:<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        = 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;

}
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);
?>
<!-- News Powered by CuteNews: http://cutephp.com/ -->

Desconectado Jaime

  • PHPerit@
  • *
  • Mensajes: 10
  • Karma: 1
    • Ver Perfil
Re:[AYUDA] Cutenews con las tildes y las ñ
« Respuesta #5 en: 25 de Octubre de 2009, 00:25:28 am »
Sigue sin verse  :(

Desconectado SoyJoaquin.

  • PHPero Master
  • ******
  • Mensajes: 2.737
  • Karma: 131
  • Sexo: Masculino
  • ส้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้ส้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้ Problem?
    • Ver Perfil
    • IsoMap
Re:[AYUDA] Cutenews con las tildes y las ñ
« Respuesta #6 en: 29 de Octubre de 2009, 19:40:51 pm »
no uses el utf-8...

cambialo por el ISO-8859-1

Saludos..
Ami me pasava lo mismo.. esta es la unica forma de solucionarlo...
no se x que la gente dise que el utf-8 lo soluciona u.u
Twitter: @JoakoM010