Nieuwe post het eerst
Forumregels
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.

- waltdisneydvd
- Berichten: 197
- Lid geworden op: 30 jul 2005, 08:21
- Locatie: Duiven
- Contacteer:
Nieuwe post het eerst
Misschien een vage vraag maar;
Ik ben op zoek naar een mod die de pagina met het laatst geposte bericht laat zien. Dus als je op een topic titel klikt, meteen de pagina met het laatste bericht krijgt. Ik weet dat het kan, maar ik kan het nergens vinden, weet iemand waar ik deze kan krijgen?
Groeten, waltdisneydvd
Ik ben op zoek naar een mod die de pagina met het laatst geposte bericht laat zien. Dus als je op een topic titel klikt, meteen de pagina met het laatste bericht krijgt. Ik weet dat het kan, maar ik kan het nergens vinden, weet iemand waar ik deze kan krijgen?
Groeten, waltdisneydvd
- waltdisneydvd
- Berichten: 197
- Lid geworden op: 30 jul 2005, 08:21
- Locatie: Duiven
- Contacteer:
Ik heb hem gevonden:
##############################################################
## MOD Title: Last Topic Display Modification
## MOD Author: SiliconHero < siliconhero@skytowergames.net > (Walter Williams) http://www.skytowergames.net/
## MOD Description: Displays the title of and a link to the last topic replied to in a particular forum.
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: ~1 Minute
## Files To Edit: index.php
## Included Files: N/A
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## This is my very first phpBB mod. I figured I'd start with something small, that doesn't
## require the user to modify a whole bunch of files. This mod should work with phpBB 2.0.6
## and up, across all templates (since the index.php file is the only thing being modified).
##
##############################################################
## MOD History:
##
## 2004-05-31 - Version 1.0.0
## - initial version of the Last Topic Mod
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
## Possible Actions:
##
## SQL
## COPY
## OPEN
## FIND
## REPLACE WITH
## AFTER, ADD
## BEFORE, ADD
## IN-LINE FIND
## IN-LINE AFTER, ADD
## IN-LINE BEFORE, ADD
## IN-LINE REPLACE WITH
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
index.php
#
#-----[ FIND ]------------------------------------------
#
$last_post = $last_post_time . '<br />';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$sql = "SELECT DISTINCT f.forum_id, f.forum_last_post_id, p.topic_id, t.topic_title
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t
WHERE t.topic_id = p.topic_id
AND t.topic_last_post_id = " . $forum_data[$j]['forum_last_post_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select info from post/topic table', '', __LINE__, __FILE__, $sql);
}
$last_topic_data = $db->sql_fetchrow($result);
$ltid = $last_topic_data['topic_id'];
$lttitle = $last_topic_data['topic_title'];
// append first 25 characters of topic title to last topic data
if (strlen($lttitle) > 25)
{
$last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$ltid") . '">' . substr($lttitle, 0, 25) . '...</a><br />';
}
else
{
$last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$ltid") . '">' . substr($lttitle, 0, 25) . '</a><br />';
}
$db->sql_freeresult($result);
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
##############################################################
## MOD Title: Last Topic Display Modification
## MOD Author: SiliconHero < siliconhero@skytowergames.net > (Walter Williams) http://www.skytowergames.net/
## MOD Description: Displays the title of and a link to the last topic replied to in a particular forum.
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: ~1 Minute
## Files To Edit: index.php
## Included Files: N/A
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## This is my very first phpBB mod. I figured I'd start with something small, that doesn't
## require the user to modify a whole bunch of files. This mod should work with phpBB 2.0.6
## and up, across all templates (since the index.php file is the only thing being modified).
##
##############################################################
## MOD History:
##
## 2004-05-31 - Version 1.0.0
## - initial version of the Last Topic Mod
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
## Possible Actions:
##
## SQL
## COPY
## OPEN
## FIND
## REPLACE WITH
## AFTER, ADD
## BEFORE, ADD
## IN-LINE FIND
## IN-LINE AFTER, ADD
## IN-LINE BEFORE, ADD
## IN-LINE REPLACE WITH
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
index.php
#
#-----[ FIND ]------------------------------------------
#
$last_post = $last_post_time . '<br />';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$sql = "SELECT DISTINCT f.forum_id, f.forum_last_post_id, p.topic_id, t.topic_title
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t
WHERE t.topic_id = p.topic_id
AND t.topic_last_post_id = " . $forum_data[$j]['forum_last_post_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select info from post/topic table', '', __LINE__, __FILE__, $sql);
}
$last_topic_data = $db->sql_fetchrow($result);
$ltid = $last_topic_data['topic_id'];
$lttitle = $last_topic_data['topic_title'];
// append first 25 characters of topic title to last topic data
if (strlen($lttitle) > 25)
{
$last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$ltid") . '">' . substr($lttitle, 0, 25) . '...</a><br />';
}
else
{
$last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$ltid") . '">' . substr($lttitle, 0, 25) . '</a><br />';
}
$db->sql_freeresult($result);
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
- waltdisneydvd
- Berichten: 197
- Lid geworden op: 30 jul 2005, 08:21
- Locatie: Duiven
- Contacteer:
- waltdisneydvd
- Berichten: 197
- Lid geworden op: 30 jul 2005, 08:21
- Locatie: Duiven
- Contacteer:
- waltdisneydvd
- Berichten: 197
- Lid geworden op: 30 jul 2005, 08:21
- Locatie: Duiven
- Contacteer:
- waltdisneydvd
- Berichten: 197
- Lid geworden op: 30 jul 2005, 08:21
- Locatie: Duiven
- Contacteer:
klopt, ik heb het een tijdje geleden aangepast voor http://www.treinenfanaat.nl
het is een kwestie van twee regeltjes aanpassen van asc naar desc, of andersom.
het is een kwestie van twee regeltjes aanpassen van asc naar desc, of andersom.
... Maar ik modereer (nog) niet.
- waltdisneydvd
- Berichten: 197
- Lid geworden op: 30 jul 2005, 08:21
- Locatie: Duiven
- Contacteer:
De volgorde zit in viewtopic.php
Dat wordt:
Code: Selecteer alles
//
// Decide how to order the post display
//
if ( !empty($HTTP_POST_VARS['postorder']) || !empty($HTTP_GET_VARS['postorder']) )
{
$post_order = (!empty($HTTP_POST_VARS['postorder'])) ? htmlspecialchars($HTTP_POST_VARS['postorder']) : htmlspecialchars($HTTP_GET_VARS['postorder']);
$post_time_order = ($post_order == "asc") ? "ASC" : "DESC";
}
else
{
$post_order = 'asc';
$post_time_order = 'ASC';
}
Code: Selecteer alles
//
// Decide how to order the post display
//
if ( !empty($HTTP_POST_VARS['postorder']) || !empty($HTTP_GET_VARS['postorder']) )
{
$post_order = (!empty($HTTP_POST_VARS['postorder'])) ? htmlspecialchars($HTTP_POST_VARS['postorder']) : htmlspecialchars($HTTP_GET_VARS['postorder']);
$post_time_order = ($post_order == "asc") ? "DESC" : "ASC";
}
else
{
$post_order = 'desc';
$post_time_order = 'DESC';
}
... Maar ik modereer (nog) niet.
- waltdisneydvd
- Berichten: 197
- Lid geworden op: 30 jul 2005, 08:21
- Locatie: Duiven
- Contacteer:
- waltdisneydvd
- Berichten: 197
- Lid geworden op: 30 jul 2005, 08:21
- Locatie: Duiven
- Contacteer:
Ik denk dat het hier wel kan. Goed, onderaan een topic kan je kiezen tussen Oudste post het eerst en Nieuwste post het eerst. Ik wil dit graag verplaatsen naar het profiel zodat je daar kan beslissen of je alle topics in het forum met de nieuwste post of de oudste post het eerst kan doen, want nu moet je dat bij elke pagina doen.
Kan dit zomaar, zo ja wat van het php script moet ik dan veranderen en verplaatsen?
Kan dit zomaar, zo ja wat van het php script moet ik dan veranderen en verplaatsen?
- waltdisneydvd
- Berichten: 197
- Lid geworden op: 30 jul 2005, 08:21
- Locatie: Duiven
- Contacteer:
- waltdisneydvd
- Berichten: 197
- Lid geworden op: 30 jul 2005, 08:21
- Locatie: Duiven
- Contacteer:
- waltdisneydvd
- Berichten: 197
- Lid geworden op: 30 jul 2005, 08:21
- Locatie: Duiven
- Contacteer: