Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Parse error: syntax error, unexpected ‘/’ —-> i tried … but still there is an error

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #36319
    dagash
    Participant

    hi guys …
    i am working on wordpress theme , and i had some error here ..

    i working on comment form , and i would to put a text ( label ) after the input boxes .
    i tried many times but still there is error ..


    array(
    array(
    'author' => '

    ' . ( $req ? '*' : '' ) .
    '

    ',
    'email' => '',
    'url' => '

    ' .
    '

    ',
    ),
    'comment_notes_after' => '',
    'comment_field' => '

    '

    ));

    there is error here between line 1 to 10 …

    the error :


    Parse error: syntax error, unexpected '/'

    # another questions :
    1- how can i give the box a default value …? like (your name – your email …etc ) instead of put < labels > before or after boxes ..
    2- the < textarea > , i want to make it not sizable .. because it make a distortion ..

    #95440
    jamygolden
    Member

    Real question: The last item in the one array ‘url’ ends with a comma, try removing that.

    #another questions:
    1-



    2-Add this to your css:

    textarea {
    resize: none;
    }
    #95445
    dagash
    Participant

    for your 1st answer , another error appeared ..
    this is my comment.php file that work on it :


    /**
    * @package WordPress
    * @
    */
    ?>





    /* Stop the rest of comments.php from being processed,
    * but don't kill the script entirely -- we still have
    * to fully load the template.
    */
    return;
    endif;
    ?>

    // You can start editing here -- including this comment!
    ?>


    التعليقات على هذه التدوينة :





      'athoob_comment' ) ); ?>








    /* If there are no comments and comments are closed,
    * let's leave a little note, shall we?
    * But only on posts! We don't want the note on pages.
    */
    if ( ! comments_open() && ! is_page() ) :
    ?>







    'fields' => apply_filters( 'comment_form_default_fields', array(
    'author' => '

    ' . ( $req ? '*' : '' ) .
    '

    ',
    'email' => '',
    'url' => '

    ' .
    '

    '
    ),
    'logged_in_as' => '

    ' . sprintf( __( 'أنت مسجل باسم %2$s. خروج' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '

    ',
    'comment_notes_after' => '',
    'comment_field' => '

    '

    );
    ?>

    ?>
    #95457
    TheDoc
    Member

    This is line 62:

    'logged_in_as'             => '

    ' . sprintf( __( 'أنت مسجل باسم %2$s. خروج' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '

    ',

    I wonder if it’s not liking the language? Try replacing the above with this:

    'logged_in_as'             => '

    ' . sprintf( __( 'Logged in as %2$s. Log out?' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( ) ) ) ) . '

    ',

    If that works, then you know it’s something that you’ve changed that isn’t working.

    #95480
    dagash
    Participant

    still error in line 62

    #95483
    TheDoc
    Member

    You have 33 open brackets but only 32 closed brackets. Something isn’t being closed.

    #95523
    dagash
    Participant

    i cant find it ….

    #95550
    TheDoc
    Member

    Here:

    
    'fields' => apply_filters( 'comment_form_default_fields', array(
    'author' => '

    ' . ( $req ? '*' : '' ) .
    '

    ',
    'email' => '',
    'url' => '

    ' .
    '

    '
    ),
    'logged_in_as' => '

    ' . sprintf( __( 'أنت مسجل باسم %2$s. خروج' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '

    ',
    'comment_notes_after' => '',
    'comment_field' => '

    '

    ); // THIS IS CLOSING YOUR APPLY_FILTERS, NOT THE ARRAY
Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Back End’ is closed to new topics and replies.