• Resolved nalzsf

    (@nalzsf)


    I was trying to make comments visible on the event page itself. Read the forum and saw some codings… But they don’t work.

    $seatt_output .= '<li>' . $user_info->user_login . ' - ' . $user_info->user_comment . '</li>';

    AND

    $seatt_output .= '<li>' . $user_info->user_login . ' - ' . $user->user_comment . '</li>';

    AND

    $seatt_output .= '<li>' . $user_info->user_login . ' - ' . $attending->user_comment . '</li>';

    Am I missing something?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Dave

    (@sourcez)

    Hi nalzsf – depending on the version, the below should help.

    If you want them on the event page, you could change the following:

    $users = $wpdb->get_results($wpdb->prepare("SELECT id, user_id FROM ".$wpdb->prefix."seatt_attendees WHERE event_id = %d ORDER BY id ASC", $event_id));
    
    			$num = 1;
    			foreach ($users as $user) {
    				$user_info = get_userdata($user->user_id);
    				$seatt_output .= '<li>' . esc_html($user_info->user_login) . '</li>';
    				$num++;
    			}

    to something like:

    $users = $wpdb->get_results($wpdb->prepare("SELECT id, user_id, user_comment FROM ".$wpdb->prefix."seatt_attendees WHERE event_id = %d ORDER BY id ASC", $event_id));
    
    			$num = 1;
    			foreach ($users as $user) {
    				$user_info = get_userdata($user->user_id);
    				$seatt_output .= '<li>' . esc_html($user_info->user_login) . ' - ' . esc_html($user->user_comment) . '</li>';
    				$num++;
    			}

    Essentially you need to:
    1) Add “user_comment” to the database call
    2) Add “$user->user_comment” in the loop

    Thread Starter nalzsf

    (@nalzsf)

    Hi, thanks for your response!

    1) Add “user_comment” to the database call
    2) Add “$user->user_comment” in the loop

    How do I do that?

    Plugin Author Dave

    (@sourcez)

    Hello again,

    Currently you’ll have to edit the script yourself. The easiest way to do this without downloading and uploading files is to login to the wordpress admin panel and use the editor there. Note that if you update the script, any changes you have made will be overwritten.
    1) Login to WP-Admin
    2) Go to Plugins > Editor on the side menu
    3) Select SEATT on the top right
    4) Select seatt_events_include.php
    5) You can search for $users, this will take you to the first query you need to edit. Switch the code mentioned above and hit update file

    That should get you up and running, let me know how you get on.

    Thread Starter nalzsf

    (@nalzsf)

    Hi I’ve figured it out.

    Thread Starter nalzsf

    (@nalzsf)

    Thanks!

    Plugin Author Dave

    (@sourcez)

    Great – what was the issue?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Show comments’ is closed to new replies.