المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : [ipb] درس رقم الصفحة في عنوان الموضوع - الأول للبرمجة


مبرمج
02-14-2009, 08:56 AM
بسم الله

لمستخدمي منتديات من نوع IPB معانا انهاردة درس جميل درس رقم الصفحة في عنوان الموضوع
من دروس فريق الأول للبرمجة .

الملف اللي هيتعدل عليها
sources/action_public/topics.php
sources/lib/func_topic_linear.php

الخطوة الأولى :
أفتح ملف : sources/action_public/topics.php

ابحث عن :
كود:

$this->output = str_replace( "", $this->multi_moderation(), $this->output );

// Pass it to our print routine

$this->ipsclass->print->add_output( $this->output );
$this->ipsclass->print->do_output( array( 'TITLE' => $this->topic['title'] . ' - ' . $this->ipsclass->vars['board_name'],
'JS' => $this->ipsclass->compiled_templates['skin_global']->get_rte_css(),
'NAV' => $this->nav,
) );

إستبدله بالكود التالي

كود:
$this->output = str_replace( "", $this->multi_moderation(), $this->output );

// Pass it to our print routine

$this->ipsclass->print->add_output( $this->output );
$viewprefs = substr($this->ipsclass->member['view_prefs'],0,strpos($this->ipsclass->member['view_prefs'],'&'));
if ($this->ipsclass->input['st'] > 0)
{
$page_numb = ceil($this->ipsclass->input['st'] / $viewprefs);
if ($this->ipsclass->input['st'] % $viewprefs == 0)
{
$page_numb++;
}
}
else
{
$page_numb = 1;
}
$this->ipsclass->print->do_output( array( 'TITLE' => $this->topic['title'] . ' - Page ' . $page_numb . ' - ' . $this->ipsclass->vars['board_name'],
'JS' => $this->ipsclass->compiled_templates['skin_global']->get_rte_css(),
'NAV' => $this->nav,
) );
افتح : sources/lib/func_topic_linear.php
ابحث عن :
كود:
if ( $this->lib->topic_view_mode == 'linearplus' and $this->topic['posts'] > 0 )
{
$this->output .= $this->ipsclass->compiled_templates['skin_topic']->topic_page_top( array( 'TOPIC' => $this->topic, 'FORUM' => $this->forum ), 1 );
}
else
{
$this->output .= $this->ipsclass->compiled_templates['skin_topic']->topic_page_top( array( 'TOPIC' => $this->topic, 'FORUM' => $this->forum ), 0 );
}

استبدله بـ
كود:
$viewprefs = substr($this->ipsclass->member['view_prefs'],0,strpos($this->ipsclass->member['view_prefs'],'&'));
if ($this->ipsclass->input['st'] > 0)
{
$page_numb = ceil($this->ipsclass->input['st'] / $viewprefs);
if ($this->ipsclass->input['st'] % $viewprefs == 0)
{
$page_numb++;
}
}
else
{
$page_numb = 1;
}

if ( $this->lib->topic_view_mode == 'linearplus' and $this->topic['posts'] > 0 )
{
$this->output .= $this->ipsclass->compiled_templates['skin_topic']->topic_page_top( array( 'TOPIC' => $this->topic, 'FORUM' => $this->forum ), 1, $page_numb );
}
else
{
$this->output .= $this->ipsclass->compiled_templates['skin_topic']->topic_page_top( array( 'TOPIC' => $this->topic, 'FORUM' => $this->forum ), 0, $page_numb );
}
اذهب إلى
ACP -> Look & Feel -> Skin -> Edit Template HTML -> Topic View -> topic_page_top
ابحث عن :

كود:
td width='85%' style='word-wrap:break-word;'>{$data['TOPIC']['title']}{$data['TOPIC']['description']}

استبدله بـ :

كود:
td width='85%' style='word-wrap:break-word;'>{$data['TOPIC']['title']} - صفحة {$pagenumb}{$data['TOPIC']['description']}

عدل الـ
Data Variables
وضيف
كود:

,$pagenumb=1
اعد عمل الخطوات الثالثة في جميع الاستايلات
مع تحيات فريق الاول للبرمجة - راعي الاي بي العربي
فريق الأول للبرمجة (http://www.1stwd.com)