Seite 1 von 1

Separate Announcements & Sticky 1.1.0 ändern

Verfasst: 27.02.2005 00:10
von siebenschlaefer
habe folgenden mod eingebaut - funktioniert auch super, nur möchte ich dasn bissel anders - und zwar werden mit dem mod ankündigungen und wichitge topics in sozusagen eine kategorie über den themen dargestellt, ich würd aber gern eine "kategorie" für die ankündigungen, eine für die "wichtig topics" und eine für die topics dann - hat da einer vielleicht ne schnelle lösung parat :-?


##############################################################
## MOD Title: Separate Announcements & Sticky
## MOD Author: Aiencran < cranportal@katamail.com >
## MOD Description: This hack separates Announcements and Sticky Topics from other topics in viewforum page.
## MOD Version: 1.1.0
##
## Installation Level: Easy
## Installation Time: 3 Minutes
## Files To Edit: viewforum.php,
## language/lang_english/lang_main.php,
## templates/subSilver/viewforum_body.tpl
## Included Files: (n/a, or list of included/required files)
##############################################################
## 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:
##
##############################################################
## MOD History:
##
## 2004-10-27 - Version 1.1.0
## - It supports now Global Announcements
## - Fixed sorting issues
##
## 2004-10-20 - Version 1.0.0
## - First Version
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]------------------------------------------
#
/viewforum.php

#
#-----[ FIND ]------------------------------------------
#
//
// All announcement data, this keeps announcements
// on each viewforum page ...
//

#
#-----[ AFTER, ADD ]------------------------------------
#
$total_global_announcements = ( isset($total_announcements) ) ? $total_announcements : 0;

#
#-----[ FIND ]------------------------------------------
#
AND t.topic_type = " . POST_ANNOUNCE . "
ORDER BY t.topic_last_post_id DESC ";

#
#-----[ REPLACE WITH ]------------------------------------
#
AND t.topic_type BETWEEN " . POST_STICKY . " AND " . POST_ANNOUNCE . "
ORDER BY t.topic_type DESC, t.topic_last_post_id DESC ";

#
#-----[ FIND ]------------------------------------------
#
AND t.topic_type <> " . POST_ANNOUNCE . "

#
#-----[ AFTER, ADD ]------------------------------------
#
AND t.topic_type <> " . POST_STICKY . "

#
#-----[ FIND ]------------------------------------------
#
'U_VIEW_TOPIC' => $view_topic_url)
);

#
#-----[ AFTER, ADD ]------------------------------------
#
$is_first_global = ( ( $i == 0) AND ( $total_global_announcements > 0 ));
$is_first_announce = ( ( $i == $total_global_announcements ) AND ( ( $total_announcements - $total_global_announcements ) > 0 ) );
$is_first_normal_topic = ( ( $i == $total_announcements ) AND ( $total_announcements > 0 ) );
if ( $is_first_global ) {
$template->assign_block_vars('topicrow.divider', array(
'L_DIV_HEADERS' => $lang['Global_Announcements'])
);

}
if ( $is_first_announce ) {
$template->assign_block_vars('topicrow.divider', array(
'L_DIV_HEADERS' => $lang['Announcements_and_Sticky'])
);

}
if ( $is_first_normal_topic ) {
$template->assign_block_vars('topicrow.divider', array(
'L_DIV_HEADERS' => $lang['Topics'])
);

}

#
#-----[ OPEN ]------------------------------------------
#
/language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------
#
//
// That's all, Folks!
// -------------------------------------------------

#
#-----[ BEFORE, ADD ]------------------------------------
#
$lang['Announcements_and_Sticky'] = 'Announcements and Sticky Topics';
$lang['Global_Announcements'] = 'Global Announcements';

#
#-----[ OPEN ]------------------------------------------
#
/templates/subSilver/viewforum_body.tpl

#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN topicrow -->

#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN divider -->
<tr>
<td class="catHead" colspan="6" height="28"><span class="cattitle">{topicrow.divider.L_DIV_HEADERS}</span></td>
</tr>
<!-- END divider -->

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

Verfasst: 27.02.2005 10:14
von kratzer54847
vielleicht wäre das hier was für dich:

http://www.phpbbhacks.com/download/1205

mfg Johny