+ Reply to Thread
Results 1 to 8 of 8

Thread: Problema con Cutenews :S

  1. #1
    SoulEaterARG is offline x10Hosting Member SoulEaterARG is an unknown quantity at this point
    Join Date
    Jul 2008
    Posts
    5

    Problema con Cutenews :S

    Hola gente como van? bueno escribo aqui porque tengo un problemita que no me deja avanzar en nada.. :S con el cutenews, este es el error:
    Code:
    Catchable fatal error: Object of class template could not be converted to string in /home/seater/public_html/noticias/inc/functions.inc.php on line 20
    este codigo sale cuando integro el cutenews en la web mediante
    PHP Code:
    <?PHP include("noticias/show_news.php"); ?>
    al principio pense que era por la version php, pero me pase al intermedio pero aun asi sigue sin tirar las noticias.. :S
    desde ya gracias y hasta luego..

  2. #2
    ZharkD's Avatar
    ZharkD is offline Retired ZharkD is an unknown quantity at this point
    Join Date
    Jan 2008
    Location
    MX
    Posts
    5,914

    Re: Problema con Cutenews :S

    lo que pasa es ke debes utilizar este codigo:
    PHP Code:
    <?PHP include("/home/seater/public_html/noticias/show_news.php"); ?>
    Si te fijas, aki incluyes la ruta desde el directorio "home" hasta donde esta el cutenews


    salu2
    Last edited by ZharkD; 07-16-2008 at 05:06 PM.

  3. #3
    SoulEaterARG is offline x10Hosting Member SoulEaterARG is an unknown quantity at this point
    Join Date
    Jul 2008
    Posts
    5

    Re: Problema con Cutenews :S

    Gracias lo voy a probar..enseguida les cuento que pasa.. ;)




    Sigue sin funcionar.. :S y con el mismo error.. :S
    Last edited by SoulEaterARG; 07-17-2008 at 12:33 PM.

  4. #4
    eZakto is offline x10 Lieutenant eZakto is an unknown quantity at this point
    Join Date
    May 2006
    Location
    Salta, Argentina.
    Posts
    394

    Re: Problema con Cutenews :S

    Podrías postear las líneas de la 15 a la 25 del archivo functions.inc.php?

  5. #5
    SoulEaterARG is offline x10Hosting Member SoulEaterARG is an unknown quantity at this point
    Join Date
    Jul 2008
    Posts
    5

    Re: Problema con Cutenews :S

    okas ahora te las paso ..
    Edit:
    PHP Code:

    //----------------------------------
    // Sanitize Variables
    //----------------------------------
    if( isset($template) and $template != "" and !eregi("^[_a-zA-Z0-9-]{1,}$"$template)){ die("invalid template characters"); }
    if( isset(
    $archive) and $archive != "" and !eregi("^[_a-zA-Z0-9-]{1,}$"$archive)){ die("invalid archive characters"); }



    if(
    $PHP_SELF == ""){ $PHP_SELF $HTTP_SERVER_VARS["PHP_SELF"]; } 
    Last edited by SoulEaterARG; 07-17-2008 at 01:10 PM. Reason: Automerged Doublepost

  6. #6
    eZakto is offline x10 Lieutenant eZakto is an unknown quantity at this point
    Join Date
    May 2006
    Location
    Salta, Argentina.
    Posts
    394

    Re: Problema con Cutenews :S

    ¿Qué se supone que es $template?
    Si se trata de un objeto, si dicho objeto no tiene el método __toString entonces no puede ser tratado como una cadena de texto, que es lo que estás haciendo.

    Saludos.

  7. #7
    SoulEaterARG is offline x10Hosting Member SoulEaterARG is an unknown quantity at this point
    Join Date
    Jul 2008
    Posts
    5

    Re: Problema con Cutenews :S

    bueno ya descubri el problema.. :S, lo que pasa es que tengo un include y un codigo php antes para que llame el foro por que tengo el sistema de usuarios integrado al del foro..
    Alguna idea sobre lo que puedo hacer?
    Last edited by SoulEaterARG; 07-17-2008 at 03:59 PM.

  8. #8
    eZakto is offline x10 Lieutenant eZakto is an unknown quantity at this point
    Join Date
    May 2006
    Location
    Salta, Argentina.
    Posts
    394

    Re: Problema con Cutenews :S

    Ese error se debe a que estás tratando al un objeto como cadena, y no puedes.
    Cito de php.net:
    [As of (at least) PHP 5.2, you can no longer convert an object to a string unless it has a __toString method. Converting an object without this method now gives the error:

    PHP Catchable fatal error: Object of class <classname> could not be converted to string in <file> on line <line>

    Try this code to get the same results as before:

    PHP Code:
    <?php

    if (!is_object($value) || method_exists($value'__toString')) {
        
    $string = (string)$value;
    } else {
        
    $string 'Object';
    }

    ?>

+ Reply to Thread

Similar Threads

  1. {Tutorial} Using CuteNews
    By Zenax in forum Tutorials
    Replies: 1
    Last Post: 02-09-2008, 05:34 PM
  2. Problema con Cutenews
    By Kansy in forum Soporte
    Replies: 6
    Last Post: 11-27-2007, 10:11 AM
  3. CuteNews News Installation
    By WoWChat in forum The Marketplace
    Replies: 0
    Last Post: 10-16-2007, 05:12 PM
  4. Problema con cutenews
    By yearzero in forum Soporte
    Replies: 2
    Last Post: 09-28-2007, 11:08 AM
  5. Problema con hosting, ftp, acceso...
    By MaZice in forum Soporte
    Replies: 2
    Last Post: 08-26-2007, 04:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers