[MOD]vBulletin Style Latest Post

phpBB 2.0.x sürümleri için geliştirilen ve yapım aşamasındaki Alpha, Beta MODlar & PreMODlar.
Kullanıcı avatarı
megaplatform
Kayıtlı Kullanıcı
Mesajlar: 818
Kayıt: 25.08.2006, 19:23
Konum: izmir
İletişim:

[MOD]vBulletin Style Latest Post

Mesaj gönderen megaplatform »

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&" . 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
Görünümü;
[ resmi görüntülemek için tıklayın ]
Kullanıcı avatarı
phpBB-TR
Kayıtlı Kullanıcı
Mesajlar: 588
Kayıt: 24.12.2006, 13:34
Konum: İstanbul
İletişim:

Mesaj gönderen phpBB-TR »

güzel eklenti..saol..
BYSERCAN07
Kayıtlı Kullanıcı
Mesajlar: 109
Kayıt: 04.09.2006, 13:53
İletişim:

Mesaj gönderen BYSERCAN07 »

böle 3 4 tane mod denedim hiç biri olmadıydı ama bu oldu :lol: saol :P
tomerec
Kayıtlı Kullanıcı
Mesajlar: 107
Kayıt: 02.09.2006, 02:53
İletişim:

Mesaj gönderen tomerec »

eklenti için teşekkürler
Kullanıcı avatarı
megaplatform
Kayıtlı Kullanıcı
Mesajlar: 818
Kayıt: 25.08.2006, 19:23
Konum: izmir
İletişim:

Mesaj gönderen megaplatform »

BYSERCAN07 yazdı:böle 3 4 tane mod denedim hiç biri olmadıydı ama bu oldu :lol: saol :P
o zaman güle güle kullanın :D
Crazy_Plane
Kayıtlı Kullanıcı
Mesajlar: 203
Kayıt: 12.02.2007, 19:51
İletişim:

Mesaj gönderen Crazy_Plane »

harika. çok teşekkürler.
http://www.vbcode.info
Bütün Programlama dilleri için eşsiz kaynak

http://www.joyystick.com
Böyle site sadece Rusya'da var(dı)
Kullanıcı avatarı
akut
Kayıtlı Kullanıcı
Mesajlar: 74
Kayıt: 27.03.2007, 23:13
İletişim:

Mesaj gönderen akut »

<!-- BEGIN switch_attached_forums -->
<!-- BEGIN br -->
<br />
<!-- END br -->
<span class="gensmall"><b>{catrow.forumrow.switch_attached_forums.L_ATTACHED_FORUMS}:</b>
<!-- BEGIN attached_forums -->
<a class="nav" href="{catrow.forumrow.switch_attached_forums.attached_forums.U_VIEWFORUM}"><img alt="{catrow.forumrow.switch_attached_forums.attached_forums.L_FORUM_IMAGE}" border="0" src="{catrow.forumrow.switch_attached_forums.attached_forums.FORUM_IMAGE}" title="{catrow.forumrow.switch_attached_forums.attached_forums.L_FORUM_IMAGE}" />{catrow.forumrow.switch_attached_forums.attached_forums.FORUM_NAME}</a>
<!-- END attached_forums -->
<span class="genmed">
<!-- END switch_attached_forums -->
</td>

son kod war.. üstüne yazacagımız..

üstüne yazarım yazmasına da.. üstüne yazılması ıcın verılen bulunması gereken kodda bu kadar fazlalık war.. kesın başka bir modun eklentisi..

bunu nasıl yapıcam . . yeni kodun neresıne ekleyeyım ?
Kullanıcı avatarı
pikachu
Kayıtlı Kullanıcı
Mesajlar: 3062
Kayıt: 16.07.2006, 15:32
Konum: ağandon /
İletişim:

Mesaj gönderen pikachu »

iki kodu incele replace yapmadan önce fazlalık gibi olan kısım kalsın büyük ihtimalle başka bir modun parçasıdır. replace dediği yer tamamen farklı değildir benzer yerler dışında yani nereler değiştirilmişsse oraları değiştir.
Kullanıcı avatarı
akut
Kayıtlı Kullanıcı
Mesajlar: 74
Kayıt: 27.03.2007, 23:13
İletişim:

Mesaj gönderen akut »

Teşekkürler. Öyle Yaptım. Fakat Anasayfa BembeyazGözüküyor..

Sanırım Ufak Bir Hata Yaptım Baştan Kurayım :)
Kullanıcı avatarı
akut
Kayıtlı Kullanıcı
Mesajlar: 74
Kayıt: 27.03.2007, 23:13
İletişim:

Mesaj gönderen akut »

Kurdum . .

Usta
Son Yazan: Usta
Bunları Nasıl Ortalayabiliriz ?
Aşagıdakı Resımdede Gösterdim Ortalanması Gereken Yeri..

Yardımınızı Beklıyorum . .
Dosya ekleri
1.JPG
1.JPG (5.53 KiB) 3562 kere görüntülendi
Kullanıcı avatarı
akut
Kayıtlı Kullanıcı
Mesajlar: 74
Kayıt: 27.03.2007, 23:13
İletişim:

Mesaj gönderen akut »

20 Gündür Cevap Yok :(
Kullanıcı avatarı
Dn_35
Kayıtlı Kullanıcı
Mesajlar: 3400
Kayıt: 08.04.2006, 22:02
İletişim:

Mesaj gönderen Dn_35 »

bu vBulletinin bir özelliği ve oradaki gibi hazırlanmış.

Tema dosyalarında görüntüyle oynamak içib frontpage gibi program var. Kodları yapıştır ve istediğin yeri seçip ortala iconuna tıkladınmı ortalanmış olur.
Site Kuralları | Mod Kurulum Makalesi | MODX Formatlı Modların Kurulumu

Lütfen özel mesaj ile yardım istemeyiniz, kurallarımız gereği özel mesajlara cevap vermiyoruz.
Kullanıcı avatarı
akut
Kayıtlı Kullanıcı
Mesajlar: 74
Kayıt: 27.03.2007, 23:13
İletişim:

Mesaj gönderen akut »

Peki Teşekkürler.
banned
Kayıtlı Kullanıcı
Mesajlar: 16
Kayıt: 01.04.2007, 21:54
İletişim:

Mesaj gönderen banned »

gerçekten güzel bir mod ama Subforum kullananlar için uygulanmıyor sanırım yada sonrasına ekle secenekli olursa olur diye düşünuyorum.. Bir el atabilirmisiniz.. Alt forumlu bir foruma bunu nasıl ekleriz.. teşekkürler..
drew
Kayıtlı Kullanıcı
Mesajlar: 27
Kayıt: 10.12.2006, 19:57
İletişim:

Mesaj gönderen drew »

çakışıyor benim bildiğim çünkü index.php dosyasında bu modla değiştiriyoruz alt forum modundada o koda ihtiyaç oluyor ama belki de değiştirdiğimiz kodun altına eklersek aynı işlevi görebilir :?
Kilitli

“2.0.x PreMODlar & Yapım aşamasındaki MODlar” sayfasına dön

Kimler çevrimiçi

Bu forumu görüntüleyen kullanıcılar: Hiç bir kayıtlı kullanıcı yok ve 0 misafir