Laatste bericht boven de datum/gebruikersnaam

Hulp nodig bij een modificaties of op zoek naar een MOD? Bekijk ons archief. Support wordt helaas niet meer verleend.
Forumregels

Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
phpBB2.0.x
Gesloten
Muiter
Berichten: 823
Lid geworden op: 05 sep 2003, 19:34
Contacteer:

Laatste bericht boven de datum/gebruikersnaam

Bericht door Muiter » 14 dec 2003, 23:02

Ik ben op zoek naar die mod die op de hoofdpagina in de tabel "Laatste bericht" boven de datum van het laatste bericht het onderwerp van het laatste bericht plaatst.
Ik heb al op diverse sites gezoch en kom hem niet vinden :oops:
Hoi! Ik ben een onderschrift virus, kopieer/plak mij in jouw onderschrift om mij te verspreiden!

Gebruikersavatar
headout
Berichten: 1082
Lid geworden op: 11 dec 2002, 19:55
Contacteer:

Re: Laatste bericht boven de datum/gebruikersnaam

Bericht door headout » 14 dec 2003, 23:09

Muiter schreef: Ik heb al op diverse sites gezoch en kom hem niet vinden :oops:
Dan heb je niet goed gezocht! :D
Last Post Topic on Index
http://phpbb3.nl Jouw gratis forumprovider!

Muiter
Berichten: 823
Lid geworden op: 05 sep 2003, 19:34
Contacteer:

Re: Laatste bericht boven de datum/gebruikersnaam

Bericht door Muiter » 14 dec 2003, 23:13

headout schreef:Last Post Topic on Index
Daar was ik al bang voor, bedankt :thumb:
Hoi! Ik ben een onderschrift virus, kopieer/plak mij in jouw onderschrift om mij te verspreiden!

Muiter
Berichten: 823
Lid geworden op: 05 sep 2003, 19:34
Contacteer:

Bericht door Muiter » 14 dec 2003, 23:31

Maar deze mod werkt niet op 2.06 :(
Weet iemand welk deel ik van onderstaande code moet veranderen zodat hij wel werkt?

Code: Selecteer alles

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

#
#-----[ ACTION Find ]-----------------------------------------
#
			$sql = "SELECT f.*, 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 " . USERS_TABLE . " u ON u.user_id = p.poster_id )
				ORDER BY f.cat_id, f.forum_order";
			break;
	}
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);
	}

	$forum_data = array();
	while( $row = $db->sql_fetchrow($result) )
	{
		$forum_data[] = $row;
	}

	if ( !($total_forums = count($forum_data)) )
	{
		message_die(GENERAL_MESSAGE, $lang['No_forums']);
	}

	//
	// Obtain a list of topic ids which contain


#
#-----[ REPLACE WITH ]----------------------------------------
#
 		$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id, t.topic_title, t.topic_last_post_id " .
			" FROM ((( " . FORUMS_TABLE . " f " .
			" LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )" .
			" LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id ) " .
			" LEFT JOIN " . TOPICS_TABLE . " t ON t.topic_last_post_id = p.post_id ) " .
			" ORDER BY f.cat_id, f.forum_order";
		break;
	}
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);
	}

	$forum_data = array();
	$topic_last_ary = array();
	$i=0;
	while( $row = $db->sql_fetchrow($result) )
	{
		if (!in_array($row['topic_last_post_id'], $topic_last_ary) || $row['topic_last_post_id']==0) {
			$topic_last_ary[i]=$row['topic_last_post_id'];
			$i++;
			$forum_data[] = $row;
		}
	}
	unset($topic_last_ary);
	if ( !($total_forums = count($forum_data)) )
	{
		message_die(GENERAL_MESSAGE, $lang['No_forums']);
	}
	
	//
	// Filter topic_title not allowed to read
	// 
	if ( !($userdata['user_level'] == ADMIN && $userdata['session_logged_in']) ) {
		$auth_read_all = array();
		$auth_read_all=auth(AUTH_READ, AUTH_LIST_ALL, $userdata, $forum_data);
		$auth_data = '';
		for($i=0; $i<count($forum_data); $i++)
		{
			if (!$auth_read_all[$forum_data[$i]['forum_id']]['auth_read']) {
				$forum_data[$i]['topic_title']='';
			}
		}
	}

	//
	// Define censored word matches
	//
	$orig_word = array();
	$replacement_word = array();
	obtain_word_list($orig_word, $replacement_word);

	//
	// Obtain a list of topic ids which contain


#
#-----[ ACTION Find ]-----------------------------------------
#
	if ( $forum_data[$j]['forum_last_post_id'] )
	{
	...
	}


#
#-----[ ACTION Replace With ]---------------------------------
#
	if ( $forum_data[$j]['forum_last_post_id'] )
	{
		$topic_title = $forum_data[$j]['topic_title'];
		$topic_title2 = $forum_data[$j]['topic_title'];
		
		//
		// Censor topic title
		//
		if ( count($orig_word) )
		{
			$topic_title = preg_replace($orig_word, $replacement_word, $topic_title);
			$topic_title2 = preg_replace($orig_word, $replacement_word, $topic_title2);
		}
										
		if (strlen($topic_title)>27) {
			$topic_title = substr($topic_title,0,24) . '...';
		}

		$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);
		$last_post = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '" title="' . $topic_title2 . '">' . $topic_title . '</a><br>';
		$last_post .= $last_post_time . '&nbsp;<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><br>' . $lang['by'] . '&nbsp;';
		$last_post .= ( $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> ';
	}

#
#-----[ SAVE/CLOSE ALL FILES ]----------------------------------
#
Hoi! Ik ben een onderschrift virus, kopieer/plak mij in jouw onderschrift om mij te verspreiden!

Gebruikersavatar
Podium4
Berichten: 3009
Lid geworden op: 07 aug 2003, 15:32
Locatie: Groningen / Zwolle

Bericht door Podium4 » 15 dec 2003, 09:06

zoek gewoon dat stuk op in index.php wat er heel veel op lijkt... zoek dan de verschillen op tussen het oude stuk in de mod en de nieuwe en voeg de nieuwe dingen toe...
Alleen support via het forum, dus geen support via email, msn of pb.

Gesloten