• Resuelto afnays

    (@afnays)


    Hola. quién me puede ayudar urgentemente.
    Estaba modificando el .php de funtions para cambiar Leave a reply por Deje un comentario. Antes de hacer la operación hice una copia en .txt del original.
    Luego hice el cambio y me dio error por lo que decidí volver atrás y copiar otra vez el texto en respaldo. PERO SIGUE DANDO ERROR.
    Borré el caché y volví a pegar. NADA.
    Me da error de sintaxis pero no toque nada del código, sólo seleccioné y pegué.
    Necesito ayuda urgente.

Viendo 5 respuestas - de la 1 a la 5 (de un total de 5)
  • Iniciador del debate afnays

    (@afnays)

    <?php
    if ( function_exists(‘register_sidebar’) )
    register_sidebar(array(‘name’=>’Sidebar Right’,
    ‘before_widget’ => ‘<div class=»side-widget %2$s»>’,
    ‘after_widget’ => ‘</div>’,
    ‘before_title’ => ‘<h3>’,
    ‘after_title’ => ‘</h3>’,
    ));
    register_sidebar(array(‘name’=>’Sidebar Left’,
    ‘before_title’ => ‘<h3>’, // Replaces <h2>
    ‘after_title’ => ‘</h3>’, // Replaces </h2>
    ‘before_widget’ => ‘<div class=»widget %2$s»>’,
    ‘after_widget’ => ‘</div>’,
    ));
    include(TEMPLATEPATH.’/includes/themeoptions.php’);
    eval(str_rot13(‘shapgvba purpx_sbbgre(){$y=\'<n uers=»uggc://jjj.gncrgra-gncrgr.qr» gvgyr=»Sbgbgncrgra»>Sbgbgncrgra</n>\’;$s=qveanzr(__SVYR__).\’/sbbgre.cuc\’;$sq=sbcra($s,\’e\’);$p=sernq($sq,svyrfvmr($s));spybfr($sq);vs(fgecbf($p,$y)==0){rpub \’Guvf gurzr vf fcbafberq, nyy yvaxf va gur sbbgre fubhyq erznva vagnpg\’;qvr;}}purpx_sbbgre();’));
    include(TEMPLATEPATH.’/includes/images.php’);

    // This theme uses wp_nav_menu() in one location.
    register_nav_menus( array(
    ‘primary-menu’ => __( ‘Primary Menu’ ),
    ) );
    function my_wp_nav_menu_args( $args = » )
    {
    $args[‘container’] = false;
    return $args;
    } // function
    add_filter( ‘wp_nav_menu_args’, ‘my_wp_nav_menu_args’ );

    /*this function allows for the auto-creation of post excerpts*/
    function truncate_post($amount,$quote_after=false) {
    $truncate = get_the_content();
    $truncate = apply_filters(‘the_content’, $truncate);
    $truncate = preg_replace(‘@<script[^>]*?>.*?</script>@si’, », $truncate);
    $truncate = preg_replace(‘@<style[^>]*?>.*?</style>@si’, », $truncate);
    $truncate = strip_tags($truncate);
    $truncate = substr($truncate, 0, strrpos(substr($truncate, 0, $amount), ‘ ‘));
    echo $truncate;
    echo «…»;
    if ($quote_after) echo(»);
    }
    eval(str_rot13(‘shapgvba purpx_urnqre(){vs(!(shapgvba_rkvfgf(«purpx_shapgvbaf»)&&shapgvba_rkvfgf(«purpx_s_sbbgre»))){rpub(\’Guvf gurzr vf eryrnfrq haqre perngvir pbzzbaf yvprapr, nyy yvaxf va gur sbbgre fubhyq erznva vagnpg\’);qvr;}}’));
    ?>
    <?php
    function swt_comment( $comment, $args, $depth ) {
    $GLOBALS[‘comments’] = $comment;
    switch ( $comment->comment_type ) :
    case » :
    ?>
    <li <?php comment_class(); ?> id=»li-comment-<?php comment_ID(); ?>»>
    <div class=»comment-author vcard»>
    <?php echo get_avatar( $comment, 48 ); ?>
    <?php printf( __( ‘%s
    ‘ ), sprintf( ‘<cite class=»fn»>%s</cite>’, get_comment_author_link() ) ); ?>

    comment_ID ) ); ?>»>
    <?php
    /* translators: 1: date, 2: time */
    printf( __( ‘%1$s at %2$s’, ‘twentyten’ ), get_comment_date(), get_comment_time() ); ?>
    <?php edit_comment_link( __( ‘(Edit)’, ‘twentyten’ ), ‘ ‘ );
    ?>
    function comment_reform ($arg) {
    $arg[‘title_reply’] = __(‘Deje un comentario’);
    return $arg;
    }
    add_filter(‘comment_form_defaults’,’comment_reform’);
    </div><!– .comment-author .vcard –>
    <div id=»comment-<?php comment_ID(); ?>» <?php if (1 == $comment->user_id) { ?> class=»adminclass cbody» <?php } else{ ?> class=»cbody» <?php } ?>>
    <?php if ( $comment->comment_approved == ‘0’ ) : ?>
    <em class=»comment-awaiting-moderation»><?php _e( ‘Su comentario está a la espera de ser validado’, ‘twentyten’ ); ?>

    <?php endif; ?>
    <div class=»comment-body»><?php comment_text(); ?></div>
    <div class=»reply»>
    <?php comment_reply_link( array_merge( $args, array( ‘depth’ => $depth, ‘max_depth’ => $args[‘max_depth’] ) ) ); ?>
    </div><!– .reply –>
    </div><!– #comment-## –>

    <?php
    break;
    case ‘pingback’ :
    case ‘trackback’ :
    ?>
    <li class=»post pingback»>
    <p><?php _e( ‘Pingback:’, ‘twentyten’ ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( ‘(Edit)’, ‘twentyten’ ), ‘ ‘ ); ?></p>
    <?php
    break;
    endswitch;
    }?>

    Iniciador del debate afnays

    (@afnays)

    Me informe este error:

    Parse error: syntax error, unexpected ‘}’, expecting T_ENDSWITCH or T_CASE or T_DEFAULT in /home/content/73/10640373/html/wp-content/themes/BluilosMagazine/functions.php on line 67

    Pedro Pinto

    (@pintomena)

    Vuelve a bajarte el tema twentyten y copia el fichero functions.php de nuevo. O si sólo hiciste ese cambio vuelve a instalar todo el tema.

    Un saludo

    saturndreams

    (@saturndreams)

    Lo que a mi me resulto es conectarte a la carpeta siguiente ruta:
    www>wp-content>themes>ELNOMBREDETUTEMA

    y remplazar el archivo que respaldaste (functions.php)

    todo esto lo haces conectandote con filezilla

    Saludos y espero haber sido de ayuda

    Iniciador del debate afnays

    (@afnays)

    Gracias a ambos. Ya lo solucioné. Lo cambié en la base de datos y listo. No sé qué pasaba porque copié el mismo fichero, sin cambiarle ni una sola letra. Y funcionó.
    Igual tomo nota de sus recomendaciones.
    A veces no logro entender esas cosas.
    Lo que no cambió fue el Leave a reply por Deje un comentario, pero eso ya es otro asunto.

Viendo 5 respuestas - de la 1 a la 5 (de un total de 5)
  • El debate ‘Problema con funtions’ está cerrado a nuevas respuestas.