New articles Năng lực quản lý: nhân tố thứ năm     ♥ Lựa chọn mục tiêu cuộc đời     ♥ 10 bí quyết cân bằng công việc và gia đình     ♥ Cô đơn trên mạng     ♥ Chứng khoán: Giấc mơ và ác mộng     ♥ Tám     ♥ Những tính năng của blog VnVista     ♥ Các mạng xã hội thống trị Google     ♥ Điều gì tạo nên một giám đốc công nghệ thông tin giỏi?     ♥ Cố gắng xóa bỏ những ấn tượng xấu     ♥ Cần một cách làm ăn mới     ♥ Tiếp thị hướng đến doanh nhân     ♥ Đưa cửa hàng thật lên chợ ảo     ♥ Bí quyết quản lý các nhân viên trẻ     ♥ Một số câu hỏi phỏng vấn “đặc biệt” của Microsoft     ♥ 4 bài học thành công trong kinh doanh     ♥ Tạo dựng hình ảnh một cô gái trẻ chuyên nghiệp     ♥ Góc “khác” của thế giới online đêm     ♥ Phong cách người Mỹ     ♥ Chỉ nghĩ đến tiền cũng làm người ta ích kỷ     
New blog entries SHEET Thương tình nhân      ♥ SHEET Liêu xiêu đường tình      ♥ SHEET Tình yêu lung linh      ♥ Các loại visa Qatar phổ biến mà bạn cần biết      ♥ Tủ dụng cụ 2 cánh 5 ngăn KT: 1000Wx500Dx1800Hmm      ♥ Tủ dụng cụ 2 cánh 5 ngăn KT: 1000Wx500Dx1800Hmm      ♥ Tủ dụng cụ 2 cánh 5 ngăn KT: 1000Wx500Dx1800Hmm      ♥ SHEET Nếu đời không có anh      ♥ Phụ Gia Nhựa Làm Giảm Co Ngót Sau Gia Công Ép Phun      ♥ Địa chỉ mua giày bảo hộ nam chính hãng      ♥ SHEET Giây phút êm đềm      ♥ Máy Triệt Lông Công Nghệ Cao K18A      ♥ Cách chọn giày bảo hộ tại Đà Nẵng      ♥ hình ảnh Yae Miko Game Genshin Impact      ♥ Cách bảo quản và vệ sinh giày bảo hộ lao động      ♥ SHEET Yêu 1 người sao buồn đến thế      ♥ Bí quyết bảo quản giày bảo hộ lao động      ♥ Máy Triệt Lông Lạnh Diode Laser K17      ♥ Công Nghệ Đùn Ống Nhựa Với Hạt Nhựa Nguyên Sinh      ♥ SHEET Xin cho 1 tiếng kinh cầu      

[ Liệt Kê ] · Bình Thường · Tách Biệt+

tuổi tho topic, version 2.0x


billythekids
post Dec 9 2005, 06:27 PM
Gửi vào: #1


Group Icon

Phó phòng
****
Thành viên: 632
Nhập: 8-December 05
Bài viết: 113
Tiền mặt: 16
Thanked: 1
Cấp bậc: 9
------
Giới tính: Male
------
Xem blog
Bạn bè: 0
Thêm vào nhóm bạn bè
Gửi thiệp điện tử
Trang thông tin





mở source/forum.php

tìm:
CODE
$topic['start_date'] = $std->get_date( $topic['start_date'], 'LONG' );


thêm vào truoc đó
CODE
$topic['raw_start_date'] = $topic['start_date'];



tìm
CODE

$topic['last_post']  = $std->get_date( $topic['last_post'], 'SHORT' );


thêm vào sau đó

CODE

//Topic Days Old
 $num_day    = round( (time() - $topic['raw_start_date']) / 86400);
 if ($num_day < 1)
 {
  $days_old   = "<span style='color:darkgray; font-size:7pt'>[<b>{$ibforums->lang['topic_started_today']}</b>]</span>";
 }
 if ($num_day >= 1 AND $num_day < 2)
 {
  $days_old   = "<span style='color:darkgray; font-size:7pt'>[<b>{$ibforums->lang['topic_started_yesterday']}</b>]</span>";
 }
 if ($num_day >= 2 AND $num_day < 7)
 {
  $days_old   = "<span style='color:darkgray; font-size:7pt'>[<b>{$num_day}</b> {$ibforums->lang['topic_started_day']}]</span>";
 }
 if ($num_day >= 7 AND $num_day < 30)
 {
  if (($num_day/7) >= round($num_day/7))
  {
   $weeks = round($num_day/7);
  }
  else
  {  
   $weeks = round($num_day/7)-1;
  }
  $days = $num_day-$weeks*7;
  $days_old   = "<span style='color:darkgray; font-size:7pt'>[<b>{$weeks}</b> {$ibforums->lang['topic_started_week']} <b>{$days}</b> {$ibforums->lang['topic_started_day']}]</span>";
 }
 if ($num_day >= 30 AND $num_day < 365) {
  if (($num_day/30) >= round($num_day/30))
  {
   $months = round($num_day/30);
  }
  else
  {  
   $months = round($num_day/30)-1;
  }
  if ((($num_day-$months*30)/7) >= round(($num_day-$months*30)/7))
  {
   $weeks = round(($num_day-$months*30)/7);
  }
  else
  {  
   $weeks = round(($num_day-$months*30)/7)-1;
  }
  $days = $num_day-$months*30-$weeks*7;
  $days_old   = "<span style='color:darkgray; font-size:7pt'>[<b>{$months}</b> {$ibforums->lang['topic_started_month']} <b>{$weeks}</b> {$ibforums->lang['topic_started_week']} <b>{$days}</b> {$ibforums->lang['topic_started_day']}]</span>";
 }
 if ($num_day >= 365) {
  if (($num_day/365) >= round($num_day/365))
  {
   $years = round($num_day/365);
  }
  else
  {  
   $years = round($num_day/365)-1;
  }
  if ((($num_day-$years*365)/30) >= round(($num_day-$years*365)/30))
  {
   $months = round(($num_day-$years*365)/30);
  }
  else
  {  
   $months = round(($num_day-$years*365)/30)-1;
  }
  if ((($num_day-$years*365-$months*30)/7) >= round(($num_day-$years*365-$months*30)/7))
  {
   $weeks = round(($num_day-$years*365-$months*30)/7);
  }
  else
  {  
   $weeks = round(($num_day-$years*365-$months*30)/7)-1;
  }
  $days = $num_day-$years*365-$months*30-$weeks*7;
  $days_old   = "<span style='color:darkgray; font-size:7pt'>[<b>{$years}</b> {$ibforums->lang['topic_started_year']} <b>{$months}</b> {$ibforums->lang['topic_started_month']} <b>{$weeks}</b> {$ibforums->lang['topic_started_week']} <b>{$days}</b> {$ibforums->lang['topic_started_day']}]</span>";
 }

 $topic['daysold']   = $days_old;
 //Topic Days Old End


mờ skin_cache/skin_forum.php

tìm trong render_forum_row
CODE

<a href="{$ibforums->base_url}showtopic={$data['tid']}" title="{$ibforums->lang['topic_started_on']} {$data['start_date']}">{$data['title']}</a><div class="desc">{$data['description']}</div>


thêm vào sau đó
CODE

<div align="right">{$data['daysold']}</div>


mở lang_forum.php
thêm vào trước
CODE
);
?>


CODE
'topic_started_yesterday' => "Yesterday",
'topic_started_today' => "Today",
'topic_started_day' => "days",
'topic_started_week' => "weeks",
'topic_started_month' => "months",
'topic_started_year' => "years",


Bài viết đã được chỉnh sửa bởi billythekids: Jun 1 2006, 11:06 PM


--------------------
Nhóm bạn bè:

Thành viên này chưa có người bạn nào trong mạng VnVista, nếu bạn muốn trở thành người bạn đầu tiên của thành viên này, hãy click vào đây


Cảnh cáo: (0%)----- 
Nếu bạn thấy bài viết này vi phạm nội quy forum, hãy click nút này:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
 
Reply to this topicStart new topicStart Poll
Trả Lời

gio_mua_dong
post Jan 16 2006, 05:22 AM
Gửi vào: #2


Group Icon

Chuyên viên
***
Thành viên: 238
Nhập: 17-October 05
Bài viết: 59
Tiền mặt: 354
Thanked: 0
Cấp bậc: 6
------
Giới tính: Male
Sinh nhật: 15 Tháng 6 - 1979
Đến từ: Tình Yêu Của Ba Má
------
Xem blog
Bạn bè: 3 (Xem)
Thêm vào nhóm bạn bè
Gửi thiệp điện tử
Trang thông tin





<?php

/*
+--------------------------------------------------------------------------
| Invision Power Board v2.0.4
| =============================================
| by Matthew Mecham
| © 2001 - 2004 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| Time: Wed, 04 May 2005 11:05:37 GMT
| Release: ac9eeUnLoVeLt616f2fbedbe8d6a7f9a
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > 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>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}

class boards {

var $output = "";
var $base_url = "";
var $html = "";
var $forums = array();
var $mods = array();
var $cats = array();
var $children = array();
var $nav;

var $news_topic_id = "";
var $news_forum_id = "";
var $news_title = "";
var $sep_char = "";
var $statfunc = "";

/*-------------------------------------------------------------------------*/
// INIT
/*-------------------------------------------------------------------------*/

function init()
{
global $ibforums, $DB, $std, $forums, $print, $skin_universal;

$this->base_url = $ibforums->base_url;

// Get more words for this invocation!

$ibforums->lang = $std->load_words($ibforums->lang, 'lang_boards', $ibforums->lang_id);

$this->html = $std->load_template('skin_boards');
}

/*-------------------------------------------------------------------------*/
// Auto run function
/*-------------------------------------------------------------------------*/

function auto_run()
{
global $ibforums, $DB, $std, $forums, $print, $skin_universal;

$this->init();

require ROOT_PATH.'sources/lib/boardstats_functions.php';

$this->statfunc = new boardstats_functions();

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

if (! $ibforums->member['id'] )
{
$ibforums->input['last_visit'] = time();
}

if ( $ibforums->vars['converge_login_method'] != 'username' )
{
$ibforums->lang['qli_name'] = $ibforums->lang['email_address'];
}

$this->output .= $this->html->PageTop( $std->get_date( $ibforums->input['last_visit'], 'LONG' ) );


//-----------------------------------------
// What are we doing?
//-----------------------------------------

$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();

if ($stats_html != "")
{
$collapsed_ids = ','.$std->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->html->stats_header($this->statfunc->users_online, $this->statfunc->total_posts, $this->statfunc->total_members, $show);
$this->output .= $stats_html;
$this->output .= $this->html->stats_footer();
}

//-----------------------------------------
// Add in board info footer
//-----------------------------------------

$this->output .= $this->html->bottom_links();

//-----------------------------------------
// Check for news forum.
//-----------------------------------------

if ( $forums->forum_by_id[ $ibforums->vars['news_forum_id'] ]['last_id'] and $ibforums->vars['index_news_link'] )
{
$t_html = $this->html->newslink( $this->news_forum_id, stripslashes($forums->forum_by_id[ $ibforums->vars['news_forum_id'] ]['last_title']) ,
$forums->forum_by_id[ $ibforums->vars['news_forum_id'] ]['last_id']);

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

//-----------------------------------------
// Showing who's chatting OLD?
//-----------------------------------------

if ( $ibforums->vars['chat_account_no'] and $ibforums->vars['chat_who_on'] )
{
require_once( ROOT_PATH.'sources/lib/chat_functions.php' );

$chat = new chat_functions();

$chat->register_class( $this );

$chat_html = $chat->get_online_list();

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

//-----------------------------------------
// Showing who's chatting NEW?
//-----------------------------------------

if ( $ibforums->vars['chat04_account_no'] and $ibforums->vars['chat04_who_on'] )
{
require_once( ROOT_PATH.'sources/lib/chat04_functions.php' );

$chat = new chat_functions();

$chat->register_class( $this );

$chat_html = $chat->get_online_list();

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

//-----------------------------------------
// Print as normal
//-----------------------------------------

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

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

if ($ibforums->vars['ips_cp_purchase'])
{
$cp = "";
}

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

}

/*-------------------------------------------------------------------------*/
//
// Display sub forums
//
/*-------------------------------------------------------------------------*/

function show_subforums($fid)
{
global $std, $DB, $ibforums, $forums;

$this->init();

//-----------------------------------------
// Get show / hide cookah
//-----------------------------------------

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

$forums->register_class( $this );

if ( is_array( $forums->forum_cache[ $fid ] ) )
{
$cat_data = $forums->forum_by_id[ $fid ];

$cat_data['div_fo'] = 'show';
$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'] = 'show';
}

foreach( $forums->forum_cache[ $fid ] as $id => $forum_data )
{
//-----------------------------------------
// Get all subforum stats
// and calculate
//-----------------------------------------

if ( $ibforums->vars['forum_cache_minimum'] )
{
$forum_data['description'] = "<!--DESCRIPTION:{$forum_data['id']}-->";
$need_desc[] = $forum_data['id'];
}

if ( $forum_data['redirect_on'] )
{
$temp_html .= $this->html->forum_redirect_row( $forum_data );
}
else
{
$temp_html .= $this->html->ForumRow( $forums->forums_format_lastinfo( $forums->forums_calc_children( $forum_data['id'], $forum_data ) ) );
}
}
}

if ( $temp_html )
{
$sub_output .= $this->html->subheader($cat_data);
$sub_output .= $temp_html;
$sub_output .= $this->html->end_this_cat();
}
else
{
return $sub_output;
}

unset($temp_html);

$sub_output .= $this->html->end_all_cats();

//-----------------------------------------
// Get descriptions?
//-----------------------------------------

if ( $ibforums->vars['forum_cache_minimum'] and count($need_desc) )
{
$DB->simple_construct( array( 'select' => 'id,description', 'from' => 'forums', 'where' => 'id IN('.implode( ',', $need_desc ) .')' ) );
$DB->simple_exec();

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

return $sub_output;
}

/*-------------------------------------------------------------------------*/
//
// PROCESS ALL CATEGORIES
//
/*-------------------------------------------------------------------------*/

function process_all_cats()
{
global $std, $DB, $ibforums, $forums;

$need_desc = array();
$root = array();
$parent = array();

//-----------------------------------------
// Want to view categories?
//-----------------------------------------

if ( $ibforums->input['c'] )
{
foreach( explode( ",", $ibforums->input['c'] ) as $c )
{
$c = intval( $c );
$i = $forums->forum_by_id[ $c ]['parent_id'];

$root[ $i ] = $i;
$parent[ $c ] = $c;
}
}

if ( ! count( $root ) )
{
$root[] = 'root';
}

//-----------------------------------------
// Get show / hide cookah
//-----------------------------------------

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

$forums->register_class( $this );

foreach( $root as $root_id )
{
if ( is_array( $forums->forum_cache[ $root_id ] ) and count( $forums->forum_cache[ $root_id ] ) )
{
foreach( $forums->forum_cache[ $root_id ] as $id => $forum_data )
{
//-----------------------------------------
// Only showing certain root forums?
//-----------------------------------------

if ( count( $parent ) )
{
if ( ! in_array( $id, $parent ) )
{
continue;
}
}

$cat_data = $forum_data;

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

if ( strstr( $collapsed_ids, ','.$cat_data['id'].',' ) )
{
$cat_data['div_fo'] = 'none';
$cat_data['div_fc'] = 'show';
}

if ( is_array( $forums->forum_cache[ $forum_data['id'] ] ) )
{
foreach( $forums->forum_cache[ $forum_data['id'] ] as $id => $forum_data )
{
//-----------------------------------------
// Get all subforum stats
// and calculate
//-----------------------------------------

if ( $ibforums->vars['forum_cache_minimum'] )
{
$forum_data['description'] = "<!--DESCRIPTION:{$forum_data['id']}-->";
$need_desc[] = $forum_data['id'];
}

if ( $forum_data['redirect_on'] )
{
$temp_html .= $this->html->forum_redirect_row( $forum_data );
}
else
{
$temp_html .= $this->html->ForumRow( $forums->forums_format_lastinfo( $forums->forums_calc_children( $forum_data['id'], $forum_data ) ) );
}
}
}

if ( $temp_html )
{
$this->output .= $this->html->CatHeader_Expanded($cat_data);
$this->output .= $temp_html;
$this->output .= $this->html->end_this_cat();
}

unset($temp_html);
}
}
}

$this->output .= $this->html->end_all_cats();

//-----------------------------------------
// Get descriptions?
//-----------------------------------------

if ( $ibforums->vars['forum_cache_minimum'] and count($need_desc) )
{
$DB->simple_construct( array( 'select' => 'id,description', 'from' => 'forums', 'where' => 'id IN('.implode( ',', $need_desc ) .')' ) );
$DB->simple_exec();

while( $r = $DB->fetch_row() )
{
$this->output = str_replace( "<!--DESCRIPTION:{$r['id']}-->", $r['description'], $this->output );
}
}
}


}

?>



toàn bộ file của Board .. hịc hổng có cái dòng bác nói . vậy add vào đâu bác ơi .


--------------------
Nhóm bạn bè:


phuonglien

vosong

thoaxinh

Xem tất cả


--------------------
Cha Mẹ nuôi con như biển hồ lai láng .
Con nuôi Cha Mẹ sao tính tháng tính ngày .


Cảnh cáo: (0%)----- 
Nếu bạn thấy bài viết này vi phạm nội quy forum, hãy click nút này:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post



Thank you! Reply to this topicTopic OptionsStart new topic
 

Bản Rút Gọn Bây giờ là: 19th July 2025 - 03:56 AM
Home | Mạng xã hội | Blog | Thiệp điện tử | Tìm kiếm | Thành viên | Sổ lịch