Seite 2 von 2

Verfasst: 23.06.2005 14:04
von FiRE2k
Uff ja

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
müsste ich das rückgängig machen?

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

Verfasst: 23.06.2005 14:11
von Markus67
Hi ...

das ist schon klar ... ich wollte nur wissen ob du in der viewtopic noch andere MOD ausser den beiden verbaut hast ?

Markus

Verfasst: 24.06.2005 12:57
von FiRE2k
Es bezieht sich doch auf die viewforum.php oder irre ich da?

Mal ne Frage nebenbei:

Ist es eigentlich möglich ein Backup zu machen, das ganze neu zu installieren, also phpbb und die MODS dann einzeln einzubauen?

Geht das, ohne dass da User, Antworten oder Threads verloren gehen?

Verfasst: 24.06.2005 13:26
von Markus67
Hi ...

Soweit würde ich jetzt nicht gehen und gleich alles neu machen ...
Im Moment hast du das Problem ja nur in der viewforum.php
Ich würde folgendermaßen vorgehen:
- nimm dir eine Original viewforum.php
- bau den Global Topic MOD ein
- dann baust du den Split Topic MOD ein ... aber achte darauf dass du auch die richtige Anleitung erwischst ...

Dann sollte das ganze funktionieren :wink:

Markus