Vbulletin style lastes post 1.0.0

Eklentiler ile ilgili gelişmeler. Yeni modlar, güncellemeler.

Vbulletin style lastes post 1.0.0

İleti murtaza 01.03.2007, 16:21

Kod: Tümünü seç
##############################################################
## MOD Title: vBulletin Style Latest Post
## MOD Author: Afterlife(69) < afterlife_69@hotmail.com > (Dean Newman) http://www.ugboards.com/
## MOD Description: This mod is a clone of the VB style latest post row
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 10 minutes
## Files To Edit:   language/lang_english/lang_main.php
##               index.php
##               templates/subSilver/index_body.tpl
##
## Included Files:   N/A
## License: http://opensource.org/licenses/gpl-license.php GNU Public License v2
##############################################################
## 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:
##   N/A
##
##############################################################
## MOD History:
##
##   2006-16-10 - Version 1.0.0
##      - Initial Release :)
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]------------------------------------------
#
index.php

#
#-----[ FIND ]------------------------------------------
#
   //
   // Define appropriate SQL
   //

#
#-----[ AFTER, ADD ]------------------------------------------
#
/*

#
#-----[ FIND ]------------------------------------------
#
            ORDER BY f.cat_id, f.forum_order";
         break;
   }

#
#-----[ AFTER, ADD ]------------------------------------------
#
   */
   
   /**
    * MOD: vBulletin Style Latest Post
    *
    * @package      phpbb
    * @subpackage   vb_style_last_post
    * @author      Dean Newman <webmaster@auscoder.com>
    * @link      http://phpbbmodders.org/viewtopic.php?t=758
    */
   switch(SQL_LAYER)
   {
      case 'postgresql':
         $sql = "SELECT f.*, t.topic_id, t.topic_title, p.post_time, p.post_username, u.username, u.user_id
            FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . USERS_TABLE . " u
            WHERE p.post_id = f.forum_last_post_id
               AND t.topic_id = p.topic_id
               AND u.user_id = p.poster_id 
               UNION (
                  SELECT f.*, NULL, NULL, NULL, NULL
                  FROM " . FORUMS_TABLE . " f
                  WHERE NOT EXISTS (
                     SELECT p.post_time
                     FROM " . POSTS_TABLE . " p
                     WHERE p.post_id = f.forum_last_post_id 
                  )
               )
               ORDER BY cat_id, forum_order";
         break;

      case 'oracle':
         $sql = "SELECT f.*, t.topic_id, t.topic_title, p.post_time, p.post_username, u.username, u.user_id
            FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . USERS_TABLE . " u
            WHERE p.post_id = f.forum_last_post_id(+)
               AND t.topic_id = p.topic_id(+)
               AND u.user_id = p.poster_id(+)
            ORDER BY f.cat_id, f.forum_order";
         break;

      default:
         $sql = "SELECT f.*, t.topic_id, t.topic_title, p.post_time, p.post_username, u.username, u.user_id
            FROM ((( " . FORUMS_TABLE . " f
            LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )
            LEFT JOIN " . TOPICS_TABLE . " t ON t.topic_id = p.topic_id )
            LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id )
            ORDER BY f.cat_id, f.forum_order";
         break;
   }

   //
   // Define censored words
   //
   $orig_word = array();
   $replacement_word = array();
   obtain_word_list($orig_word, $replacement_word);
   
   /**
    * END ADD
    */

#
#-----[ FIND ]------------------------------------------
#
'L_ONLINE_EXPLAIN'

#
#-----[ AFTER, ADD ]------------------------------------------
#
      /**
       * MOD: vBulletin Style Latest Post
       *
       * @package      phpbb
       * @subpackage   vb_style_last_post
       * @author      Dean Newman <webmaster@auscoder.com>
       * @link      http://phpbbmodders.org/viewtopic.php?t=758
       */
      'L_BY' => $lang['By'],
      'L_NO_POSTS' => $lang['No_Posts'],

      /**
       * END ADD
       */

#
#-----[ FIND ]------------------------------------------
#
$topics = $forum_data[$j]['forum_topics'];

#
#-----[ AFTER, ADD ]------------------------------------------
#
/*

#
#-----[ FIND ]------------------------------------------
#
                        $last_post = $lang['No_Posts'];
                     }

#
#-----[ AFTER, ADD ]------------------------------------------
#
                     /**
                      * MOD: vBulletin Style Latest Post
                      *
                      * @package      phpbb
                      * @subpackage   vb_style_last_post
                      * @author      Dean Newman <webmaster@auscoder.com>
                      * @link      http://phpbbmodders.org/viewtopic.php?t=758
                      */
                     $last_post_icon = $last_post_link = $last_post_time = $last_post_user = '';
                     if ( $forum_data[$j]['forum_last_post_id'] )
                     {
                        $topic_title   = ( strlen($forum_data[$j]['topic_title']) > 30 ) ? substr($forum_data[$j]['topic_title'], 0, 30) . '...' : $forum_data[$j]['topic_title'];
                        $last_post_time   = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);
                        $last_post_user   = ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '='  . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a>';
                        $last_post_icon   = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';
                        $last_post_link   = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $forum_data[$j]['topic_id']) . '" class="topictitle">' . ( ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_title) : $topic_title ) . '</a>';
                     }

                     /**
                      * END MOD
                      */

#
#-----[ FIND ]------------------------------------------
#
'LAST_POST' => $last_post,

#
#-----[ REPLACE WITH ]------------------------------------------
#
                        /**
                         * MOD: vBulletin Style Latest Post
                         *
                         * @package      phpbb
                         * @subpackage   vb_style_last_post
                         * @author      Dean Newman <webmaster@auscoder.com>
                         * @link      http://phpbbmodders.org/viewtopic.php?t=758
                         */
                        'LASTPOST_TIME' => $last_post_time,
                        'LASTPOST_USER' => $last_post_user,
                        'LASTPOST_ICON' => $last_post_icon,
                        'LASTPOST_LINK' => $last_post_link,

                        /**
                         * END ADD
                         */

#
#-----[ FIND ]------------------------------------------
#
                        'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))
                     );

#
#-----[ AFTER, ADD ]------------------------------------------
#
                     /**
                      * MOD: vBulletin Style Latest Post
                      *
                      * @package      phpbb
                      * @subpackage   vb_style_last_post
                      * @author      Dean Newman <webmaster@auscoder.com>
                      * @link      http://phpbbmodders.org/viewtopic.php?t=758
                      */
                     $template->assign_block_vars('catrow.forumrow.switch_lastpost' . ( ( $forum_data[$j]['forum_last_post_id'] ) ? '' : '_else' ), array());

                     /**
                      * END ADD
                      */

#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------
#
//
// That's all, Folks!
// -------------------------------------------------

#
#-----[ BEFORE, ADD ]------------------------------------------
#
/**
* MOD: vBulletin Style Latest Post
*
* @package      phpbb
* @subpackage   vb_style_last_post
* @author      Dean Newman <webmaster@auscoder.com>
* @link      http://phpbbmodders.org/viewtopic.php?t=758
*/
$lang['By'] = 'By';

/**
* END ADD
*/

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/index_body.tpl

#
#-----[ FIND ]------------------------------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
  <tr>
   <th colspan="2" class="thCornerL" height="25" nowrap="nowrap">&nbsp;{L_FORUM}&nbsp;</th>
   <th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
   <th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_POSTS}&nbsp;</th>
   <th class="thCornerR" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th>
  </tr>
  <!-- BEGIN catrow -->
  <tr>
   <td class="catLeft" colspan="2" height="28"><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td>
   <td class="rowpic" colspan="3" align="right">&nbsp;</td>
  </tr>
  <!-- BEGIN forumrow -->
  <tr>
   <td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>
   <td class="row1" width="100%" height="50"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br />
     </span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br />
     </span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>
   <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOPICS}</span></td>
   <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.POSTS}</span></td>
   <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td>
  </tr>
  <!-- END forumrow -->
  <!-- END catrow -->
</table>

#
#-----[ REPLACE WITH ]------------------------------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
  <tr>
   <th colspan="2" class="thCornerL" height="25" nowrap="nowrap">&nbsp;{L_FORUM}&nbsp;</th>
   <th width="220px" class="thTop" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th>
   <th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
   <th width="50" class="thCornerR" nowrap="nowrap">&nbsp;{L_POSTS}&nbsp;</th>
  </tr>
  <!-- BEGIN catrow -->
  <tr>
   <td class="catLeft" colspan="2" height="28"><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td>
   <td class="rowpic" colspan="3" align="right">&nbsp;</td>
  </tr>
  <!-- BEGIN forumrow -->
  <tr>
   <td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>
   <td class="row1" width="100%" height="50"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br />
     </span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br />
     </span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>
   <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap" style="padding: 5px">
      <!-- BEGIN switch_lastpost -->
      <div style="text-align: left" class="gensmall">
         {catrow.forumrow.LASTPOST_LINK}<br />
         {L_BY}: {catrow.forumrow.LASTPOST_USER}
      </div>
      <div style="text-align: right" class="genmed">
         {catrow.forumrow.LASTPOST_TIME} {catrow.forumrow.LASTPOST_ICON}
      </div>
      <!-- END switch_lastpost -->
      <!-- BEGIN switch_lastpost_else -->
      <span class="gen">{L_NO_POSTS}</span>
      <!-- END switch_lastpost_else -->
   </td>
   <td class="row3" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOPICS}</span></td>
   <td class="row3" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.POSTS}</span></td>
  </tr>
  <!-- END forumrow -->
  <!-- END catrow -->
</table>

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Kullanıcı avatarı
murtaza
Üye
Üye
 
İleti: 1187
Kayıt: 15.11.2005, 17:15
Konum: Yurt Dışı

İleti mazlum 01.03.2007, 16:29

biraz açıklarmısın ne işe yarıyor bu..
mazlum
Üye
Üye
 
İleti: 312
Kayıt: 04.05.2006, 16:51
Konum: Zonguldak

İleti murtaza 01.03.2007, 16:55

Kullanıcı avatarı
murtaza
Üye
Üye
 
İleti: 1187
Kayıt: 15.11.2005, 17:15
Konum: Yurt Dışı

İleti bl4cksta 01.03.2007, 17:55

haa harbid Süpermiş ya Çok Saol kardeşimsin ;)
Phpbb Bekle Beni Geri Döndüm :D
bl4cksta
Üye
Üye
 
İleti: 8
Kayıt: 22.02.2007, 16:57
Konum: İzmir

İleti mazlum 02.03.2007, 17:47

mazlum
Üye
Üye
 
İleti: 312
Kayıt: 04.05.2006, 16:51
Konum: Zonguldak

Cvp: Vbulletin style lastes post 1.0.0

İleti webm@ster 05.03.2007, 19:33

allah ne muradın varsa versin allah sevdiğine bağışlasın allah belanı vermesin :D
kaç gündür bnu arıyordum çok tşk
Kullanıcı avatarı
webm@ster
Üye
Üye
 
İleti: 35
Kayıt: 04.12.2005, 12:45


Duyurular & Güncellemeler



Kimler çevrimiçi

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

cron