Hypercell Class 1.0.7

Allgemeiner Support zum phpBB 2 Board und phpBB 2 Modifikationen
Forumsregeln
Auch wenn hier der Support für phpBB 2 weiterhin aufrecht erhalten bleibt, weisen wir darauf hin, dass das phpBB 2 nicht mehr offiziell unterstützt und weiterentwickelt wird!
Antworten
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Hypercell Class 1.0.7

Beitrag von oxpus »

Dieses Snippet mach den MOD kompatibel zum CH MOD 2.0.5 RC2 und damit zum phpBB2 Plus 1.5.3:

Code: Alles auswählen

# 
#-----[ OPEN ]------------------------------------------------ 
#
# // Instead index.php
#
includes/functions_categories_hierarchy.php

#
#-----[ FIND ]------------------------------------------------
#
<?php

#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : hypercell class -----------------------------------------------------

# 
#-----[ FIND ]------------------------------------------------ 
#
			if ($data['tree.locked'])
			{
				$folder_image	= $i_locked;
				$folder_alt		= $a_locked;
				
# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
//-- mod : hypercell class -----------------------------------------------------
//-- add
				$hypercell_class = 'hccRow-lock';
//-- fin mod : hypercell class -------------------------------------------------

# 
#-----[ FIND ]------------------------------------------------ 
#
			$template->assign_block_vars('catrow.forumrow',	array(
				'FORUM_FOLDER_IMG'		=> $folder_image, 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
//-- mod : hypercell class -----------------------------------------------------
//-- add
				'HYPERCELL_CLASS' => $hypercell_class,
				'HYPERCELL_ONCLICK' => ( $board_config['hypercell_onclick'] ) ? ' onclick="window.location.href=\'' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '\';"' : '',
				'HYPERCELL_LAST_ONCLICK' => ( $board_config['hypercell_onclick'] && $forum_data[$j]['forum_last_post_id'] ) ? ' onclick="window.location.href=\'' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '\';"' : '',
//-- fin mod : hypercell class -------------------------------------------------

#
#-----[ OPEN ]------------------------------------------------ 
#
# // Instead templates/subSilver/index_body.tpl
#
templates/subSilver/index_box.tpl

#
#-----[ FIND ]------------------------------------------------ 
#
	<td class="row1" width="100%" colspan="{catrow.forumrow.INC_SPAN}" valign="top">

#
#-----[ IN-LINE FIND ]---------------------------------------- 
#
row1"

# 
#-----[ IN-LINE REPLACE WITH ]-------------------------------- 
#
{catrow.forumrow.HYPERCELL_CLASS}"{catrow.forumrow.HYPERCELL_ONCLICK}

#
#-----[ FIND ]------------------------------------------------ 
#
	<td class="row2" align="center" valign="middle" width="200" nowrap="nowrap"><span class="gensmall">{catrow.forumrow.LAST_POST}</span></td>

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
#
row2"

# 
#-----[ IN-LINE REPLACE WITH ]-------------------------------- 
#
{catrow.forumrow.HYPERCELL_CLASS}-right"{catrow.forumrow.HYPERCELL_LAST_ONCLICK}

# 
#-----[ SAVE/CLOSE ALL FILES ]-------------------------------- 
#
# EoM
Der zweite Teil ist für den Split Topic Type MOD 2.0.1, der ebenfalls im phpBB2 Plus 1.5.3 verbaut ist:

Code: Alles auswählen

#
#-----[ OPEN ]------------------------------------------------ 
#
# // Instead viewforum.php
#
includes/functions_topics_list.php

#
#-----[ FIND ]------------------------------------------------
#
<?php

#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : hypercell class -----------------------------------------------------

#
#-----[ FIND ]------------------------------------------------ 
#
			$folder_alt = $lang['Topics_Moved'];
			
#
#-----[ BEFORE, ADD ]----------------------------------------- 
#
//-- mod : hypercell class -----------------------------------------------------
//-- add
			$hypercell_class = 'hccRow';
//-- fin mod : hypercell class -------------------------------------------------

# 
#-----[ FIND ]------------------------------------------------ 
#
			else if( $topic_rowset[$i]['topic_type'] == POST_ANNOUNCE )
			{
				$folder = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_announce_own'] : $images['folder_announce'];
				$folder_new = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_announce_new_own'] : $images['folder_announce_new'];

#
#-----[ AFTER, ADD ]------------------------------------------ 
#
//-- mod : hypercell class -----------------------------------------------------
//-- add
				$hypercell = 'hccRow-announce';
				$hypercell_new = 'hccRow-new-announce';
//-- fin mod : hypercell class -------------------------------------------------

# 
#-----[ 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'];

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
//-- mod : hypercell class -----------------------------------------------------
//-- add
				$hypercell = 'hccRow-sticky';
				$hypercell_new = 'hccRow-new-sticky';
//-- fin mod : hypercell class -------------------------------------------------

# 
#-----[ FIND ]------------------------------------------------ 
#
			else if( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED )
			{
				$folder = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_locked_own'] : $images['folder_locked'];
				$folder_new = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_locked_new_own'] : $images['folder_locked_new'];

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
//-- mod : hypercell class -----------------------------------------------------
//-- add
				$hypercell = 'hccRow-lock';
				$hypercell_new = 'hccRow-lock';
//-- fin mod : hypercell class -------------------------------------------------

# 
#-----[ FIND ]------------------------------------------------ 
#
				if($replies >= $board_config['hot_threshold'])
				{
					$folder = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_hot_own'] : $images['folder_hot'];
					$folder_new = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_hot_new_own'] : $images['folder_hot_new'];

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
//-- mod : hypercell class -----------------------------------------------------
//-- add
					$hypercell = 'hccRow-hot';
					$hypercell_new = 'hccRow-new-hot';
//-- fin mod : hypercell class -------------------------------------------------

# 
#-----[ FIND ]------------------------------------------------ 
#
					$folder = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_own'] : $images['folder'];
					$folder_new = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_new_own'] : $images['folder_new'];

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
//-- mod : hypercell class -----------------------------------------------------
//-- add
					$hypercell = 'hccRow';
					$hypercell_new = 'hccRow-new';
//-- fin mod : hypercell class -------------------------------------------------

# 
#-----[ FIND ]------------------------------------------------ 
#
						if ( $unread_topics )
						{
							$folder_image = $folder_new;
							$folder_alt = $lang['New_posts'];

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
//-- mod : hypercell class -----------------------------------------------------
//-- add
							$hypercell_class = $hypercell_new;
//-- fin mod : hypercell class -------------------------------------------------

#
#-----[ FIND ]------------------------------------------------ 
#
						else
						{
							$folder_image = $folder;
							$folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
//-- mod : hypercell class -----------------------------------------------------
//-- add
							$hypercell_class = $hypercell;
//-- fin mod : hypercell class -------------------------------------------------

# 
#-----[ FIND ]------------------------------------------------ 
#
					else
					{
						$folder_image = $folder_new;
						$folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['New_posts'];

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
//-- mod : hypercell class -----------------------------------------------------
//-- add
						$hypercell_class = $hypercell_new;
//-- fin mod : hypercell class -------------------------------------------------

# 
#-----[ FIND ]------------------------------------------------ 
#
				else 
				{
					$folder_image = $folder;
					$folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
//-- mod : hypercell class -----------------------------------------------------
//-- add
					$hypercell_class = $hypercell;
//-- fin mod : hypercell class -------------------------------------------------

# 
#-----[ FIND ]------------------------------------------------ 
#
			else
			{
				$folder_image = $folder;
				$folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
//-- mod : hypercell class -----------------------------------------------------
//-- add
				$hypercell_class = $hypercell;
//-- fin mod : hypercell class -------------------------------------------------

# 
#-----[ FIND ]------------------------------------------------ 
#
		$template->assign_block_vars( $tpl . '.row', array(
			'ROW_CLASS'			=> ($color || !defined('TOPIC_ALTERNATE_ROW_CLASS')) ? 'row1' : 'row2',
			'ROW_FOLDER_CLASS'		=> ($user_replied && defined('USER_REPLIED_CLASS')) ? USER_REPLIED_CLASS : ( ($color || !defined('TOPIC_ALTERNATE_ROW_CLASS')) ? 'row1' : 'row2' ),

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
//-- mod : hypercell class -----------------------------------------------------
//-- add
			'HYPERCELL_CLASS' => $hypercell_class,
			'HYPERCELL_ONCLICK' => ( $board_config['hypercell_onclick'] ) ? ' onclick="window.location.href=\'' . $view_topic_url . '\';"' : '',
			'HYPERCELL_LAST_ONCLICK' => ( $board_config['hypercell_onclick'] ) ? ' onclick="window.location.href=\'' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $topic_rowset[$i]['topic_last_post_id']) . '#' . $topic_rowset[$i]['topic_last_post_id'] . '\';"' : '',
//-- fin mod : hypercell class -------------------------------------------------

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

#
#-----[ FIND ]------------------------------------------------ 
#
	<!-- END icon -->
	<td class="row1" width="100%">

#
#-----[ IN-LINE FIND ]---------------------------------------- 
#
row1"

#
#-----[ IN-LINE REPLACE WITH ]-------------------------------- 
#
{topicrow.HYPERCELL_CLASS}"{topicrow.HYPERCELL_ONCLICK}

#
#-----[ FIND ]------------------------------------------------ 
#
	<td class="row3Right" align="center" valign="middle" nowrap="nowrap"><span class="postdetails">{topics_list_box.row.LAST_POST_TIME}<br />{topics_list_box.row.LAST_POST_AUTHOR} {topics_list_box.row.LAST_POST_IMG}</span></td>

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
#
row3Right"

# 
#-----[ IN-LINE REPLACE WITH ]-------------------------------- 
#
{topicrow.HYPERCELL_CLASS}-right"{topicrow.HYPERCELL_LAST_ONCLICK}


# 
#-----[ SAVE/CLOSE ALl FILES ]-------------------------------- 
#
# EoM
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Antworten