Перейти к контенту
  • 0

Мод


Вопрос

Начал ставить мод, все нормально поставиЛ, пытаюсь зайти на форум и вижу:

Fatal error: Call to undefined function: member_welcome_panel() in /home/f/formatsof/public_html/forums/sources/action_public/boards.php on line 214

 

Что делать, как быть? У меня стоит 2 скина, настройку ставил на 2 скина, не помогло :D

 

Вот мой boards_php

 

<?php

 

/*

+--------------------------------------------------------------------------

| Invision Power Board 2.1.7

| =============================================

| by Matthew Mecham

| © 2001 - 2005 Invision Power Services, Inc.

| [url=http://www.invisionpower.com]<a href="http://www.invisionpower.com" target="_blank">http://www.invisionpower.com[/url]</a>

| =============================================

| Web: [url=http://www.invisionboard.com]<a href="http://www.invisionboard.com" target="_blank">http://www.invisionboard.com[/url]</a>

| [url=http://www.ibresource.ru/products/invisionpowerboard/]<a href="http://www.ibresource.ru/products/invisionpowerboard/" target="_blank">http://www.ibresource.ru/products/invisionpowerboard/[/url]</a>

| Time: Tuesday 18th of July 2006 05:56:00 PM

| Release: 52f408a29988b02f45b5e6f4ba5af0ae

| Licence Info: [url=http://www.invisionboard.com/?license]<a href="http://www.invisionboard.com/?license" target="_blank">http://www.invisionboard.com/?license[/url]</a>

| [url=http://www.ibresource.ru/license]<a href="http://www.ibresource.ru/license" target="_blank">http://www.ibresource.ru/license[/url]</a>

+---------------------------------------------------------------------------

| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!

+---------------------------------------------------------------------------

| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ!

| Права на ПО принадлежат Invision Power Services

| Права на перевод IBResource (http://www.ibresource.ru)

+---------------------------------------------------------------------------

| > $Date: 2005-10-11 13:14:29 +0100 (Tue, 11 Oct 2005) $

| > $Revision: 38 $

| > $Author: matt $

+---------------------------------------------------------------------------

|

| > Board index module

| > Module written by Matt Mecham

| > Date started: 17th February 2002

|

| > Module Version Number: 1.0.0

| > DBA Checked: Wed 19 May 2004

| > Quality Checked: Wed 15 Sept. 2004

+--------------------------------------------------------------------------

*/

 

if ( ! defined( 'IN_IPB' ) )

{

print "<h1>Некорректный адрес</h1>Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы.";

exit();

}

 

class boards

{

# Global

var $ipsclass;

 

var $output = "";

var $base_url = "";

var $html = "";

var $forums = array();

var $mods = array();

var $cats = array();

var $children = array();

var $nav;

var $db_row = array();

 

var $news_topic_id = "";

var $news_forum_id = "";

var $news_title = "";

var $sep_char = "";

var $statfunc = "";

 

/*-------------------------------------------------------------------------*/

// INIT

/*-------------------------------------------------------------------------*/

 

function init()

{

$this->base_url = $this->ipsclass->base_url;

 

// Get more words for this invocation!

 

$this->ipsclass->load_language('lang_boards');

 

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

}

 

/*-------------------------------------------------------------------------*/

// Auto run function

/*-------------------------------------------------------------------------*/

 

function auto_run()

{

$this->init();

 

$this->statfunc = $this->ipsclass->load_class( ROOT_PATH.'sources/lib/func_boardstats.php', 'func_boardstats' );

 

$this->statfunc->register_class( $this );

 

if (! $this->ipsclass->member['id'] )

{

$this->ipsclass->input['last_visit'] = time();

}

 

if ( $this->ipsclass->vars['converge_login_method'] != 'username' )

{

$this->ipsclass->lang['qli_name'] = $this->ipsclass->lang['email_address'];

}

 

$this->output .= $this->ipsclass->compiled_templates['skin_boards']->PageTop( $this->ipsclass->get_date( $this->ipsclass->input['last_visit'], 'LONG' ) );

 

//-----------------------------------------

// Get DB markers

//-----------------------------------------

 

$this->boards_get_db_tracker();

 

//-----------------------------------------

// What are we doing?

//-----------------------------------------

//-----------------------------------------

// Welcome Panel

//-----------------------------------------

 

if ($this->ipsclass->vars['wp_show'])

{

$bpdata = array();

 

$cids = ','.$this->ipsclass->my_getcookie('collapseprefs').',';

if (strstr($cids, ',boardpanel,'))

{

$bpdata['fo'] = 'none';

$bpdata['fc'] = 'show';

}

else

{

$bpdata['fo'] = 'show';

$bpdata['fc'] = 'none';

}

 

if ( $this->ipsclass->forums->forum_by_id[ $this->ipsclass->vars['news_forum_id'] ]['last_id'] and $this->ipsclass->vars['index_news_link'] )

{

$bpdata['newslink'] = $this->ipsclass->lang['bp_newslink']."<a href='{$this->ipsclass->base_url}showtopic={$this->ipsclass->vars['news_forum_id']}'>".stripslashes($this->ipsclass->forums->forum_by_id[ $this->ipsclass->vars['news_forum_id'] ]['last_title'])."</a></i>";

}

 

if ($this->ipsclass->member['id'] > 0)

{

if (!$this->ipsclass->member['last_visit'] )

{

$this->ipsclass->member['last_visit'] = (time()-3600);

}

 

$last_time = $this->ipsclass->member['last_visit'];

 

if ( $this->ipsclass->member['members_markers']['board'] > $last_time )

{

$last_time = $this->ipsclass->member['members_markers']['board'];

}

 

//Member new posts

$r = $this->ipsclass->DB->simple_exec_query(array('select' => 'COUNT(DISTINCT(t.tid)) as topics, COUNT(DISTINCT(p.pid)) as posts', 'from' => 'posts p, '.SQL_PREFIX.'topics t', 'where' => 'p.post_date < '.time().' AND p.post_date > '.$last_time.' AND p.topic_id=t.tid AND p.queued<>1'));

$bpdata['newposts'] = str_replace("{POSTS}", intval($r['posts']), $this->ipsclass->lang['bp_newposts']);

$bpdata['newposts'] = str_replace("{TOPICS}", intval($r['topics']), $bpdata['newposts']);

 

//Member new PMs

if (($this->ipsclass->member['g_max_messages'] > 0) && ($this->ipsclass->member['msg_total'] >= $this->ipsclass->member['g_max_messages']) )

{

$bpdata['newpms'] = $this->ipsclass->lang['bp_inbox_full'];

}

else

{

$npms = ($this->ipsclass->member['new_msg'] == "") ? 0 : $this->ipsclass->member['new_msg'];

$bpdata['newpms'] = str_replace("{PMS}", $npms, $this->ipsclass->lang['bp_newpms']);

}

 

$bpdata['links'] = "<a href='index.php?act=Search&CODE=getnew'>{$this->ipsclass->lang['bp_new_posts']}</a> | <a href='index.php?act=search&CODE=getnew&active=1&lastdate=86400'>{$this->ipsclass->lang['bp_active_topics']}</a>";

 

//Member avatar

$member = $this->ipsclass->DB->simple_exec_query(array('select' => '*', 'from' => 'member_extra', 'where' => 'id='.$this->ipsclass->member['id']));

$bpdata['avatar'] = $this->ipsclass->get_avatar($member['avatar_location'], $this->ipsclass->member['view_avs'], $member['avatar_size'], $member['avatar_type']);

if (!$bpdata['avatar']) $bpdata['avatar'] = "<img src='style_avatars/noavatar.png' border='0' alt='' />";

 

//Member posts

$mtp = intval($this->ipsclass->member['posts']);

$bpdata['my_tposts'] = str_replace("{POSTS}", $mtp, $this->ipsclass->lang['bp_my_tposts']);

 

//Member posts percent

$bposts = $this->ipsclass->cache['stats']['total_topics'] + $this->ipsclass->cache['stats']['total_replies'];

if ($this->ipsclass->member['posts'] and $bposts)

{

$tpercent = sprintf('%.2f', ($this->ipsclass->member['posts'] / $bposts * 100));

$bpdata['tpercent'] = str_replace("{PCNT}", $tpercent, $this->ipsclass->lang['bp_tpercent']);

}

 

//Member posts per day

if ($this->ipsclass->member['posts'] > 0)

{

$diff = time() - $this->ipsclass->member['joined'];

$days = ($diff / 3600) / 24;

$days = $days < 1 ? 1 : $days;

$posts_day = sprintf('%.2f', ($this->ipsclass->member['posts'] / $days));

$bpdata['posts_day'] = str_replace("{PDAY}", $posts_day, $this->ipsclass->lang['bp_posts_day']);

}

 

//Stats

$reg_mem = $this->ipsclass->do_number_format($this->ipsclass->cache['stats']['mem_count']);

$bpdata['forum_stats'] = str_replace("{NUM}", $reg_mem, $this->ipsclass->lang['bp_regmem']);

 

$fposts = $this->ipsclass->do_number_format($this->ipsclass->cache['stats']['total_topics'] + $this->ipsclass->cache['stats']['total_replies']);

$bpdata['forum_stats'] .= str_replace("{NUM}", $fposts, $this->ipsclass->lang['bp_fposts']);

 

$ftopics = $this->ipsclass->do_number_format($this->ipsclass->cache['stats']['total_topics']);

$bpdata['forum_stats'] .= str_replace("{NUM}", $ftopics, $this->ipsclass->lang['bp_ftopics']);

 

$last_visit = $this->ipsclass->get_date($this->ipsclass->member['last_visit'], 'LONG');

$bpdata['last_visit'] = str_replace("{LASTV}", $last_visit, $this->ipsclass->lang['bp_last_visit']);

 

//Member title

$bpdata['bp_name'] = str_replace("{NAME}", $this->ipsclass->member['members_display_name'], $this->ipsclass->lang['bp_title']);

 

$this->output .= $this->ipsclass->compiled_templates['skin_boards']->member_welcome_panel($bpdata);

}

else

{

$bpdata['guest_message'] = $this->ipsclass->vars['wp_message'];

$bpdata['avatar'] = "<img src='style_avatars/noavatar.png' border='0' alt='' />";

$this->output .= $this->ipsclass->compiled_templates['skin_boards']->guest_welcome_panel($bpdata);

}

}

$this->process_all_cats();

 

//-----------------------------------------

// Add in show online users

//-----------------------------------------

 

$stats_html .= $this->statfunc->active_users();

 

//-----------------------------------------

// Are we viewing the calendar?

//-----------------------------------------

 

$stats_html .= $this->statfunc->show_calendar_events();

 

//-----------------------------------------

// Add in show stats

//-----------------------------------------

 

$stats_html .= $this->statfunc->show_totals();

//change the number if you need more or less

$statnum = 10;

 

if ($stats_html != "")

{

$collapsed_ids = ','.$this->ipsclass->my_getcookie('collapseprefs').',';

 

$show['div_fo'] = 'show';

$show['div_fc'] = 'none';

 

if ( strstr( $collapsed_ids, ',stat,' ) )

{

$show['div_fo'] = 'none';

$show['div_fc'] = 'show';

}

 

$this->output .= $this->ipsclass->compiled_templates['skin_boards']->stats_header($this->statfunc->users_online, $this->statfunc->total_posts, $this->statfunc->total_members, $show);

$this->output .= $stats_html;

$this->output .= $this->ipsclass->compiled_templates['skin_boards']->stats_footer();

}

 

//---------------------------------------

// Add in board info footer

//---------------------------------------

 

$this->output .= $this->ipsclass->compiled_templates['skin_boards']->bottom_links();

 

function tt($yer,$veri){

list($a1,$b1)=mysql_fetch_row(mysql_query("SELECT prefix, suffix FROM ibf_groups WHERE g_id='$yer'"));

return "$a1"."$veri"."$b1";

}

$this->ipsclass->DB->query("SELECT * FROM ibf_members WHERE `posts` > 0 ORDER BY `posts` DESC LIMIT 0,".$statnum);

$TPosts="";

while($tposts=$this->ipsclass->DB->fetch_row()){

$TPosts.="<tr><td width='80%'><a href='index.php?showuser={$tposts['id']}'>";

$vm1=tt($tposts[mgroup],$tposts[members_display_name]);

$TPosts.="$vm1";

$TPosts.="</a>";

$TPosts.="</td><td align='right' width='20%'>{$tposts['posts']}</td></tr>";

}

 

function tt2($vr2){

list($grp)=mysql_fetch_row(mysql_query("SELECT mgroup FROM ibf_members WHERE name='$vr2'"));

list($a2,$b2)=mysql_fetch_row(mysql_query("SELECT prefix, suffix FROM ibf_groups WHERE g_id='$grp'"));

return "$a2".$vr2."$b2";

}

 

$this->ipsclass->DB->query("SELECT * FROM ibf_topics ORDER BY views DESC LIMIT 0,".$statnum);

$TView="";

while($tview=$this->ipsclass->DB->fetch_row()){

$TView.="<tr><td width='50%'><a href='index.php?act=ST&f={$tview['forum_id']}&t={$tview['tid']}&view=getlastpost'>{$tview['title']} ({$tview['views']})</a>";

$TView.="</td><td align='right' width='50%'>";

$vr2=tt2($tview[last_poster_name]);

$TView.="<a href='index.php?showuser={$tview['last_poster_id']}'>$vr2</a>";

$TView.="</td></tr>";

}

 

$this->ipsclass->DB->query( "SELECT * FROM ibf_topics ORDER BY last_post DESC LIMIT 0,".$statnum);

$ToNew="";

while($tonew=$this->ipsclass->DB->fetch_row()){

$ToNew.="<tr><td width='50%'><a href='index.php?act=ST&f={$tonew['forum_id']}&t={$tonew['tid']}&view=getlastpost'>{$tonew['title']} ({$tonew['posts']})</a>";

$ToNew.="</td><td align='right' width='50%'>";

$vr2=tt2($tonew[last_poster_name]);

$ToNew.="<a href='index.php?showuser={$tonew['last_poster_id']}'>$vr2</a>";

$ToNew.="</td></tr>";

}

$this->output = str_replace( "<!-- STATPANEL -->" , $this->ipsclass->compiled_templates['skin_boards']->Top_ten_Stats($TPosts,$TView,$ToNew) , $this->output );

//-----------------------------------------

// Add in board info footer

//-----------------------------------------

$this->output .= $this->ipsclass->compiled_templates['skin_boards']->bottom_links();

 

$this->ipsclass->DB->query("SELECT * FROM ibf_members WHERE `posts` > 0 ORDER BY `posts` DESC LIMIT 0,5");

$TPosts="";

while($tposts=$this->ipsclass->DB->fetch_row()){

$TPosts.="<tr><td width='80%'><b><a href='?showuser={$tposts['id']}'>{$tposts['name']}</a>";

$TPosts.="</b></td><td align='left' width='20%'><b>{$tposts['posts']}</b></td></tr>";

}

$this->ipsclass->DB->query("SELECT * FROM ibf_members WHERE id>0 ORDER BY `joined` DESC LIMIT 0,5");

$TNew="";

while($tnew=$this->ipsclass->DB->fetch_row()){

$TNew.="<tr><td width='80%'><b><a href='?showuser={$tnew['id']}'>{$tnew['name']}</a>";

$TNew.="</b></td><td align='left' width='20%'><b>{$tnew['posts']}</b></td></tr>";

}

$this->ipsclass->DB->query( "SELECT * FROM ibf_topics ORDER BY last_post DESC LIMIT 0,5");

$ToNew="";

while($tonew=$this->ipsclass->DB->fetch_row()){

$ToNew.="<tr><td width='80%'><b><a href='?act=ST&f={$tonew['forum_id']}&t={$tonew['tid']}&view=getlastpost'>{$tonew['title']}</a>";

$ToNew.="</b></td><td align='left' width='20%'><b>{$tonew['last_poster_name']}</b></td></tr>";

}

$this->output = str_replace( "<!-- STATPANEL -->" , $this->ipsclass->compiled_templates['skin_boards']->Top_Five_Stats($TPosts,$TNew,$ToNew) , $this->output );

//-----------------------------------------

// Check for news forum.

//-----------------------------------------

 

if ( $this->ipsclass->forums->forum_by_id[ $this->ipsclass->vars['news_forum_id'] ]['last_id'] and $this->ipsclass->vars['index_news_link'] )

{

$t_html = $this->ipsclass->compiled_templates['skin_boards']->newslink( $this->news_forum_id, stripslashes($this->ipsclass->forums->forum_by_id[ $this->ipsclass->vars['news_forum_id'] ]['last_title']) ,

$this->ipsclass->forums->forum_by_id[ $this->ipsclass->vars['news_forum_id'] ]['last_id']);

 

$this->output = str_replace( "<!-- IBF.NEWSLINK -->" , "$t_html" , $this->output );

}

 

//-----------------------------------------

// Showing who's chatting NEW?

// IPB3.0: To Do: move into components

//-----------------------------------------

 

$this->ipsclass->vars['chat04_account_no'] = $this->ipsclass->vars['chat04_account_no'] ? $this->ipsclass->vars['chat04_account_no'] : $this->ipsclass->vars['chat_account_no'];

$this->ipsclass->vars['chat04_who_on'] = $this->ipsclass->vars['chat04_who_on'] ? $this->ipsclass->vars['chat04_who_on'] : $this->ipsclass->vars['chat_who_on'];

 

if ( $this->ipsclass->vars['chat04_account_no'] and $this->ipsclass->vars['chat04_who_on'] )

{

require_once( ROOT_PATH.'sources/lib/func_chat.php' );

 

$chat = new func_chat();

$chat->ipsclass =& $this->ipsclass;

 

$chat->register_class( $this );

 

$chat_html = $chat->get_online_list();

 

$this->output = str_replace( "<!--IBF.WHOSCHATTING-->", $chat_html, $this->output );

}

 

//-----------------------------------------

// Print as normal

//-----------------------------------------

 

$this->ipsclass->print->add_output( $this->output );

 

$cp = " (Powered by Invision Power Board)";

 

if ($this->ipsclass->vars['ips_cp_purchase'])

{

$cp = "";

}

 

$this->ipsclass->print->do_output( array( 'TITLE' => $this->ipsclass->vars['board_name'].$cp, 'JS' => 0, 'NAV' => $this->nav ) );

 

}

 

/*-------------------------------------------------------------------------*/

//

// Display sub forums

//

/*-------------------------------------------------------------------------*/

 

function show_subforums($fid)

{

$this->init();

 

//-----------------------------------------

// Get show / hide cookah

//-----------------------------------------

 

$collapsed_ids = ','.$this->ipsclass->my_getcookie('collapseprefs').',';

 

$this->ipsclass->forums->register_class( $this );

 

if ( is_array( $this->ipsclass->forums->forum_cache[ $fid ] ) )

{

$cat_data = $this->ipsclass->forums->forum_by_id[ $fid ];

 

$cat_data['div_fo'] = '';

$cat_data['div_fc'] = 'none';

 

if ( strstr( $collapsed_ids, ','.$fid.',' ) and ( $cat_data['sub_can_post'] == 1 ) )

{

$cat_data['div_fo'] = 'none';

$cat_data['div_fc'] = '';

}

 

foreach( $this->ipsclass->forums->forum_cache[ $fid ] as $id => $forum_data )

{

//-----------------------------------------

// Get all subforum stats

// and calculate

//-----------------------------------------

 

if ( $this->ipsclass->vars['forum_cache_minimum'] )

{

$forum_data['description'] = "<!--DESCRIPTION:{$forum_data['id']}-->";

$need_desc[] = $forum_data['id'];

}

 

if ( $forum_data['redirect_on'] )

{

$temp_html .= $this->ipsclass->compiled_templates['skin_boards']->forum_redirect_row( $forum_data );

}

else

{

$temp_html .= $this->ipsclass->compiled_templates['skin_boards']->ForumRow( $this->ipsclass->forums->forums_format_lastinfo( $this->ipsclass->forums->forums_calc_children( $forum_data['id'], $forum_data ) ) );

}

}

}

 

if ( $temp_html )

{

$sub_output .= $this->ipsclass->compiled_templates['skin_boards']->subheader($cat_data);

$sub_output .= $temp_html;

$sub_output .= $this->ipsclass->compiled_templates['skin_boards']->end_this_cat();

}

else

{

return $sub_output;

}

 

unset($temp_html);

 

$sub_output .= $this->ipsclass->compiled_templates['skin_boards']->end_all_cats();

 

//-----------------------------------------

// Get descriptions?

//-----------------------------------------

 

if ( $this->ipsclass->vars['forum_cache_minimum'] and count($need_desc) )

{

$this->ipsclass->DB->simple_construct( array( 'select' => 'id,description', 'from' => 'forums', 'where' => 'id IN('.implode( ',', $need_desc ) .')' ) );

$this->ipsclass->DB->simple_exec();

 

while( $r = $this->ipsclass->DB->fetch_row() )

{

$sub_output = str_replace( "<!--DESCRIPTION:{$r['id']}-->", $r['description'], $sub_output );

}

}

 

return $sub_output;

}

 

/*-------------------------------------------------------------------------*/

//

// PROCESS ALL CATEGORIES

//

/*-------------------------------------------------------------------------*/

 

function process_all_cats()

{

$need_desc = array();

$root = array();

$parent = array();

 

//-----------------------------------------

// Want to view categories?

//-----------------------------------------

 

if ( $this->ipsclass->input['c'] )

{

foreach( explode( ",", $this->ipsclass->input['c'] ) as $c )

{

$c = intval( $c );

$i = $this->ipsclass->forums->forum_by_id[ $c ]['parent_id'];

 

$root[ $i ] = $i;

$parent[ $c ] = $c;

}

}

 

if ( ! count( $root ) )

{

$root[] = 'root';

}

 

//-----------------------------------------

// Get show / hide cookah

//-----------------------------------------

 

$collapsed_ids = ','.$this->ipsclass->my_getcookie('collapseprefs').',';

 

$this->ipsclass->forums->register_class( $this );

 

foreach( $root as $root_id )

{

if ( is_array( $this->ipsclass->forums->forum_cache[ $root_id ] ) and count( $this->ipsclass->forums->forum_cache[ $root_id ] ) )

{

foreach( $this->ipsclass->forums->forum_cache[ $root_id ] as $id => $forum_data )

{

//-----------------------------------------

// Only showing certain root forums?

//-----------------------------------------

 

 

Ссылка на комментарий
Поделиться на других сайтах

Рекомендуемые сообщения

Пока что нет ответов на этот вопрос

Присоединиться к обсуждению

Вы можете ответить сейчас, а зарегистрироваться позже. Если у вас уже есть аккаунт, войдите, чтобы ответить от своего имени.

Гость
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Ответить на вопрос...

×   Вы вставили отформатированный текст.   Удалить форматирование

  Допустимо не более 75 смайлов.

×   Ваша ссылка была автоматически заменена на медиа-контент.   Отображать как ссылку

×   Ваши публикации восстановлены.   Очистить редактор

×   Вы не можете вставить изображения напрямую. Загрузите или вставьте изображения по ссылке.

Зарузка...
×
×
  • Создать...

Важная информация

Находясь на нашем сайте, вы соглашаетесь на использование файлов cookie, а также с нашим положением о конфиденциальности Политика конфиденциальности и пользовательским соглашением Условия использования.