Recent Topic Mod bei Categories Hierarchy

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Benutzeravatar
mgutt
Mitglied
Beiträge: 2999
Registriert: 31.08.2004 16:44
Wohnort: Hennef
Kontaktdaten:

Recent Topic Mod bei Categories Hierarchy

Beitrag von mgutt »

Ich hatte bei meinem alten "ohne CH" Acid's Recent Topics Mod drin.

Jetzt habe ich die neueste Version eingebaut:

http://www.phpbb.de/moddb/mod.php?id=48

aber auf der Forumseite ( www.maxrev.de/forum.htm ) kommt nur der Titel aber keine Beiträge. Liegt das an CH?
meine Foren: http://www.maxrev.de/communities.htm
Ich kaufe Dein Forum! Angebote bitte an marc at gutt punkt it
Benutzeravatar
mgutt
Mitglied
Beiträge: 2999
Registriert: 31.08.2004 16:44
Wohnort: Hennef
Kontaktdaten:

Beitrag von mgutt »

hat jemand eine Idee oder kennt jemand eine Alternative?
meine Foren: http://www.maxrev.de/communities.htm
Ich kaufe Dein Forum! Angebote bitte an marc at gutt punkt it
Benutzeravatar
mgutt
Mitglied
Beiträge: 2999
Registriert: 31.08.2004 16:44
Wohnort: Hennef
Kontaktdaten:

Beitrag von mgutt »

*bump*
meine Foren: http://www.maxrev.de/communities.htm
Ich kaufe Dein Forum! Angebote bitte an marc at gutt punkt it
Fundus
Mitglied
Beiträge: 488
Registriert: 29.03.2004 21:22

Beitrag von Fundus »

probier mal wie hier beschrieben die dateien des CH zu includen
http://rpgnet.clanmckeen.com/demo/viewtopic.php?t=4686
(sollte bei recent.php nicht anderes laufen)
Benutzeravatar
mgutt
Mitglied
Beiträge: 2999
Registriert: 31.08.2004 16:44
Wohnort: Hennef
Kontaktdaten:

Beitrag von mgutt »

echt nett gemeint. bringt leider nichts, da die recent.php nur included wird auf der index.php. soll heißen die includes vom categories hierarchy mod sind bereits durch die index.php gegeben.

was mich aber auch wundert ist, wenn ich special categories einschalte (wenn ich überhaupt wüsste welche "special" sein sollen ;) ), dann kommt folgende fehlermeldung:

Code: Alles auswählen

could not obtain main information.

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near ') AND t.topic_poster = u.user_id AND f.forum_id = t.forum_id AND p.post_id = t.t' at line 3

SELECT t.*, f.forum_id, f.forum_name, u.username AS first_poster, u.user_id AS first_poster_id, u2.username AS last_poster, u2.user_id AS last_poster_id, p.post_username AS first_poster_name, p2.post_username AS last_poster_name, p2.post_time, pt.* FROM phpbb_topics t, phpbb_forums f, phpbb_users u, phpbb_posts p, phpbb_posts p2, phpbb_users u2, phpbb_posts_text pt WHERE t.forum_id NOT IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32) AND t.forum_id IN () AND t.topic_poster = u.user_id AND f.forum_id = t.forum_id AND p.post_id = t.topic_first_post_id AND p2.post_id = t.topic_last_post_id AND u2.user_id = p2.poster_id AND t.topic_last_post_id = pt.post_id ORDER BY t.topic_last_post_id DESC LIMIT 5

Line : 48
File : /www/htdocs/***entfernt***/recent.php
meine Foren: http://www.maxrev.de/communities.htm
Ich kaufe Dein Forum! Angebote bitte an marc at gutt punkt it
Benutzeravatar
mgutt
Mitglied
Beiträge: 2999
Registriert: 31.08.2004 16:44
Wohnort: Hennef
Kontaktdaten:

Beitrag von mgutt »

meine User betteln schon förmlich.. wie bekomme ich den Recent Mod zum laufen :-?
meine Foren: http://www.maxrev.de/communities.htm
Ich kaufe Dein Forum! Angebote bitte an marc at gutt punkt it
Dave
Mitglied
Beiträge: 2085
Registriert: 25.05.2003 15:03
Wohnort: Wuppertal

Beitrag von Dave »

Code: Alles auswählen

// ############         Edit below         ########################################
$topic_length = '';		// Länge des Thementitels
$topic_limit = '';			// Anzahl der angezeigten Themen
$forum_ids = '';			// IDs der Foren die NICHT angezeigt werden sollen (trenne sie mit einem Komma); z.B. /viewforum.php?f=2 (2 wäre die ID)
// ############         Edit above         ########################################

$sql = "SELECT 
	t.topic_id, t.forum_id, t.topic_title, t.topic_replies, t.topic_last_post_id, t.topic_last_time, t.topic_last_poster,
	u.user_id, u.username
	FROM ". TOPICS_TABLE ." t, ". USERS_TABLE ." u
	WHERE t.forum_id NOT IN (".$forum_ids.") AND t.topic_last_poster = u.user_id
	ORDER BY topic_last_time DESC
	LIMIT $topic_limit";
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);

$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);

$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] .'_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] .'_f']) : array();
for( $i = 0; $i < count($line); $i++ )
{
	$forum_id = $line[$i]['forum_id'];
	$is_auth = auth(AUTH_ALL, $forum_id, $userdata);
	if ( !empty($is_auth['auth_read']) )
	{
		$topic_id 		= $line[$i]['topic_id'];
		$word_censor 	= ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $line[$i]['topic_title']) : $line[$i]['topic_title'];
		$topic_title	= ( strlen($line[$i]['topic_title']) < $topic_length ) ? $word_censor : substr(stripslashes($word_censor), 0, $topic_length) .'...';
		$topic_title_a	= $line[$i]['topic_title'];
		$replies		= $line[$i]['topic_replies'];
		$last_author	= ( $line[$i]['user_id'] != ANONYMOUS ) ? '<a href="'. append_sid("profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $line[$i]['user_id']) .'" title="'.sprintf($lang['Viewing_user_profile'], $line[$i]['username']).'">'. $line[$i]['username'] .'</a>' : ( ($line[$i]['username'] != '' ) ? $line[$i]['username'] : $lang['Guest'] );
		$last_time		= create_date($board_config['default_dateformat'], $line[$i]['topic_last_time'], $board_config['board_timezone']);
		$last_url		= '<a href="'. append_sid("viewtopic.$phpEx?". POST_TOPIC_URL ."=$topic_id")  .'"><img src="'. $images['icon_latest_reply'] .'" alt="'. $lang['View_topic'] .'" title="'. $lang['View_topic'] .'" border="0" /></a>';
		$topic_url		= append_sid("viewtopic.$phpEx?". POST_POST_URL .'='. $line[$i]['topic_last_post_id'] .'#'. $line[$i]['topic_last_post_id']);
	
		$template->assign_block_vars('recent', array(
			'TOPIC_TITLE_A'	=> $topic_title_a,
			'TOPIC_TITLE'	=> $topic_title,
			'REPLIES'		=> $replies,
			'LAST_AUTHOR'	=> $last_author,
			'LAST_TIME'		=> $last_time,
			'LAST_URL'		=> $last_url,
			'U_VIEW_TOPIC'	=> $topic_url,
		));
	}
}

$template->assign_vars(array(
	'L_ANSWER'	=> 'Antworten',
	'L_FORM'	=> 'von',
	'L_AM'		=> 'am'
));
brauchste auch noch die tpl dateien? Das ganze kannste dir auch auf http://forum.uga-agga.de ansehen
Benutzeravatar
mgutt
Mitglied
Beiträge: 2999
Registriert: 31.08.2004 16:44
Wohnort: Hennef
Kontaktdaten:

Beitrag von mgutt »

hm:
Allgemeiner Fehler

could not obtain main information.

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near ') AND t.topic_last_poster = u.user_id ORDER BY topic_last_time DESC LIMI' at line 5

SELECT t.topic_id, t.forum_id, t.topic_title, t.topic_replies, t.topic_last_post_id, t.topic_last_time, t.topic_last_poster, u.user_id, u.username FROM phpbb_topics t, phpbb_users u WHERE t.forum_id NOT IN () AND t.topic_last_poster = u.user_id ORDER BY topic_last_time DESC LIMIT

Line : 17
File : /www/htdocs/*******/recent.php
meine Foren: http://www.maxrev.de/communities.htm
Ich kaufe Dein Forum! Angebote bitte an marc at gutt punkt it
Dave
Mitglied
Beiträge: 2085
Registriert: 25.05.2003 15:03
Wohnort: Wuppertal

Beitrag von Dave »

Code: Alles auswählen

// ############         Edit below         ########################################
$topic_length = '30';		// Länge des Thementitels
$topic_limit = '8';			// Anzahl der angezeigten Themen
$forum_ids = '17,19,31,39,40,41,42,43,58,59,61,62,63,64,65,71,92';			// IDs der Foren die NICHT angezeigt werden sollen (trenne sie mit einem Komma); z.B. /viewforum.php?f=2 (2 wäre die ID)
// ############         Edit above         ########################################

$sql_where = '';
if ( !empty($forum_ids) )
{
	$sql_where = 't.forum_id NOT IN ('.$forum_ids.') AND ';
}

$sql = "SELECT 
	t.topic_id, t.forum_id, t.topic_title, t.topic_replies, t.topic_last_post_id, t.topic_last_time, t.topic_last_poster,
	u.user_id, u.username
	FROM ". TOPICS_TABLE ." t, ". USERS_TABLE ." u
	WHERE $sql_where t.topic_last_poster = u.user_id
	ORDER BY topic_last_time DESC
	LIMIT $topic_limit";
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);

$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);

$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] .'_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] .'_f']) : array();
for( $i = 0; $i < count($line); $i++ )
{
	$forum_id = $line[$i]['forum_id'];
	$is_auth = auth(AUTH_ALL, $forum_id, $userdata);
	if ( !empty($is_auth['auth_read']) )
	{
		$topic_id 		= $line[$i]['topic_id'];
		$word_censor 	= ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $line[$i]['topic_title']) : $line[$i]['topic_title'];
		$topic_title	= ( strlen($line[$i]['topic_title']) < $topic_length ) ? $word_censor : substr(stripslashes($word_censor), 0, $topic_length) .'...';
		$topic_title_a	= $line[$i]['topic_title'];
		$replies		= $line[$i]['topic_replies'];
		$last_author	= ( $line[$i]['user_id'] != ANONYMOUS ) ? '<a href="'. append_sid("profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $line[$i]['user_id']) .'" title="'.sprintf($lang['Viewing_user_profile'], $line[$i]['username']).'">'. $line[$i]['username'] .'</a>' : ( ($line[$i]['username'] != '' ) ? $line[$i]['username'] : $lang['Guest'] );
		$last_time		= create_date($board_config['default_dateformat'], $line[$i]['topic_last_time'], $board_config['board_timezone']);
		$last_url		= '<a href="'. append_sid("viewtopic.$phpEx?". POST_TOPIC_URL ."=$topic_id")  .'"><img src="'. $images['icon_latest_reply'] .'" alt="'. $lang['View_topic'] .'" title="'. $lang['View_topic'] .'" border="0" /></a>';
		$topic_url		= append_sid("viewtopic.$phpEx?". POST_POST_URL .'='. $line[$i]['topic_last_post_id'] .'#'. $line[$i]['topic_last_post_id']);
	
		$template->assign_block_vars('recent', array(
			'TOPIC_TITLE_A'	=> $topic_title_a,
			'TOPIC_TITLE'	=> $topic_title,
			'REPLIES'		=> $replies,
			'LAST_AUTHOR'	=> $last_author,
			'LAST_TIME'		=> $last_time,
			'LAST_URL'		=> $last_url,
			'U_VIEW_TOPIC'	=> $topic_url,
		));
	}
}

$template->assign_vars(array(
	'L_ANSWER'	=> 'Antworten',
	'L_FORM'	=> 'von',
	'L_AM'		=> 'am'
));
Das geht :D
Benutzeravatar
mgutt
Mitglied
Beiträge: 2999
Registriert: 31.08.2004 16:44
Wohnort: Hennef
Kontaktdaten:

Beitrag von mgutt »

ja sag doch, dass ich was schreiben MUSS ;)

ok, jetzt weiß ich auch, dass ich das template zusätzlich falsch positioniert hatte. deine variante ist aber die einzige die geht, jetzt an die feinheiten.

kannst du mir das template nochmal geben, weil meins hat viel mehr felder. dann könnte ich das besser anpassen.

Mein derzeitiges Problem ist, dass die letzten Beiträge wegen dem chMod auch in den Unterkategorien angezeigt werden. Das hätte ich gerne anders.. Aber wie :-?
meine Foren: http://www.maxrev.de/communities.htm
Ich kaufe Dein Forum! Angebote bitte an marc at gutt punkt it
Antworten

Zurück zu „phpBB 2.0: Mod Support“