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

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

  3. В связи с участившимися случаями попыток продажи пользователями форума различных "сборок" коммерческих социальных платформ, обычно основанных на SocialEngine 3, вводится новое правило для форума. Запрещается создание тем или размещение в уже созданных предложений о продаже или размещение ссылок на сайты, где происходит продажа "сборок". Пользователи, которые продолжат свою коммерческую деятельность в данном направлении, будут заблокированы. Подробнее.
  4. Мы рады сообщить о выходе первого российского продукта для платформы phpFox 2-3. Продукт Interkassa-Sprypay Gateway Payment, позволит вам начать прием платежей в России без особых проблем. Зарабатывайте на платных подарках или получайте доходы с платной рекламы как на Facebook. Продукт работает со всеми модулями, которые используют платежные шлюзы.

    Все подробности о продукте в этой теме.

Request : NOTIFICATION SYSTEM V2

Discussion in 'Моды - Mods' started by mizio, Apr 30, 2011.

  1. mizio Thread starter Novice member


    Offline
    Message Count:
    14
    Likes Received:
    0
  2. dummy Novice member


    Offline
    Message Count:
    79
    Likes Received:
    0
  3. mizio Thread starter Novice member


    Offline
    Message Count:
    14
    Likes Received:
    0
    Thanks dummy !!!
    I have imported the product but i can not that in PHPfox 2 in the header ???


    [IMG]
    Picture from the original product page




    And the config options ???


    [IMG]
    Picture from the original product page




    Iam so sorry that iam not a profi in phpfox ;)
    Thanks for helping. All the best, Mizio
  4. dummy Novice member


    Offline
    Message Count:
    79
    Likes Received:
    0
    In AdminCP open CMS -> Block -> Edit Block -> find "core.index-member" You need find in some position block with name "Notification System" select edit and change position.

    notsis.jpg

    If you dont have that block you need creat it

    CMS -> Block -> Add Block

    Block parametrs is that:

    Product: PhpFox
    Modul: Notificationsystem
    Title: Notification System
    block type: PHP code
    Manager: core.index-member
    Position: 3 or other
    Active: yes

    Insert code:
    HTML:
    <?php
    
    $aMe = Phpfox::getUserBy('user_id');
    $aLimit = 5;
    $aRecords = 0;
    $aRequests = 0;
    
    If (Phpfox::getLib('phpfox.request')->get('num')){
    
    $aLimit = Phpfox::getLib('phpfox.request')->get('num');
    
    }
    
    $aRows = Phpfox::getLib('phpfox.database')
              ->select('a.mail_id, a.subject, a.preview, a.viewer_type_id, a.viewer_user_id, a.viewer_is_new, a.time_stamp, c.user_image, c.user_name, c.full_name, c.gender')
                ->from(Phpfox::getT('mail'), 'a')
                ->join(Phpfox::getT('user'), 'c', 'a.owner_user_id = c.user_id')
                ->where('a.viewer_user_id = "'.$aMe.'" and a.viewer_is_new = 1 and a.viewer_type_id = 0')
                ->order('time_stamp DESC')
                ->execute('getRows'); 
                
    foreach ($aRows as $aUser)
    {
    ++$aRecords;
    }
    
    $aRows = Phpfox::getLib('phpfox.database')
              ->select('a.user_id')
                ->from(Phpfox::getT('friend_request'), 'a')
                ->where('a.user_id = "'.$aMe.'"')
                ->order('time_stamp DESC')
                ->execute('getRows'); 
                
    foreach ($aRows as $aUser)
    {
    ++$aRequests;
    }
    
    $aNotifications = Phpfox::getService('notification')->get();
    	$iTotalNotifications = 0;
    	$aIsSeen = array();
    	foreach ($aNotifications as $aNotification)
    	{
    		if (!$aNotification['is_seen'])
    		{
    			$iTotalNotifications++;
    			$aIsSeen[] = $aNotification['notification_id'];
    		}
    	}
    
    
    
    
    // Message Icon	
    
    
    
    echo "
    <script>
    
    function toggle1() {
    
    if (document.getElementById('messages').style.display == 'none'){
    	
    	document.getElementById('messages').style.display = '';
    }else{
    	document.getElementById('messages').style.display = 'none';
    }
    }
    
    function toggle2() {
    if (document.getElementById('notification').style.display == 'none'){
    	
    	document.getElementById('notification').style.display = '';
    }else{
    	document.getElementById('notification').style.display = 'none';
    }
    }
    
    
    function messages() {
    
        document.getElementById('notification').style.display = 'none';
       }
      
    function notification() {
    
        document.getElementById('messages').style.display = 'none';
    
      }
      
      
      
      </script>
    ";
    
    echo '<div ><table><tr><td valign="top">';   
    echo '<a href="javascript:void(0)"  onmouseover="messages()" onclick="toggle1()">';
    
    if ($aRecords > 0){
    echo '<img src="'.Phpfox::getParam('core.path').'module/notificationsystem/images/email-icon.png"></a>';}else
    {
    echo '<img src="'.Phpfox::getParam('core.path').'module/notificationsystem/images/email-icon_no.png" ></a>';}
    
    if ($aRecords > 0) {echo '<div style="-moz-border-radius:3px; -webkit-border-radius:3px; position:relative; margin-left:30px; top: -15px; width: 20px; height: 18px; background-color:red"><center><font color=white size=2>'.$aRecords.'</font></center></div>';}
    echo '</td>';
    // End Message Icon	
    
    // Notification Icon
    echo '<td valign="top">';
    echo '<a href="javascript:void(0)"  onmouseover="notification()" onclick="toggle2()">';
    
    if ($iTotalNotifications > 0){
    echo '<img src="'.Phpfox::getParam('core.path').'module/notificationsystem/images/notification-icon.png" ></a>';}else
    {
    echo '<img src="'.Phpfox::getParam('core.path').'module/notificationsystem/images/notification-icon_no.png" ></a>';}
    
    if ($iTotalNotifications > 0) {echo '<div style="-moz-border-radius:3px; -webkit-border-radius:3px; position:relative; margin-left:30px; top: -15px; width: 20px; height: 18px; background-color:red"><center><font color=white size=2>'.$iTotalNotifications.'</font></center></div>';}
    // End Notification Icon 
    
    // Friends Icon
    echo '<td valign="top">';
    
    $aRequests_link = Phpfox::getLib('url')->makeUrl('friend.accept');
    
    if ($aRequests > 0){
    echo '<a href="'.$aRequests_link.'?phpMyAdmin=MziwDigSFyh-L6sxFJOcbqqOnDf"  onmouseover="friends()" >';
    }else{
    echo '<a href="javascript:void(0)"  onmouseover="friends()" >';
    }
    if ($aRequests > 0){
    echo '<img src="'.Phpfox::getParam('core.path').'module/notificationsystem/images/friends-icon.png" ></a>';}else
    {
    echo '<img src="'.Phpfox::getParam('core.path').'module/notificationsystem/images/friends-icon_no.png" ></a>';}
    
    if ($aRequests > 0) {echo '<div style="-moz-border-radius:3px; -webkit-border-radius:3px; position:relative; margin-left:30px; top: -15px; width: 20px; height: 18px; background-color:red"><center><font color=white size=2>'.$aRequests.'</font></center></div>';}
    // End Friends Icon 
     echo '</td></tr></table></div>';  
    ?>
    Here's other version 1,13 (Backup before install ! View attachment phpfox-product-notificationsystem-1.13.zip )
  5. mizio Thread starter Novice member


    Offline
    Message Count:
    14
    Likes Received:
    0
    THANK YOU SO MUCH !!!!

    But how i can i config this modul ???
    I can not fint this one :

    [IMG]
  6. dummy Novice member


    Offline
    Message Count:
    79
    Likes Received:
    0
    It's not my null, i dont know how add this block to adminCp, but you can edit block code and set all what you need. I dont use this module in my web. Try edit code good luck.
  7. kobra699 User


    Offline
    Message Count:
    159
    Likes Received:
    8
    Good idea but does not work,settings can not seem to work for non-existent.

Share This Page

All rights reserved SocEngine.ru ©