1. Важное и срочное обновление IPB 3.4.5 - https://nulled.cc/threads/243375/

[Помощь] PZ23-Статистика Top 5 v1.1

Тема в разделе "IPB", создана пользователем Гульсина, 22 май 2009.

Статус темы:
Закрыта.
Модераторы: Maybe
  1. Гульсина

    Гульсина Постоялец

    Регистр.:
    21 июн 2008
    Сообщения:
    65
    Симпатии:
    2
    Помогите плиз решить проблемку, перелопатила все файлы шаблоны не смогла понять, в мод инстайлере файлик не рискую редактировать

    Как сменить содержимое отмеченное галочкой?
    Я хочу туда баннер вставить, или вообще где меняется все это добро?

    [​IMG]


    Спасибо за помощь.

    Неужеле никто не знает? (
     
  2. Сергiй

    Сергiй

    Регистр.:
    19 ноя 2006
    Сообщения:
    352
    Симпатии:
    338
    Название "Просмотров профиля", думаю понятно, в ланг файле, содержимое в sources/lib/func_top5stats.php строки 137-139
    Код:
    $this->output .= "<tr><td width=\"85%\" title=\"" . $this->ipsclass->lang['top_dispyrtxt'] . "\"><a href=\"" . $this->ipsclass->base_url . "showuser=" . $row['id'] . "\">";
    $this->output .=  $formatname . "</a></td>";
    $this->output .= "<td align=\"right\" width=\"15%\" class=\"desc\" title=\"" . $this->ipsclass->lang['top_profies'] . "\">" . $row['members_profile_views'] . "</td></tr>";
    
    Смотрел PZ23-Top 5 Statistics v1.0
     
    Гульсина нравится это.
  3. Гульсина

    Гульсина Постоялец

    Регистр.:
    21 июн 2008
    Сообщения:
    65
    Симпатии:
    2
    Спасибо.. Но не подскажите какую строчку заменить на свою? (Код баннера) :ah:
     
  4. Сергiй

    Сергiй

    Регистр.:
    19 ноя 2006
    Сообщения:
    352
    Симпатии:
    338
    вместо этих трёх строчек, вставьте свою
    $this->output .= "код банера, и перед все ковычки в этом коде поставить слеш";
     
    Гульсина нравится это.
  5. Гульсина

    Гульсина Постоялец

    Регистр.:
    21 июн 2008
    Сообщения:
    65
    Симпатии:
    2
    У меня нет какжется этих строк, искала поиском.


    PHP:
    <?php

    /*=======================*\
    | CYBER-CITY | Metropolis |
    +-------------------------+
    | http://cyber-city.ru    |
    \*=======================*/

    /*
    +--------------------------------------------------------------------------
    |   [PZ23] Top 5 Statistics v1.1
    |   =============================================
    |   by Elad Nava of Platinum Zone
    |   (c) 2007 Elad Nava
    |   http://pznetworks.com
    |   =============================================
    |   Web: http://pznetworks.com
    +---------------------------------------------------------------------------
    |   > $Revision: 48 $
    |   > $Author: John $
    +---------------------------------------------------------------------------
    |
    |   > [PZ23] Top 5 Statistics module
    |   > Module written by Elad Nava of Platinum Zone
    |   > Date started: 29th June 2008
    |
    |> Module Version Number: 1.1
    +--------------------------------------------------------------------------
    */

    if ( ! defined'IN_IPB' ) )
    {
        print 
    "<h1>Некорректный адрес</h1>Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы.";
        exit();
    }

    class 
    top5stats
    {
        function 
    display()
        {
            
    //-----------------------------------------
            // INIT...
            //-----------------------------------------

            
    $dayAgo    time() - (24 60 60);

            
    //-----------------------------------------
            // Link to settings
            //-----------------------------------------

            
    $modOn                $this->ipsclass->vars['pz_top5stats'];
            
    $truncateAmount        $this->ipsclass->vars['pz_truncation'];
            
    $excludedGroups        $this->ipsclass->vars['pz_top5exgroups'];
            
    $newsForums            $this->ipsclass->vars['pz_newsforums'] == 'null' '' $this->ipsclass->vars['pz_newsforums'];

            
    //-----------------------------------------
            // Set up forum view permissions
            //-----------------------------------------

            
    $permittedForums    = array();

            foreach ( 
    $this->ipsclass->forums->forum_by_id as $forum )
            {
                if ( 
    $forum['id'] )
                {
                    
    $permittedForums[] = $forum['id'];
                }
            }

            
    //-----------------------------------------
            // Load our skin templates
            //-----------------------------------------

            
    $this->ipsclass->load_template('skin_top5stats');

            if ( 
    $modOn && ! in_array$this->ipsclass->member['mgroup'], explode","$excludedGroups ) ) )
            {
                
    //-----------------------------------------
                // Output statistics table
                //-----------------------------------------

                
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->stats();

                
    //-----------------------------------------
                // Select latest news
                //-----------------------------------------

                
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->td25 );

                if ( ! 
    $newsForums )
                {
                    
    //-----------------------------------------
                    // Kindly alert the admin of the problem
                    //-----------------------------------------

                    
    $this->output .= "<p class=\"desc\"><span style=\"color:red;font-weight:bold\">Внимание:</span> Выберите разделы последних новостей форума. Для этого пройдите в  Админцентр ---> Настройки [вкладка] ---> [PZ23] Статистика Top 5 v1.1 ---> <b>Разделы последних новостей</b>!</p>";
                }
                else
                {
                    
    //-----------------------------------------
                    // Select latest news from news forums
                    //-----------------------------------------

                    
    $this->ipsclass->DB->simple_construct( array( 'select' => 'tid, last_post, start_date, title''from' => 'topics''where' => "forum_id IN(".$newsForums.")"'order' => 'start_date DESC''limit' => array(05),   ) );
                    
    $this->ipsclass->DB->simple_exec();

                    while ( 
    $row $this->ipsclass->DB->fetch_row() )
                    {
                        
    //-----------------------------------------
                        // New post marker
                        //-----------------------------------------

                        
    $marker $row['last_post'] > $dayAgo $this->ipsclass->compiled_templates['skin_top5stats']->link_image"showtopic={$row['tid']}&amp;view=getlastpost" ) : '';

                        
    //-----------------------------------------
                        // Truncate topic title
                        //-----------------------------------------

                        
    $row['truncated_title']        = $this->ipsclass->txt_truncate$row['title'], $truncateAmount );

                        
    //-----------------------------------------
                        // Format timestamp into user-friendly time
                        //-----------------------------------------

                        
    $row['start_date']    = $this->ipsclass->get_date$row['start_date'], 'JOINED'1);

                        
    //-----------------------------------------
                        // Form a link to the topic
                        //-----------------------------------------

                        
    $topicLink            $this->ipsclass->compiled_templates['skin_top5stats']->form_link"showtopic={$row['tid']}"$row['truncated_title'], $row['title'] );

                        
    //-----------------------------------------
                        // Split the data into two TDs
                        //-----------------------------------------

                        
    $firstTD = array(
                                            
    'width'        =>    85,
                                            
    'title'        =>    $this->ipsclass->lang['top_title'],
                                            
    'content'    =>    $marker "&nbsp;&nbsp;" $topicLink
                                        
    );

                        
    $secondTD = array(
                                            
    'width'        =>    15,
                                            
    'title'        =>    $this->ipsclass->lang['top_title'],
                                            
    'content'    =>    $row['start_date']
                                        );

                        
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->split_data$firstTD$secondTD );
                    }
                }

                
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->td_end();

                
    //-----------------------------------------
                // Select most popular members
                //-----------------------------------------

                
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->td15 );

                
    //-----------------------------------------
                // Base query on profile views
                //-----------------------------------------

                
    $this->ipsclass->DB->simple_construct( array( 'select' => 'id, mgroup, members_display_name, members_profile_views''from' => 'members''order' => 'members_profile_views DESC''limit' => array(05) ) );
                
    $this->ipsclass->DB->simple_exec();

                while ( 
    $row $this->ipsclass->DB->fetch_row() )
                {
                    
    $memberName $this->ipsclass->vars['pz_topformatname'] ? $this->ipsclass->make_name_formatted$row['members_display_name'], $row['mgroup'] ) : $row['members_display_name'];

                    
    //-----------------------------------------
                    // Form a link to the topic
                    //-----------------------------------------

                    
    $memberLink            $this->ipsclass->compiled_templates['skin_top5stats']->form_link"showuser={$row['id']}"$memberName );

                    
    //-----------------------------------------
                    // Split the data into two TDs
                    //-----------------------------------------

                    
    $firstTD = array(
                                        
    'width'        =>    85,
                                        
    'title'        =>    $this->ipsclass->lang['top_dispyrtxt'],
                                        
    'content'    =>    $memberLink
                                    
    );

                    
    $secondTD = array(
                                        
    'width'        =>    15,
                                        
    'title'        =>    $this->ipsclass->lang['top_profies'],
                                        
    'content'    =>     $this->ipsclass->do_number_format$row['members_profile_views'] )
                                    );

                    
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->split_data$firstTD$secondTD );
                }

                
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->td_end();

                
    //-----------------------------------------
                // Select most viewed topics
                //-----------------------------------------

                
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->td25 );

                
    //-----------------------------------------
                // Base selection on topic views (duh!)
                //-----------------------------------------

                
    $this->ipsclass->DB->simple_construct( array( 'select' => 'tid, last_post, title, views''from' => 'topics''order' => 'views DESC''limit' => array(05) ) );
                
    $this->ipsclass->DB->simple_exec();

                while ( 
    $row $this->ipsclass->DB->fetch_row() )
                {
                    
    //-----------------------------------------
                    // New post marker
                    //-----------------------------------------

                    
    $marker $row['last_post'] > $dayAgo $this->ipsclass->compiled_templates['skin_top5stats']->link_image"showtopic={$row['tid']}&amp;view=getlastpost" ) : '';

                    
    //-----------------------------------------
                    // Truncate topic title
                    //-----------------------------------------

                    
    $row['truncated_title'] = $this->ipsclass->txt_truncate$row['title'], $truncateAmount );

                    
    //-----------------------------------------
                    // Form a link to the topic
                    //-----------------------------------------

                    
    $topicLink            $this->ipsclass->compiled_templates['skin_top5stats']->form_link"showtopic={$row['tid']}"$row['truncated_title'], $row['title'] );

                    
    //-----------------------------------------
                    // Split the data into two TDs
                    //-----------------------------------------

                    
    $firstTD = array(
                                        
    'width'        =>    85,
                                        
    'title'        =>    $this->ipsclass->lang['top_title'],
                                        
    'content'    =>    "{$marker}&nbsp;&nbsp;{$topicLink}"
                                    
    );

                    
    $secondTD = array(
                                        
    'width'        =>    15,
                                        
    'title'        =>    $this->ipsclass->lang['top_views'],
                                        
    'content'    =>    $this->ipsclass->do_number_format$row['views'] )
                                    );

                    
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->split_data$firstTD$secondTD );
                }

                
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->td_end();

                
    //-----------------------------------------
                // Select last 10 posts
                //-----------------------------------------

                
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->latest_posts_td();

                
    //-----------------------------------------
                // Label the data (split into two TDs)
                //-----------------------------------------

                
    $firstTD = array(
                                    
    'width'        =>    65,
                                    
    'title'        =>    $this->ipsclass->lang['top_ttitle'],
                                    
    'content'    =>    $this->ipsclass->lang['top_title']
                                );

                
    $secondTD = array(
                                    
    'width'        =>    30,
                                    
    'title'        =>    $this->ipsclass->lang['top_dispyrtxt'],
                                    
    'content'    =>    $this->ipsclass->lang['top_postertxt']
                                );

                
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->split_data$firstTD$secondTD );

                
    //-----------------------------------------
                // Filter by perms and get group formatting
                //-----------------------------------------

                
    $this->ipsclass->DB->simple_construct( array( 'select' => 't.*, m.mgroup''from' => "topics t LEFT JOIN ".SQL_PREFIX."members m ON (m.id=t.last_poster_id)"'where' => "t.forum_id IN(".implode","$permittedForums ).")"'order' => 't.last_post DESC''limit' => array(010) ) );
                
    $this->ipsclass->DB->simple_exec();

                while ( 
    $row $this->ipsclass->DB->fetch_row() )
                {
                    
    //-----------------------------------------
                    // Format the name?
                    //-----------------------------------------

                    
    $memberName $this->ipsclass->vars['pz_topformatname'] ? $this->ipsclass->cache['group_cache'][ $row['mgroup'] ]['prefix'] . $row['last_poster_name'] . $this->ipsclass->cache['group_cache'][ $row['mgroup'] ]['suffix'] : '';

                    
    //-----------------------------------------
                    // New post marker
                    //-----------------------------------------

                    
    $marker $row['last_post'] > $dayAgo $this->ipsclass->compiled_templates['skin_top5stats']->link_image"showtopic={$row['tid']}&amp;view=getlastpost" ) : '';

                    
    //-----------------------------------------
                    // Truncate topic title
                    //-----------------------------------------

                    
    $row['truncated_title'] = $this->ipsclass->txt_truncate$row['title'], $truncateAmount );

                    
    //-----------------------------------------
                    // Split the data into two TDs
                    //-----------------------------------------

                    
    $firstTD = array(
                                        
    'width'        =>    65,
                                        
    'title'        =>    $this->ipsclass->lang['top_title'],
                                        
    'content'    =>    "{$marker}&nbsp;&nbsp;".$this->ipsclass->compiled_templates['skin_top5stats']->form_link"showtopic={$row['tid']}&amp;view=getlastpost"$row['truncated_title'], $row['title'] )
                                    );

                    
    $secondTD = array(
                                        
    'width'        =>    30,
                                        
    'title'        =>    $this->ipsclass->lang['top_postertxt'],
                                        
    'content'    =>    $this->ipsclass->compiled_templates['skin_top5stats']->form_link"showuser={$row['last_poster_id']}"$memberName )
                                    );

                    
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->split_data$firstTD$secondTD );
                }

                
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->td_end();

                
    //-----------------------------------------
                // Start row 2
                //-----------------------------------------

                
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->stats_2();

                
    //-----------------------------------------
                // Select newest members
                //-----------------------------------------

                
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->td25 );

                
    //-----------------------------------------
                // Base selection on joined timestamp
                //-----------------------------------------

                
    $this->ipsclass->DB->simple_construct( array( 'select' => 'id, mgroup, joined, members_display_name''from' => 'members''limit' => array(05), 'order' => 'joined DESC' ) );
                
    $this->ipsclass->DB->simple_exec();

                while ( 
    $row $this->ipsclass->DB->fetch_row() )
                {
                    
    $memberName $this->ipsclass->vars['pz_topformatname'] ? $this->ipsclass->make_name_formatted$row['members_display_name'], $row['mgroup'] ) : $row['members_display_name'];

                    
    //-----------------------------------------
                    // Format joined date
                    //-----------------------------------------

                    
    $row['joined'] = $this->ipsclass->get_date$row['joined'], 'JOINED'1);


                    
    //-----------------------------------------
                    // Split the data into two TDs
                    //-----------------------------------------

                    
    $firstTD = array(
                                        
    'width'        =>    85,
                                        
    'title'        =>    $this->ipsclass->lang['top_dispyrtxt'],
                                        
    'content'    =>    $this->ipsclass->compiled_templates['skin_top5stats']->form_link"showuser={$row['id']}"$memberName )
                                    );

                    
    $secondTD = array(
                                        
    'width'        =>    15,
                                        
    'title'        =>    $this->ipsclass->lang['top_datey'],
                                        
    'content'    =>    $row['joined']
                                    );

                    
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->split_data$firstTD$secondTD );
                }

                
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->td_end();

                
    //-----------------------------------------
                // Select top posters
                //-----------------------------------------

                
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->td15 );

                
    //-----------------------------------------
                // Base selection on post count
                //-----------------------------------------

                
    $this->ipsclass->DB->simple_construct( array( 'select' => 'id, posts, members_display_name, mgroup''from' => 'members''where' => "posts>0"'order' => 'posts DESC''limit' => array(05) ) );
                
    $this->ipsclass->DB->simple_exec();

                while ( 
    $row $this->ipsclass->DB->fetch_row() )
                {
                    
    $memberName $this->ipsclass->vars['pz_topformatname'] ? $this->ipsclass->make_name_formatted$row['members_display_name'], $row['mgroup'] ) : $row['members_display_name'];

                    
    //-----------------------------------------
                    // Split the data into two TDs
                    //-----------------------------------------

                    
    $firstTD = array(
                                        
    'width'        =>    85,
                                        
    'title'        =>    $this->ipsclass->lang['top_dispyrtxt'],
                                        
    'content'    =>    $this->ipsclass->compiled_templates['skin_top5stats']->form_link"showuser={$row['id']}"$memberName )
                                    );

                    
    $secondTD = array(
                                        
    'width'        =>    15,
                                        
    'title'        =>    $this->ipsclass->lang['top_nolat_posts'],
                                        
    'content'    =>    $this->ipsclass->do_number_format$row['posts'] )
                                    );

                    
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->split_data$firstTD$secondTD );
                }

                
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->td_end();

                
    //-----------------------------------------
                // Select last visitors
                //-----------------------------------------

                
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->td25 );

                
    //-----------------------------------------
                // Base selection on last visit to forum
                //-----------------------------------------

                
    $this->ipsclass->DB->simple_construct( array( 'select' => 'id, members_display_name, mgroup, last_visit''from' => 'members''order' => 'last_visit DESC''limit' => array(05) ) );
                
    $this->ipsclass->DB->simple_exec();

                while ( 
    $row $this->ipsclass->DB->fetch_row() )
                {
                    
    $memberName $this->ipsclass->vars['pz_topformatname'] ? $this->ipsclass->make_name_formatted$row['members_display_name'], $row['mgroup'] ) : $row['members_display_name'];

                    
    //-----------------------------------------
                    // Format last visit to forum
                    //-----------------------------------------

                    
    $row['last_visit'] = $this->ipsclass->get_date$row['last_visit'], 'JOINED'1);

                    
    //-----------------------------------------
                    // Split the data into two TDs
                    //-----------------------------------------

                    
    $firstTD = array(
                                        
    'width'        =>    85,
                                        
    'title'        =>    $this->ipsclass->lang['top_dispyrtxt'],
                                        
    'content'    =>    $this->ipsclass->compiled_templates['skin_top5stats']->form_link"showuser={$row['id']}"$memberName )
                                    );

                    
    $secondTD = array(
                                        
    'width'        =>    15,
                                        
    'title'        =>    $this->ipsclass->lang['top_datey'],
                                        
    'content'    =>    $row['last_visit']
                                    );

                    
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->split_data$firstTD$secondTD );
                }

                
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->td_end();
                
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->stats_end();

                }

            return 
    $this->output;
        }
    }
    ?>
    Там где я взяла код всё равно не ответят.
     
  6. Сергiй

    Сергiй

    Регистр.:
    19 ноя 2006
    Сообщения:
    352
    Симпатии:
    338
    попробуйте заменить эту
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->split_data( $firstTD, $secondTD );
    на
    $this->output .= "код банера, и перед все ковычки в этом коде поставить слеш";
     
  7. Гульсина

    Гульсина Постоялец

    Регистр.:
    21 июн 2008
    Сообщения:
    65
    Симпатии:
    2
    Ошибку выдало

    PHP:
    Parse errorsyntax errorunexpected T_STRING in /home/public_html/sources/lib/func_top5stats.php on line 149
    сделала так:

    $this->output .= "/код банера/";
     
  8. Сергiй

    Сергiй

    Регистр.:
    19 ноя 2006
    Сообщения:
    352
    Симпатии:
    338
    всю строчку сюда киньте, можете ссылки спрятать за сайт.ру
     
  9. Гульсина

    Гульсина Постоялец

    Регистр.:
    21 июн 2008
    Сообщения:
    65
    Симпатии:
    2
    PHP:
    //-----------------------------------------
                        // Split the data into two TDs
                        //-----------------------------------------

                        
    $firstTD = array(
                                            
    'width'        =>    85,
                                            
    'title'        =>    $this->ipsclass->lang['top_title'],
                                            
    'content'    =>    $marker "&nbsp;&nbsp;" $topicLink
                                        
    );

                        
    $secondTD = array(
                                            
    'width'        =>    15,
                                            
    'title'        =>    $this->ipsclass->lang['top_title'],
                                            
    'content'    =>    $row['start_date']
                                        );

                        
    $this->output .= "/<a href="сайт.ру" title="Êîïëþ íà óêîë îò áøåíñòâà..." target=_blank><img border="0" src="сайт.ру"></a>"
                    
    }
                }

                
    $this->output .= $this->ipsclass->compiled_templates['skin_top5stats']->td_end();

                
    //-----------------------------------------
                // Select most popular members
                //-----------------------------------------
     
  10. Сергiй

    Сергiй

    Регистр.:
    19 ноя 2006
    Сообщения:
    352
    Симпатии:
    338
    вот так попробуйте
    Код:
    $this->output .= "<a href=\"http://www..........ru/..........\" title=\"Eiie? ia oeie io aoainoaa...\" target=_blank><img border=\"0\" src=\"http://www..............ru/............\"></a>" 
    
     
Статус темы:
Закрыта.