1. Мы продолжаем публиковать интересные статьи на тему SocialEngine 4. Одна из статей посвящена правильному выбору сервера для вашей социальной сети, а другая содержит советы по увеличению производительности платформы. Также мы добавили большую статью о пользовательских уровнях. Ознакомиться со статьями вы можете в разделе Вопросы и Ответы SocialEngine 4.
  2. Вам кажется, что ваша версия SocialEngine 4, работает медленно?

    Голосуйте. Пишите свою версию системы, железо на чем работает и количество пользователей. Будем увеличивать производительность :-) Подробнее

  3. В связи с участившимися случаями попыток продажи пользователями форума различных "сборок" коммерческих социальных платформ, обычно основанных на SocialEngine 3, вводится новое правило для форума. Запрещается создание тем или размещение в уже созданных предложений о продаже или размещение ссылок на сайты, где происходит продажа "сборок". Пользователи, которые продолжат свою коммерческую деятельность в данном направлении, будут заблокированы. Подробнее.

Wall Plugin - Плагин Стена (Что Нового)

Discussion in 'Hire-Experts' started by Prado, Feb 12, 2010.

  1. vitalikxzx User


    Offline
    Message Count:
    43
    Likes Received:
    1
    А шаб стандартный или свой?
  2. Ugunis Novice member


    Offline
    Message Count:
    15
    Likes Received:
    2
    шаб не стандартный, но встал как литой, там особо изменений-то нет, только картинки.
    в общем с перекосами в браузерах разобрались, все нормально там, но с камментами по прежнему беда, постит как-то странно, пачками.
  3. Ugunis Novice member


    Offline
    Message Count:
    15
    Likes Received:
    2
    Проблема решилась отключением кеширования в SE!!
  4. Prado Thread starter Challenge Everything


    Offline
    • Admin
    Message Count:
    3,191
    Likes Received:
    786
    My version of phpFox:
    3.0.0
    [IMG]

    Open header.php
    scroll down to the end and paste on the line before the end of php delimiter (?>). Paste this:
    Code:
    if ($page == 'profile')
    {
    session_start();
    $_SESSION['prof_owner'] = $owner->user_displayname;
    $_SESSION['prof_username'] = $owner->user_info[user_username];
    $_SESSION['action_username'] = $user->user_info[user_username];
    //echo $_SESSION['action_username'];
    }
    elseif ($page == 'user_home')
    {
    session_start();
    $_SESSION['prof_username'] = "same";
    $_SESSION['action_username'] = "same";
    }
    else
    {
    session_start();
    $_SESSION['prof_owner'];
    $_SESSION['prof_username'];
    $_SESSION['action_username'];
    }
    $myownprof = $_SESSION['prof_owner'];
    $prof_owner = $_SESSION['prof_username'];
    $real_owner = $_SESSION['action_username'];
    
    Go to he_wall_ajax_request.php
    Right after the opening php delimiter (<?php) paste this:
    Code:
    session_start();
    On line 87 find elseif ( $task == 'post_action' ). We will be replacing everything from that line to around line 332 just before the elseif ($task == 'paging'). Paste the following block of codes:
    Code:
    elseif ( $task == 'post_action' )
    {
    
    	$first_action_id = isset($_POST['first_action_id']) ? (int)$_POST['first_action_id'] : false;
    	$action_privacy_level = isset($_POST['action_privacy_level']) ? (int)$_POST['action_privacy_level'] : 63;
    	$text = isset($_POST['text']) ? trim($_POST['text']) : '';
        $new_action_id = he_wall::new_action_id();
    	
        $ctext = he_wall_format_text($text);
    	
    	if ($prof_owner == $real_owner)
    	{
    	$text = he_wall_format_text($text);
    	}
    	else 
    	{
    	$text = " &raquo; <a href='profile.php?user=".$prof_owner."'>".$myownprof."</a>: ".$ctext;
    	}
        he_wall::add_action( $action_object_owner, $wall_object_id, $text, $action_privacy_level );
        he_wall::new_post_notify($wall_object, $wall_object_id, $new_action_id);
        
        $result = he_wall_actions_display($wall_object, $wall_object_id, $first_action_id);
    	
    }
    elseif ( $task == 'share_photo' )
    {
    	$headers_sent = true;
    	
        $new_action_id = he_wall::new_action_id();
        $text = isset($_POST['text']) ? trim($_POST['text']) : '';
        $privacy_level = isset($_POST['wall_action_privacy']) ? (int)$_POST['wall_action_privacy'] : 63;
        
        $upload_result = array();
        
        if ( $wall_object == 'group' )
        {
        	$upload_result = he_wall_group_photo_upload($wall_object_id, $text, $new_action_id);
        }
        elseif ( isset($global_plugins['album']) && $setting['setting_he_wall_photo_sync'] )
        {
        	$upload_result = he_wall_photo_upload($text, $new_action_id);
        }
        else
        {
            $upload_result = he_wall_custom_photo_upload($new_action_id);
        }
        
        if ( $upload_result['result'] == 1 )
        {
        	$ctext = he_wall_format_text($text);
    		if ($prof_owner == $real_owner)
    	{
    	$text = he_wall_format_text($text);
    	}
    	else 
    	{
    	$text = " posted a picture on <a href='profile.php?user=".$prof_owner."'>".$myownprof."'s</a> profile<br />".$ctext;
    	}
    		
        	$replace_arr = array( $user->user_info['user_username'], $user->user_displayname, $text );
        	
        	$action_media = array();
        	$action_media[] = array(
                'media_link' => $url->url_base . 'wall_action.php?id=' . $new_action_id,
        	    'media_path' => $upload_result['media_path'],
                'media_width' => $upload_result['media_width'],
                'media_height' => $upload_result['media_height']
        	);
        	
        	$actions->actions_add($user, 'wallpostphoto', $replace_arr, $action_media, 0, true, $action_object_owner, $wall_object_id, $privacy_level);
            he_wall::new_post_notify($wall_object, $wall_object_id, $new_action_id);
        	
        	$result = array( 'result' => 1 );
        }
        else
        {
            $result = array( 'result' => 0, 'message' => $upload_result['error'] );
        }
    }
    elseif ( $task == 'share_music' )
    {
    	$headers_sent = true;
    	
        $text = isset($_POST['text']) ? trim($_POST['text']) : '';
        $privacy_level = isset($_POST['wall_action_privacy']) ? (int)$_POST['wall_action_privacy'] : 63;
        $new_action_id = he_wall::new_action_id();    
        
        $upload_result = array();
        
        if ( isset($global_plugins['music']) && $setting['setting_he_wall_music_sync'] )
        {
        	$upload_result = he_wall_music_upload();
        }
        else
        {
        	$upload_result = he_wall_custom_music_upload($new_action_id);
        }
        
        if ( $upload_result['result'] == 1 )
        {
        	$ctext = he_wall_format_text($text);
    		if ($prof_owner == $real_owner)
    	{
    	$text = he_wall_format_text($text);
    	}
    	else 
    	{
    	$text = " uploaded a music to <a href='profile.php?user=".$prof_owner."'>".$myownprof."'s</a> profile<br />".$ctext;
    	}
            $player = '<div class="wall_music_container"><div id="action_music_' . $new_action_id . '" class="wall_music_player">' .
                '<script type="text/javascript">/* <![CDATA[ */' .
                    'AudioPlayer.embed("action_music_' . $new_action_id . '", ' .
                        '{soundFile: "' . $upload_result['file_url'] . '",titles: "' . $upload_result['title'] . '"});' .
    			'/* ]]> */</script>' .
    			'</div></div>';
        
            $replace_arr = array( $user->user_info['user_username'], $user->user_displayname, $text, $upload_result['title'], $player );
            $actions->actions_add($user, 'wallpostmusic', $replace_arr, array(), 0, false, $action_object_owner, $wall_object_id, $privacy_level);
    
            he_wall::new_post_notify($wall_object, $wall_object_id, $new_action_id);        
            
            if ( isset($upload_result['music_id']) && $upload_result['music_id'] )
            {
            	he_wall::add_music_action_link($user->user_info['user_id'], $new_action_id, $upload_result['music_id']);
            }
            
            $result = array( 'result' => 1 );
        }
        else
        {
            $result = array( 'result' => 0, 'message' => $upload_result['error'] );
        }
    }
    elseif ( $task == 'new_actions' )
    {
    	$first_action_id = isset($_POST['first_action_id']) ? (int)$_POST['first_action_id'] : false;
    	
        $result = he_wall_actions_display($wall_object, $wall_object_id, $first_action_id);
    }
    elseif ( $task == 'post_link' )
    {
        $first_action_id = isset($_POST['first_action_id']) ? (int)$_POST['first_action_id'] : false;
        $action_privacy_level = isset($_POST['action_privacy_level']) ? (int)$_POST['action_privacy_level'] : 63;
        $text = isset($_POST['text']) ? trim($_POST['text']) : '';
        $link = isset($_POST['link']) ? trim($_POST['link']) : '';
        
        $new_action_id = he_wall::new_action_id();
        
        if ( strstr($link, 'https://') !== false )
        {
        	$link_label = str_replace('https://', '', $link);
        	$link_url = 'https://' . $link_label;
        }
        else
        {
        	$link_label = str_replace('http://', '', $link);
        	$link_url = 'http://' . $link_label;
        }
        
        $ctext = he_wall_format_text($text);
    	if ($prof_owner == $real_owner)
    	{
    	$text = he_wall_format_text($text);
    	}
    	else 
    	{
    	$text = " posted a link on <a href='profile.php?user=".$prof_owner."'>".$myownprof."'s</a> profile<br />".$ctext;
    	}
        $replace_arr = array( $user->user_info['user_username'], $user->user_displayname, $text, $link_url, $link_label );
        $actions->actions_add($user, 'wallpostlink', $replace_arr, array(), 0, false, $action_object_owner, $wall_object_id, $action_privacy_level);
        
        he_wall::new_post_notify($wall_object, $wall_object_id, $new_action_id);
        
        $result = he_wall_actions_display($wall_object, $wall_object_id, $first_action_id);
    }
    elseif ( $task == 'post_video' )
    {
        $first_action_id = isset($_POST['first_action_id']) ? (int)$_POST['first_action_id'] : false;
        $action_privacy_level = isset($_POST['action_privacy_level']) ? (int)$_POST['action_privacy_level'] : 63;
        $text = isset($_POST['text']) ? trim($_POST['text']) : '';
        $video_provider = isset($_POST['video_provider']) ? trim($_POST['video_provider']) : '';
        $video_url = isset($_POST['video_url']) ? trim($_POST['video_url']) : '';
        
        if ( $video_provider != 'youtube' && $video_provider != 'vimeo' )
        {
        	$result = array( 'result' => 0, 'message' => SE_Language::get(690706072) );
        }
        elseif ( $video_url == '' )
        {
        	$result = array( 'result' => 0, 'message' => SE_Language::get(690706073) );
        }
        else
        {
        	$new_action_id = he_wall::new_action_id(); 
        	
        	if ( $video_provider == 'vimeo' )
        	{
        		$upload_result = he_wall_vimeo_video_upload($new_action_id, $video_url);
        	}
        	elseif ( $video_provider == 'youtube' )
        	{
                if ( isset($global_plugins['video']) && $setting['setting_he_wall_video_sync'] )
                {
                	$upload_result = he_wall_youtube_video_upload($new_action_id, $video_url, $action_privacy_level);
                }
                else
                {
                    $upload_result = he_wall_youtube_video_custom_upload($new_action_id, $video_url);
                }
        	}
        	
        	if ( $upload_result['result'] == 1  )
        	{
        		$ctext = he_wall_format_text($text);
    			if ($prof_owner == $real_owner)
    	{
    	$text = he_wall_format_text($text);
    	}
    	else 
    	{
    	$text = " posted a video on <a href='profile.php?user=".$prof_owner."'>".$myownprof."'s</a> profile<br />".$ctext;
    	}
        		
        		$video_player = '<a href="javascript://" onclick="he_wall_show_player(this);" class="photo_cont video_thumb">' .
                    '<span class="video_length">' . $upload_result['video_length'] . '</span>' .
                    '<img class="recentaction_media" src="' . $upload_result['media_src'] . '"/></a>' .
                    '<div class="video_cont display_none">' . $upload_result['player'] . '</div>';
    
        		$video_info = '<div class="video_info"><a href="' . $upload_result['video_url'] . '" class="video_title">' . $upload_result['title'] .
                    '</a><div class="video_desc">' . he_wall_format_text($upload_result['description']) . '</div></div>';
        		
        		$replace_arr = array( $user->user_info['user_username'], $user->user_displayname, $text, $video_player, $video_info );
                $actions->actions_add($user, 'wallpostvideo', $replace_arr, array(), 0, false, $action_object_owner, $wall_object_id, $action_privacy_level);
                
                he_wall::new_post_notify($wall_object, $wall_object_id, $new_action_id);
                
                $result = he_wall_actions_display($wall_object, $wall_object_id, $first_action_id);
                $result['result'] = 1;
        	}
        	else
        	{
        		$result = $upload_result; 
        	}
        }
    }
    
    
  5. Gooos абырвалГ


    Offline
    • Admin
    Message Count:
    2,435
    Likes Received:
    645
    My version of SE:
    3.20
    Походу это добавляет видео.
    Тогда где правка в wall.tpl?
    Где дополнительные изображения?
    В общем сделал, как тут и нет ничего. ;)
  6. galstuk Famous member


    Offline
    • Знаменитый
    Message Count:
    398
    Likes Received:
    151
    Короче говоря, вышла новая версия плагина плагина Wall 3.2
    Обновляется стандартным образом,через админку.

    Добавлено новое:

    Загрузка видео
    Интеграция с группами,альбомами,фото,видео

    Только у меня почему-то видео так и не загружается и ничего не происходит после обновления.... Интеграция с группами-прикольно.

    Некоторые фразы не переведены. Думаю,админы сайта допереведут,раз уж первую версию перевода сделали.

    Ну а так, вот список изменений от производителя:

    * Wall Snippet Code. Now wall can be shown not only in Profile page but also in any wished SocialEngine page by just putting Wall Snippet Code(we provide a simple instruction in admin panel)
    * Share Videos! Your users can share YouTube and Vimeo videos, play them via flash player and all these things don't require any page reloads!
    * Wall synchronization with Plugins. It is one of most requested feature and we're glad to present you flexible bridge between Wall and Photo Albums, Music, Video plugins(from SocialEngine). So all posted photos, music, videos are saved in appropriate plugin but Wall doesn't require them so users can share content even if you don't have these plugins.
    * Privacy preferrences. Admin can allow users to set privacy for each post - everyone, only friends, within subnetwork, etc
    * Email Notifications. Users can choose when they want to receive email notifications:
    - when someone post to their wall
    - when someone comment their post
    - when someone like their post
    * Wall integrated into Groups plugin! Now each group has own wall so group members can share and have fun within a group. Also all posted photos are added into Group Photo Album.
    * Many other enhancements: - Wall(snippet code version) show activity of whole network instead of just friends
    - Profile wall shows only owner's activity and everything which is posted to this wall
    - Admin can permit/forbid user levels for using of Wall
    - Posts and comments length are limited - up to 1000 characters. It shows "More" link if user has typed more than 300 characters
    - Shared links are opened in new window
    - Wall checks allowed space for music and photos which user can upload according to plugins' settings

    Качаем в аттаче.

    Attached Files:

  7. Prado Thread starter Challenge Everything


    Offline
    • Admin
    Message Count:
    3,191
    Likes Received:
    786
    My version of phpFox:
    3.0.0
    Ммм хорошо, что напомнил про 3.20 :)
  8. galstuk Famous member


    Offline
    • Знаменитый
    Message Count:
    398
    Likes Received:
    151
    Только перевод плагина в новости не обновили....;)
  9. sherilyn Novice member


    Offline
    Message Count:
    8
    Likes Received:
    0
    у меня после установки, фотки, рядом с событием на стене, отображаются "сплющенными". есть какие-нить мысли?

    UPD. таааак, я понял)
  10. Prado Thread starter Challenge Everything


    Offline
    • Admin
    Message Count:
    3,191
    Likes Received:
    786
    My version of phpFox:
    3.0.0

Share This Page

All rights reserved SocEngine.ru ©