• I did install wp symposium and everything works fine but the frontend view. If I load the profile-page for example there is only shown lot’s of code and no content 🙁 What’s wrong?! Here you can see a part of the code:

    prefix."symposium_subs WHERE uid = %d"; $wpdb->query( $wpdb->prepare($sql, $current_user->ID)); } echo 'OK'; exit; } // Remove Avatar if ($_POST['action'] == 'remove_avatar') { global $wpdb; if (is_user_logged_in()) { $uid = $_POST['uid']; $sql = "UPDATE ".$wpdb->base_prefix."symposium_usermeta SET profile_avatar = '', profile_photo = '' WHERE uid = %d"; $avatar = $wpdb->get_var($wpdb->prepare($sql, $uid)); } echo 'OK'; exit; } // Poke if ($_POST['action'] == 'send_poke') { global $wpdb, $current_user; wp_get_current_user(); if (is_user_logged_in()) { $recipient = $_POST['recipient']; $subject = __('You have been sent a ', 'wp-symposium').WPS_POKE_LABEL; $url = symposium_get_url('profile'); $message = "".$current_user->display_name."".__(' has sent you a ', 'wp-symposium').WPS_POKE_LABEL; // Add to activity symposium_add_activity_comment($current_user->ID, $current_user->display_name, $recipient, WPS_POKE_LABEL, 'poke'); // Get comment ID $sql = "SELECT cid FROM ".$wpdb->base_prefix."symposium_comments WHERE author_uid = %d ORDER BY cid DESC LIMIT 0,1"; $cid = $wpdb->get_var($wpdb->prepare($sql, $current_user->ID)); // Filter to allow further actions to take place apply_filters ('symposium_send_poke_filter', $recipient, $current_user->ID, $current_user->display_name, WPS_POKE_LABEL, $cid ); // Send mail if ( $rows_affected = $wpdb->prepare( $wpdb->insert( $wpdb->base_prefix . "symposium_mail", array( 'mail_from' => $current_user->ID, 'mail_to' => $recipient, 'mail_sent' => date("Y-m-d H:i:s"), 'mail_subject' => $subject, 'mail_message' => $message ) ) ) ) { echo 'OK'; } else { echo 'FAIL'; } } exit; } // Update Facebook ID if ($_POST['action'] == 'facebook_id') { global $wpdb, $current_user; if (is_user_logged_in()) { update_symposium_meta($current_user->ID, 'facebook_id', $_POST['facebook_id']); if ($_POST['facebook_id'] != '') { if (!class_exists('FacebookApiException')) { require_once '../../wp-symposium-facebook/library/facebook.php'; } $app_id = WPS_FACEBOOK_API; $app_secret = WPS_FACEBOOK_SECRET; $facebook = new Facebook(array( 'appId' => $app_id, 'secret' => $app_secret, 'cookie' => true )); echo "{$facebook->getLoginUrl(array('scope' => 'publish_stream'))}"; exit; } echo "OK"; } exit; } // Update Profile Avatar if ($_POST['action'] == 'saveProfileAvatar') { global $wpdb; if (is_user_logged_in()) { $uid = $_POST['uid']; $x = $_POST['x']; $y = $_POST['y']; $w = $_POST['w']; $h = $_POST['h']; $r = ''; if ($w > 0) { // set new size and quality $targ_w = $targ_h = 200; $jpeg_quality = 90; // database or filesystem if (WPS_IMG_DB == 'on') { // Using database $sql = "SELECT profile_avatar FROM ".$wpdb->base_prefix."symposium_usermeta WHERE uid = %d"; $avatar = stripslashes($wpdb->get_var($wpdb->prepare($sql, $uid))); // create master from database $img_r = imagecreatefromstring($avatar); // set new size $targ_w = $targ_h = 200; // create temporary image $dst_r = ImageCreateTrueColor( $targ_w, $targ_h ); // copy to new image, with new dimensions imagecopyresampled($dst_r,$img_r,0,0,$x,$y,$targ_w,$targ_h,$w,$h); // copy to variable ob_start(); imageJPEG($dst_r); $new_img = ob_get_contents(); ob_end_clean(); // update database with resized blob $wpdb->update( $wpdb->base_prefix.'symposium_usermeta', array( 'profile_avatar' => addslashes($new_img) ), array( 'uid' => $uid ), array( '%s' ), array( '%d' ) ); $r = 'reload'; } else { // Using filesystem $profile_photo = $wpdb->get_var($wpdb->prepare("SELECT profile_photo FROM ".$wpdb->base_prefix.'symposium_usermeta WHERE uid = '.$uid)); $src = WPS_IMG_PATH."/members/".$uid."/profile/".$profile_photo; $img_r = imagecreatefromjpeg($src); $dst_r = ImageCreateTrueColor($targ_w, $targ_h); if ( imagecopyresampled($dst_r,$img_r,0,0,$x,$y,$targ_w,$targ_h,$w,$h) ) { $to_path = WPS_IMG_PATH."/members/".$uid."/profile/"; $filename = time().'.jpg'; $to_file = $to_path.$filename; if (file_exists($to_path)) { // folder already there } else { mkdir(str_replace('//','/',$to_path), 0777, true); } if ( imagejpeg($dst_r,$to_file,$jpeg_quality) ) { // update database $wpdb->update( $wpdb->base_prefix.'symposium_usermeta', array( 'profile_photo' => $filename ), array( 'uid' => $uid ), array( '%s' ), array( '%d' ) ); $r = 'reload'; } else { $r = 'conversion to jpeg failed'; } } else { $r = 'crop failed: '.$src.','.$dst_r.','.$img_r.','.$wpdb->last_query; } } } else { $r = "Please select an area in your uploaded image."; $r = "reload"; } } else { $r = "NOT LOGGED IN"; } echo $r; exit; } // AJAX function to add status if ($_POST['action'] == 'addStatus') { global $wpdb, $current_user; wp_get_current_user(); if (is_user_logged_in()) { if (isset($_POST['subject_uid'])) { $subject_uid = $_POST['subject_uid']; } else { $subject_uid = $current_user->ID; } $author_uid = $current_user->ID; $text = $_POST['text']; $facebook = $_POST['facebook']; if (is_user_logged_in()) { if ( ($text != __(addslashes(WPS_STATUS_POST), "wp-symposium")) && ($text != '') ) { $wpdb->query( $wpdb->prepare( " INSERT INTO ".$wpdb->base_prefix."symposium_comments ( subject_uid, author_uid, comment_parent, comment_timestamp, comment, is_group ) VALUES ( %d, %d, %d, %s, %s, %s )", array( $subject_uid, $author_uid, 0, date("Y-m-d H:i:s"), $text, '' ) ) ); // New Post ID $new_id = $wpdb->insert_id; // Subject's name for use below $subject_name = $wpdb->get_var($wpdb->prepare("SELECT display_name FROM ".$wpdb->base_prefix."users WHERE ID = %d", $subject_uid)); // Email the subject (if they want to know about it and not self-posting) if ($author_uid != $subject_uid) { // Filter to allow further actions to take place apply_filters ('symposium_wall_newpost_filter', $subject_uid, $author_uid, $current_user->display_name ); $sql = "SELECT u.user_email FROM ".$wpdb->base_prefix."users u LEFT JOIN ".$wpdb->base_prefix."symposium_usermeta m ON u.ID = m.uid WHERE u.ID = %d AND m.notify_new_wall = 'on'"; $recipient = $wpdb->get_row($wpdb->prepare($sql, $subject_uid)); if ($recipient) { $body = "
    
    ".$current_user->display_name." ".__('has added a new post on your profile', 'wp-symposium').":
    "; $body .= "
    
    ".stripslashes($text)."
    "; $body .= "

    http://wordpress.org/extend/plugins/wp-symposium/

  • The topic ‘[Plugin: WP Symposium A Social Network For WordPress] don't get WP Symposium started…’ is closed to new replies.