viewall option for modcp.php - 1.0.0

Eklenti geliştirme bölümü.

viewall option for modcp.php - 1.0.0

İleti sabri ünal 27.12.2006, 15:09

Emrag tarafından yapılan ve ilgili sayfalardaki mesajları tek sayfada gösteren mod için bir eklentidir.
Bu eklenti ile modcp -> bölüm yetkilileri panelini de Emrag'ın ilgili moduyla uyumlu hale getirebilirsiniz. Özellikle mesaj silmeye kalkarken veya belli bir forum içindeki kimi mesajları ayıklamaya çalışırken deli olanlar için birebir...

Kod: Tümünü seç
###########################################
## Mod NAME: viewall option for modcp.php
## Mod VERSION : 1.0.0
## 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 modcp -> bölüm yetkilileri panelini de Emrag'ın ilgili moduyla uyumlu hale getirebilirsiniz.
###########################################
## Installation Level: Medium
## Installation Time :  3 minutes
## Edited Files:  (1)
## - modcp.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.0 - 27-12-2006
## initial release
##
############################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
############################################
#
#-----[ OPEN ]------------------------------------------
#

modcp.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 - 1151. LINE ]------------------------------------------
#

      $sql = "SELECT t.*, u.username, u.user_id, p.post_time
         FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p
         WHERE t.forum_id = $forum_id
            AND t.topic_poster = u.user_id
            AND p.post_id = t.topic_last_post_id
         ORDER BY t.topic_type DESC, p.post_time DESC
         LIMIT $start, " . $board_config['topics_per_page'];

#
#-----[ IN LINE FIND ]------------------------------------------
#

         ORDER BY t.topic_type DESC, p.post_time DESC
         LIMIT $start, " . $board_config['topics_per_page'];

#
#-----[ REPLACE ]------------------------------------------
#

         ORDER BY t.topic_type DESC, p.post_time DESC";
      $sql .=   ($viewall == 1) ? '' : " LIMIT $start, " . $board_config['topics_per_page'] ;
#
#-----[ FIND ]------------------------------------------
#

      $template->assign_vars(array(
         'PAGINATION' => generate_pagination("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id'], $forum_topics, $board_config['topics_per_page'], $start),
         'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $forum_topics / $board_config['topics_per_page'] )),
         'L_GOTO_PAGE' => $lang['Goto_page'])
      );
#
#-----[ REPLACE ]------------------------------------------
#

      $page_number = ( $total_topics != '0' ) ? sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $total_topics / $board_config['topics_per_page'] )) : '';
      if ( $viewall == 1 )
      {
         $pagination = '<a href="' . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id']) . '">' . $lang['Show_pages'] . '</a>';
         $page_number = '';
         $l_goto_page = '';
      }
      else if ( $forum_topics > $board_config['topics_per_page'] )
      {
         $pagination = generate_pagination("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id'], $forum_topics, $board_config['topics_per_page'], $start) . ' | ' . '<a href="' . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id'] ."&amp;viewall=1") . '">' . $lang['View_all'] . '</a>';
      }
      else
      {
         $pagination = generate_pagination("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id'], $forum_topics, $board_config['topics_per_page'], $start);
      }

      $template->assign_vars(array(
         'PAGINATION' => $pagination,
         'PAGE_NUMBER' => $page_number,
         'L_GOTO_PAGE' => $lang['Goto_page'])
      );

#
#-----[ SAVE & CLOSE ]------------------------------------------
#
Kullanıcı avatarı
sabri ünal
Üye
Üye
 
İleti: 1325
Kayıt: 27.10.2005, 15:49
Konum: İstanbul

Eklenti Geliştirme



Kimler çevrimiçi

Bu forumu görüntüleyenler: Kayıtlı kullanıcı yok ve 0 misafir

cron