[MOD] Recent Topics (extended variation)

[url=http://www.phpbbturkey.com/mods.html:34cnv4ga]phpBB 2.0.x MOD Veritabanımızda[/url:34cnv4ga] yayınlanan ve tarafınızca eklenen tüm yeni phpBB 2.0.x sürümleri için MODların duyuruları buradan yapılmaktadır. MODlar hakkında ihtiyacınız olan desteği lütfen [b:34cnv4ga]2.0.x MOD Destek[/b:34cnv4ga] forumuna başlık açarak sorunuz.
Kilitli
YESILEJDER
Kayıtlı Kullanıcı
Mesajlar: 411
Kayıt: 17.02.2006, 22:10
İletişim:

[MOD] Recent Topics (extended variation)

Mesaj gönderen YESILEJDER »

Mod ismi: Recent Topics (extended variation)
Mod Versiyonu: 1.2.2 (phpBB 2.0.x)
Mod Yazari: Acid
Mod Aciklamasi: Bu Mod Sayesinde Sitenizde Son 24 Saat icinde Gönderilen Basliklari bir Bölümde Görebiliyorsunuz bunu istediginiz gibi ayarlama imkaninizda var.

Download Links

Kaynak: **********
En son YESILEJDER tarafından 04.05.2006, 10:18 tarihinde düzenlendi, toplamda 1 kere düzenlendi.
DİKKAT!

Sitene Aquamp Medya Player Kurmak Istıyorsan TIKLA
Kullanıcı avatarı
CaN_BaKıR
Kayıtlı Kullanıcı
Mesajlar: 459
Kayıt: 17.03.2006, 01:16

Mesaj gönderen CaN_BaKıR »

İyi güzelde bu kısım nedir?

Hangi options bu :roll:

Kod: Tümünü seç

##########################################################################################
# 
#-----[ OPTIONS ]----------------------------------------------------
#  
## you´ll find the options in the first lines of recent.php

	$topic_length	- length of topic title
	$topic_limit	- limit of displayed topics per page
	$special_forums	- if only special forums should be displayed ('0' = no; '1' = yes)
	$forum_ids	- IDs of the forums that should be displayed (separate them with
			  a comma); e.g. /viewforum.php?f=2 (2 is the ID)
	$set_mode	- set default mode
			  ('today', 'yesterday', 'last24', 'lastweek', 'lastXdays')
	$set_days	- set default days (used for lastXdays mode)

## as above described you can specify forums. only topics from those forums will be
## displayed. if you want to exclude those special forums:
# 
#-----[ FIND ]----------------------------------------------------
#  
$where_forums = ( $special_forums == '0' ) ? 't.forum_id NOT IN ('. $except_forums .')' : 't.forum_id NOT IN ('. $except_forums .') AND t.forum_id IN ('. $forum_ids .')';

# 
#-----[ IN-LINE FIND ]----------------------------------------------------
#  
t.forum_id IN

# 
#-----[ REPLACE WITH ]----------------------------------------------------
#
# note that "IN" changed to "NOT IN" 

t.forum_id NOT IN

##########################################################################################
[ resmi görüntülemek için tıklayın ]
phpBB Nasıl Kurulur
https://www.phpbbturkey.com/viewtopic.php?t=35
Mod Nasıl Kurulur
https://www.phpbbturkey.com/viewtopic.php?t=108

Lütfen Özel Mesaj Atıp Soru Sormayınız !!!
YESILEJDER
Kayıtlı Kullanıcı
Mesajlar: 411
Kayıt: 17.02.2006, 22:10
İletişim:

Mesaj gönderen YESILEJDER »

Kurulumda Kelimelerin Acıklamalarını Yapmıs :lol: İng
DİKKAT!

Sitene Aquamp Medya Player Kurmak Istıyorsan TIKLA
Kullanıcı avatarı
CaN_BaKıR
Kayıtlı Kullanıcı
Mesajlar: 459
Kayıt: 17.03.2006, 01:16

Mesaj gönderen CaN_BaKıR »

Tamam Hallettim acayip işime yaradı... Türkçeleştiriyorum şimdi... Az buçuk ingilizce ile yapıyoruz işte bişeyler :D
[ resmi görüntülemek için tıklayın ]
phpBB Nasıl Kurulur
https://www.phpbbturkey.com/viewtopic.php?t=35
Mod Nasıl Kurulur
https://www.phpbbturkey.com/viewtopic.php?t=108

Lütfen Özel Mesaj Atıp Soru Sormayınız !!!
dinamik
Kayıtlı Kullanıcı
Mesajlar: 3
Kayıt: 29.01.2008, 02:06

Re: [MOD] Recent Topics (extended variation)

Mesaj gönderen dinamik »

benim web sayfamda bu mod kurulu.
bazen çalışıyor bazen çalışmıyor
olayı çözemedim bir türlü.
verdiği hata bu...

Kod: Tümünü seç

ould not obtain main information.

DEBUG MODE

SQL Error : 1054 Unknown column 't.topic_first_post_id' in 'on clause'

SELECT t.*, p.poster_id, p.post_username AS last_poster_name, p.post_id, p.post_time, f.forum_name, f.forum_id, u.username AS last_poster, u.user_id AS last_poster_id, u2.username AS first_poster, u2.user_id AS first_poster_id, p2.post_username AS first_poster_name FROM phpbb_topics t, phpbb_posts p LEFT OUTER JOIN phpbb_posts p2 ON p2.post_id = t.topic_first_post_id LEFT OUTER JOIN phpbb_forums f ON p.forum_id = f.forum_id LEFT OUTER JOIN phpbb_users u ON p.poster_id = u.user_id LEFT OUTER JOIN phpbb_users u2 ON u2.user_id = t.topic_poster WHERE t.forum_id NOT IN ('start') AND p.post_id = t.topic_last_post_id AND FROM_UNIXTIME(p.post_time,'%Y%m%d') - FROM_UNIXTIME(unix_timestamp(NOW()),'%Y%m%d') = 0 ORDER BY t.topic_last_post_id DESC LIMIT 0, 10

Line : 127
File : recent.php
hatanın bulunduğu yerdeki sql sorgusunda bana göre hata yok:D
var olan sql sorgusu ise

Kod: Tümünü seç

$where_forums = ( $special_forums == '0' ) ? 't.forum_id NOT IN ('. $except_forums .')' : 't.forum_id NOT IN ('. $except_forums .') AND t.forum_id NOT IN ('. $forum_ids .')';
$sql_start = "SELECT t.*, p.poster_id, p.post_username AS last_poster_name, p.post_id, p.post_time, f.forum_name, f.forum_id, u.username AS last_poster, u.user_id AS last_poster_id, u2.username AS first_poster, u2.user_id AS first_poster_id, p2.post_username AS first_poster_name
	        FROM ". TOPICS_TABLE ." t, ". POSTS_TABLE ." p
		LEFT OUTER JOIN ". POSTS_TABLE ." p2 ON p2.post_id = t.topic_first_post_id
		LEFT OUTER JOIN ". FORUMS_TABLE ." f ON p.forum_id = f.forum_id
		LEFT OUTER JOIN ". USERS_TABLE ." u ON p.poster_id = u.user_id
		LEFT OUTER JOIN ". USERS_TABLE ." u2 ON u2.user_id = t.topic_poster
	        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";

switch( $mode )
{
	case 'today':
		$sql = $sql_start ."FROM_UNIXTIME(p.post_time,'%Y%m%d') - FROM_UNIXTIME(unix_timestamp(NOW()),'%Y%m%d') = 0". $sql_end;
		$template->assign_vars(array('STATUS' => $lang['Recent_today']));
		$where_count = "$where_forums AND FROM_UNIXTIME(p.post_time,'%Y%m%d') - FROM_UNIXTIME(unix_timestamp(NOW()),'%Y%m%d') = 0";
		$l_mode = $lang['Recent_title_today'];
		break;

	case 'yesterday':
		$sql = $sql_start ."FROM_UNIXTIME(p.post_time,'%Y%m%d') - FROM_UNIXTIME(unix_timestamp(NOW()),'%Y%m%d') = -1". $sql_end;
		$template->assign_vars(array('STATUS' => $lang['Recent_yesterday']));
		$where_count = "$where_forums AND FROM_UNIXTIME(p.post_time,'%Y%m%d') - FROM_UNIXTIME(unix_timestamp(NOW()),'%Y%m%d') = -1";
		$l_mode = $lang['Recent_title_yesterday'];
		break;

	case 'last24':
		$sql   = $sql_start ."UNIX_TIMESTAMP(NOW()) - p.post_time < 86400". $sql_end;
		$template->assign_vars(array('STATUS' => $lang['Recent_last24']));
		$where_count = "$where_forums AND UNIX_TIMESTAMP(NOW()) - p.post_time < 86400";
		$l_mode = $lang['Recent_title_last24'];
		break;

	case 'lastweek':
		$sql  = $sql_start ."UNIX_TIMESTAMP(NOW()) - p.post_time < 691200". $sql_end;
		$template->assign_vars(array('STATUS' => $lang['Recent_lastweek']));
		$where_count = "$where_forums AND UNIX_TIMESTAMP(NOW()) - p.post_time < 691200";
		$l_mode = $lang['Recent_title_lastweek'];
		break;

	case 'lastXdays':
		$sql    = $sql_start ."UNIX_TIMESTAMP(NOW()) - p.post_time < 86400 * $amount_days". $sql_end;
		$template->assign_vars(array('STATUS' => sprintf($lang['Recent_lastXdays'], $amount_days)));
		$where_count = "$where_forums AND UNIX_TIMESTAMP(NOW()) - p.post_time < 86400 * $amount_days";
		$l_mode = sprintf($lang['Recent_title_lastXdays'], $amount_days);
		break;

	default:
		$message = $lang['Recent_wrong_mode'] .'<br /><br />'. sprintf($lang['Recent_click_return'], '<a href="'. append_sid("recent.$phpEx") .'">', '</a>') .'<br />'. sprintf($lang['Click_return_index'], '<a href="'. append_sid("index.$phpEx") .'">', '</a>');
		message_die(GENERAL_MESSAGE, $message);
		break;
}
if( !$result = $db->sql_query($sql) )
{
	message_die(GENERAL_ERROR, 'could not obtain main information.', '', __LINE__, __FILE__, $sql);
}
$line = array();
while( $row = $db->sql_fetchrow($result) )
{
	$line[] = $row;
}
$db->sql_freeresult($result);
yardımcı olacak arkadaşlara şimdiden teşekkürler.

bunlarda türkçe dil dosyası için kodlar.
belki birilerine lazım olur.

Kod: Tümünü seç

//
// Recent Topics
//
$lang['Recent_topics'] = 'Son Konular';
$lang['Recent_today'] = 'Bugün';
$lang['Recent_yesterday'] = 'Dün';
$lang['Recent_last24'] = 'Son 24 saat';
$lang['Recent_lastweek'] = 'Geçen Hafta';
$lang['Recent_lastXdays'] = 'Son %s gün';
$lang['Recent_last'] = 'Son';
$lang['Recent_days'] = 'Gün';
$lang['Recent_first'] = 'Zaman: %s';
$lang['Recent_first_poster'] = '%s';
$lang['Recent_select_mode'] = 'Bir Mod Seç:';
$lang['Recent_showing_posts'] = 'Mesajları Göster:';
$lang['Recent_title_one'] = '<font size=4>%s</font> konu %s'; // %s = konular; %s = göre sırala
$lang['Recent_title_more'] = '<font size=4>%s</font> konular %s'; // %s = konulars; %s = göre sırala
$lang['Recent_title_today'] = ' Bugündenden itibaren';
$lang['Recent_title_yesterday'] = ' Dünden İtibaren';
$lang['Recent_title_last24'] = ' Son 24 saatten itibaren';
$lang['Recent_title_lastweek'] = ' Geçen haftadan itibaren';
$lang['Recent_title_lastXdays'] = ' Geçen %s günden itibaren'; // %s = days
$lang['Recent_no_topics'] = 'Yeni Konu Yok.';
$lang['Recent_wrong_mode'] = 'Calışmayan bir metod seçildi.';
$lang['Recent_click_return'] = 'Siteye geri dönmek için %sburaya%s tıkla.'; 
Kilitli

“2.0.x MOD Duyuruları” sayfasına dön

Kimler çevrimiçi

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