sabri ünal 29.10.2006, 15:45
- Kod: Tümünü seç
###########################################
## Mod NAME: viewall option for recent.php
## Mod VERSION : 1.0.1
## Mod AUTHOR: yakusha < yakushaBB@yahoo.com > (sabri ünal) < http://www.canver.net | http://www.yakusha.net >
###########################################
## Mod DESC:
## Emrag tarafından yapılan ve ilgili sayfalardaki mesajları tek sayfada gösteren mod için bir eklentidir.
## Bu eklenti ile son konular modunu da Emrag'ın ilgili moduyla uyumlu hale getirebilirsiniz.
###########################################
## Installation Level: Medium
## Installation Time : 3 minutes
## Edited Files: (1)
## - recent.php
## Included Files: (0)
############################################
## Support and Help : http://www.canver.net - http://www.yakusha.net
## copyleft : Copyleft © - canver|net, yakusha|net
## Lisance : GNU Public License v2 http://opensource.org/licenses/gpl-license.php
############################################
## Security Varning:
##
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##
###########################################
## Author Notes:
## phpBB & Canver & Yakusha! All my Love :)
###########################################
##
## Mod History:
##
## 1.0.1 - 25-12-2006
## fixed a minor
##
## 1.0.0 - 29-10-2006
## initial release
##
############################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
############################################
#
#-----[ OPEN ]------------------------------------------
#
recent.php
#
#-----[ FIND ]------------------------------------------
#
$start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
#
#-----[ AFTER ADD ]------------------------------------------
#
$viewall = ( isset($HTTP_GET_VARS['viewall']) ) ? intval($HTTP_GET_VARS['viewall']) : 0;
#
#-----[ FIND ]------------------------------------------
#
WHERE $where_forums AND p.post_id = t.topic_last_post_id AND ";
$sql_end = " ORDER BY t.topic_last_post_id DESC LIMIT $start, $topic_limit";
#
#-----[ REPLACE ]------------------------------------------
#
WHERE $where_forums AND p.post_id = t.topic_last_post_id AND ";
$sql_end = " ORDER BY t.topic_last_post_id DESC ";
$sql_end .= ($viewall == 1) ? '' : "LIMIT $start, $topic_limit" ;
#
#-----[ FIND ]------------------------------------------
#
$pagination = generate_pagination("recent.$phpEx?amount_days=$amount_days&mode=$mode", $total_topics, $topic_limit, $start) .' ';
#
#-----[ REPLACE ]------------------------------------------
#
$page_number = ( $total_topics != '0' ) ? sprintf($lang['Page_of'], ( floor( $start / $topic_limit ) + 1 ), ceil( $total_topics / $topic_limit )) : '';
if ( $viewall == 1 )
{
$pagination = '<a href="' . append_sid("recent.$phpEx?amount_days=$amount_days&mode=$mode") . '">' . $lang['Show_pages'] . '</a>';
$page_number = '';
$l_goto_page = '';
}
else if ( $total_topics > $topic_limit )
{
$pagination = generate_pagination("recent.$phpEx?amount_days=$amount_days&mode=$mode", $total_topics, $topic_limit, $start) . ' | ' . '<a href="' . append_sid("recent.$phpEx?amount_days=$amount_days&mode=$mode&viewall=1") . '">' . $lang['View_all'] . '</a>';
}
else
{
$pagination = generate_pagination("recent.$phpEx?amount_days=$amount_days&mode=$mode", $total_topics, $topic_limit, $start);
}
#
#-----[ FIND ]------------------------------------------
#
'PAGINATION' => ....
'PAGE_NUMBER' => ....
));
#
#-----[ REPLACE ]------------------------------------------
#
'PAGINATION' => $pagination,
'PAGE_NUMBER' => $page_number,
));
#
#-----[ SAVE & CLOSE ]------------------------------------------
#
En son sabri ünal tarafından, 25.12.2006, 22:21 tarihinde değiştirildi, toplamda 1 değişiklik yapıldı.
Mutluyum, biraz komedi takılıyorum! sakın kızmayın yakında geçer, sebebini ben de bilmiyorum! yeni bir aşk da bulmuş değilim!