da is ne ganze Menge drin
Global Topic MOD
da gibts ja einmal die install ohne den mod split MOD und einmal mit
hatte vor paar tagen installiert
und zwar den hier
Code: Alles auswählen
##############################################################
## MOD Title: Global topic
## MOD Author: OXPUS < webmaster@oxpus.de > (Karsten Ude) http://www.oxpus.de
## MOD Description: This mod, makes it possible to post global topics viewable in all forums.
## Part 4: Required part for boards without Split Topic Type Mod
## MOD Version: 1.1.1
##
## Installation Level: Intermediate
## Installation Time: 2 Minutes
## Files To Edit: 1
## viewforum.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:
##
## Special Thanks
## --------------
## This MOD based on the original Global Announcement Mod by Niels (http://mods.db9.dk).
## At this point a big thanks to Niels for the great Mod!
##
##############################################################
## MOD History:
##
## 2005-01-22 - Version 1.1.1
## For update look into the folder updates.
##
## 2004-12-17 - Version 1.1.0
## For update look into the folder updates.
##
## 2004-12-11 - Version 1.0.0
## - First Release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------------
#
viewforum.php
#
#-----[ FIND ]------------------------------------------------
#
//
// Grab all the basic data (all topics except announcements)
// for this forum
//
#
#-----[ AFTER, ADD ]------------------------------------------------
#
$hidden_gt_forums = array();
if (intval($board_config['hidden_gt_forums']) == 0)
{
$hidden_gt_forums[0] = 0;
}
else
{
$tmp_forums = str_replace(' ', ',', $board_config['hidden_gt_forums']);
$tmp_forums = str_replace(';', ',', $tmp_forums);
$tmp_forums = str_replace(',,', ',', $tmp_forums);
$hidden_gt_forums = explode(',', $tmp_forums);
}
$sql_global_topics = (!in_array($forum_id, $hidden_gt_forums)) ? "(t.forum_id = $forum_id AND t.topic_type <> " . POST_ANNOUNCE . " OR t.topic_type = " . POST_GLOBAL_TOPIC . ")" : "t.forum_id = $forum_id AND t.topic_type <> " . POST_ANNOUNCE . " ";
#
#-----[ FIND ]------------------------------------------------
#
$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_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_type <> " . POST_ANNOUNCE . "
$limit_topics_time
ORDER BY t.topic_type DESC, t.topic_last_post_id DESC
LIMIT $start, ".$board_config['topics_per_page'];
#
#-----[ IN-LINE FIND ]-----------------------------------------
#
WHERE t.forum_id = $forum_id
#
#-----[ IN-LINE REPLACE WITH ]-----------------------------------------
#
WHERE $sql_global_topics
#
#-----[ IN-LINE FIND ]------------------------------------------------
#
AND t.topic_type <> " . POST_ANNOUNCE . "
$limit_topics_time
#
#-----[ IN-LINE REPLACE WITH ]----------------------------------------
#
$limit_topics_time
#
#-----[ IN-LINE FIND ]------------------------------------------------
#
ORDER BY t.topic_type DESC, t.topic_last_post_id DESC
#
#-----[ IN-LINE REPLACE WITH ]----------------------------------------
#
ORDER BY t.topic_type = " . POST_STICKY . ", t.topic_last_post_id DESC
#
#-----[ FIND ]------------------------------------------------
#
'FOLDER_ANNOUNCE_NEW_IMG' => $images['folder_announce_new'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'FOLDER_GLOBAL_TOPIC_IMG' => $images['folder_global_topic'],
'FOLDER_GLOBAL_TOPIC_NEW_IMG' => $images['folder_global_topic_new'],
#
#-----[ FIND ]------------------------------------------------
#
'L_ANNOUNCEMENT' => $lang['Post_Announcement'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_GLOBAL_TOPIC' => $lang['Post_global_topic'],
#
#-----[ FIND ]------------------------------------------------
#
if( $topic_type == POST_ANNOUNCE )
{
$topic_type = $lang['Topic_Announcement'] . ' ';
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
else if( $topic_type == POST_GLOBAL_TOPIC )
{
$topic_type = $lang['Topic_global_topic'] . ' ';
}
#
#-----[ FIND ]------------------------------------------------
#
if( $topic_rowset[$i]['topic_type'] == POST_ANNOUNCE )
{
$folder = $images['folder_announce'];
#
#-----[ AFTER, ADD ]-----------------------------------------
#
else if( $topic_rowset[$i]['topic_type'] == POST_GLOBAL_TOPIC && $topic_rowset[$i]['topic_status'] != TOPIC_LOCKED )
{
$folder = $images['folder_global_topic'];
$folder_new = $images['folder_global_topic_new'];
}
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM
und das hier ?
Code: Alles auswählen
##############################################################
## MOD Title: Global topic
## MOD Author: OXPUS < webmaster@oxpus.de > (Karsten Ude) http://www.oxpus.de
## MOD Description: This mod, makes it possible to post global topics viewable in all forums.
## Part 5: Required part for boards with Split Topic Type Mod (Release 2.0.x)
## MOD Version: 1.1.1
##
## Installation Level: Intermediate
## Installation Time: 2 Minutes
## Files To Edit: 2
## viewforum.php
## includes/functions_topics_list.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:
##
## Special Thanks
## --------------
## This MOD based on the original Global Announcement Mod by Niels (http://mods.db9.dk).
## At this point a big thanks to Niels for the great Mod!
##
##############################################################
## MOD History:
##
## 2005-01-22 - Version 1.1.1
## For update look into the folder updates.
##
## 2004-12-17 - Version 1.1.0
## For update look into the folder updates.
##
## 2004-12-11 - Version 1.0.0
## - First Release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------------
#
viewforum.php
#
#-----[ FIND ]------------------------------------------------
#
//
// Grab all the basic data (all topics except announcements)
// for this forum
//
#
#-----[ AFTER, ADD ]------------------------------------------------
#
$hidden_gt_forums = array();
if (intval($board_config['hidden_gt_forums']) == 0)
{
$hidden_gt_forums[0] = 0;
}
else
{
$tmp_forums = str_replace(' ', ',', $board_config['hidden_gt_forums']);
$tmp_forums = str_replace(';', ',', $tmp_forums);
$tmp_forums = str_replace(',,', ',', $tmp_forums);
$hidden_gt_forums = explode(',', $tmp_forums);
}
$sql_global_topics = (!in_array($forum_id, $hidden_gt_forums)) ? "(t.forum_id = $forum_id AND t.topic_type <> " . POST_ANNOUNCE . " OR t.topic_type = " . POST_GLOBAL_TOPIC . ")" : "t.forum_id = $forum_id AND t.topic_type <> " . POST_ANNOUNCE . " ";
#
#-----[ FIND ]------------------------------------------------
#
$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_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_type <> " . POST_ANNOUNCE . "
$limit_topics_time
ORDER BY t.topic_type DESC, t.topic_last_post_id DESC
LIMIT $start, ".$board_config['topics_per_page'];
#
#-----[ IN-LINE FIND ]-----------------------------------------
#
WHERE t.forum_id = $forum_id
#
#-----[ IN-LINE REPLACE WITH ]-----------------------------------------
#
WHERE $sql_global_topics
#
#-----[ IN-LINE FIND ]------------------------------------------------
#
AND t.topic_type <> " . POST_ANNOUNCE . "
$limit_topics_time
#
#-----[ IN-LINE REPLACE WITH ]----------------------------------------
#
$limit_topics_time
#
#-----[ IN-LINE FIND ]------------------------------------------------
#
ORDER BY t.topic_type DESC, t.topic_last_post_id DESC
#
#-----[ IN-LINE REPLACE WITH ]----------------------------------------
#
ORDER BY t.topic_last_post_id DESC
#
#-----[ FIND ]------------------------------------------------
#
'FOLDER_ANNOUNCE_NEW_IMG' => $images['folder_announce_new'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'FOLDER_GLOBAL_TOPIC_IMG' => $images['folder_global_topic'],
'FOLDER_GLOBAL_TOPIC_NEW_IMG' => $images['folder_global_topic_new'],
#
#-----[ FIND ]------------------------------------------------
#
'L_ANNOUNCEMENT' => $lang['Post_Announcement'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_GLOBAL_TOPIC' => $lang['Post_global_topic'],
#
#-----[ OPEN ]------------------------------------------------
#
includes/functions_topics_list.php
#
#-----[ FIND ]------------------------------------------------
#
else if( $topic_type == POST_STICKY )
{
$topic_type = $lang['Topic_Sticky'] . ' ';
}
#
#-----[ BEFORE, ADD ]------------------------------------------
#
else if( $topic_type == POST_GLOBAL_TOPIC )
{
$topic_type = $lang['Topic_global_topic'] . ' ';
}
#
#-----[ FIND ]------------------------------------------------
#
else if( $topic_rowset[$i]['topic_type'] == POST_STICKY )
{
$folder = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_sticky_own'] : $images['folder_sticky'];
$folder_new = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_sticky_new_own'] : $images['folder_sticky_new'];
}
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
else if( $topic_rowset[$i]['topic_type'] == POST_GLOBAL_TOPIC && $topic_rowset[$i]['topic_status'] != TOPIC_LOCKED )
{
$folder = $images['folder_global_topic'];
$folder_new = $images['folder_global_topic_new'];
}
#
#-----[ FIND ]------------------------------------------------
#
// if no split between global and standard announcement, group them with standard announcement
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
$topic_real_type = ($topic_real_type == POST_GLOBAL_TOPIC) ? POST_NORMAL : $topic_real_type;
#
#-----[ FIND ]------------------------------------------------
#
// get box title
$main_title = $list_title;
$sub_title = $list_title;
#
#-----[ AFTER, ADD ]-----------------------------------------
#
if (!defined('POST_BIRTHDAY')) define('POST_BIRTHDAY', -998);
if (!defined('POST_CALENDAR')) define('POST_CALENDAR', -999);
#
#-----[ FIND ]------------------------------------------------
#
// get the topic icons
$icon = '';
if ($icon_installed)
{
$type = $topic_rowset[$i]['topic_type'];
#
#-----[ AFTER, ADD ]-----------------------------------------
#
$type = ($type == POST_GLOBAL_TOPIC) ? POST_NORMAL : $type;
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM