Unterforen

Du suchst einen bestimmten Mod, weißt aber nicht genau wo bzw. ob er überhaupt existiert? Wenn dir dieser Artikel nicht weiterhilft, kannst du hier den von dir gewünschten/gesuchten Mod beschreiben ...
Falls ein Mod-Autor eine der Anfragen hier aufnimmt um einen neuen Mod zu entwicklen, geht's in phpBB 2.0: Mods in Entwicklung weiter.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Benutzeravatar
FatFreddy
Mitglied
Beiträge: 1937
Registriert: 25.07.2004 15:52
Kontaktdaten:

Beitrag von FatFreddy »

Bonaparte hat geschrieben:habe es gerade lokal installiert,
Welchen der beiden MODs?

FatFreddy
Watch out where the huskies go, don't you eat the yellow snow...
Mehr dazu im Reiseforum InselTalk.de.
Tupperdosensucher schauen ins Geocachingforum.
Benutzeravatar
Bonaparte
Mitglied
Beiträge: 308
Registriert: 07.12.2004 23:24
Wohnort: Hamburg
Kontaktdaten:

Beitrag von Bonaparte »

pseudo sub-forums MOD 1.0.6 ist gerade installiert

und wo finde ich das simplesubforums-MOD
Benutzeravatar
FatFreddy
Mitglied
Beiträge: 1937
Registriert: 25.07.2004 15:52
Kontaktdaten:

Beitrag von FatFreddy »

Bonaparte hat geschrieben: pseudo sub-forums MOD 1.0.6 ist gerade installiert
Die Einstellungen sollten im ACP unter Forum Einstellungen -> bearbeiten möglich sein.
Unterhalb des Auswahlfeldes für die Kategorie sollte ein neues Feld zu sehen sein. (lt. Einbauanleitung, Datei: forum_edit_body.tpl)
Bonaparte hat geschrieben: und wo finde ich das simplesubforums-MOD
*LINK*

FatFreddy
Watch out where the huskies go, don't you eat the yellow snow...
Mehr dazu im Reiseforum InselTalk.de.
Tupperdosensucher schauen ins Geocachingforum.
Benutzeravatar
Bonaparte
Mitglied
Beiträge: 308
Registriert: 07.12.2004 23:24
Wohnort: Hamburg
Kontaktdaten:

Beitrag von Bonaparte »

wollte mir etwas zeit ersparren und hab es mit dem easymod installiert, anscheinend, ist es doch nicht kompatibel. bleibt wohl nichts anderes übrig, als es manuel zu installieren.
Jorsch
Mitglied
Beiträge: 8
Registriert: 15.12.2005 13:37

Hallo

Beitrag von Jorsch »

Hallo zusammen.

Ich hab ne Frage zum SimpleSubForums Mod.

Muss ich für jedes installierte Template so vorgehen wie in der readme für subSilver beschrieben?

Funktioniert dieser MOD mit allen Templates???

Danke schon mal...

Gruß
Jorsch
Benutzeravatar
FatFreddy
Mitglied
Beiträge: 1937
Registriert: 25.07.2004 15:52
Kontaktdaten:

Re: Hallo

Beitrag von FatFreddy »

Jorsch hat geschrieben: Muss ich für jedes installierte Template so vorgehen wie in der readme für subSilver beschrieben?
Wenn Du die Subforen auch dort nutzen möchtest, ja. ;)

Jorsch hat geschrieben:Funktioniert dieser MOD mit allen Templates???
Vermutlich ja. Eventuell wirst Du beim Einbau auf Hindernisse stoßen, weil die zu suchenden Stellen in den Templatedateien nicht zu finden sind. Dann mußt Du basteln.

FatFreddy
Watch out where the huskies go, don't you eat the yellow snow...
Mehr dazu im Reiseforum InselTalk.de.
Tupperdosensucher schauen ins Geocachingforum.
Jorsch
Mitglied
Beiträge: 8
Registriert: 15.12.2005 13:37

Beitrag von Jorsch »

Alles klar danke...

Eine Frage noch:

Wie sieht es mit dem updaten von phpBB aus,
funktioniert das updaten nach der modifikation immer noch?

P.S.
In der nächsten Version sollen Subforen ja integriert sein.
Ich weiß das keine Releasetermine bekannt gegeben werden, aber weiß man ob es vor der WM soweit sein könnte???
Benutzeravatar
Bonaparte
Mitglied
Beiträge: 308
Registriert: 07.12.2004 23:24
Wohnort: Hamburg
Kontaktdaten:

Beitrag von Bonaparte »

In der nächsten Version sollen Subforen ja integriert sein.
Ich weiß das keine Releasetermine bekannt gegeben werden, aber weiß man ob es vor der WM soweit sein könnte???
Wo kann man darüber was lesen? Vllt kann sich das Team dazu äußern? Dann könnte man sich die doppelte Arbeit sparen.

btw. habe jetzt manuell installiert, scheint gut zu funktionieren. die Frage ist nun was passiert, wenn ich den schritt für index.php und index_body.tpl komplett weg lasse, habe es nachhinein gemerkt, dass es der "last post on index" mod ist. oder doch nicht?
Jorsch
Mitglied
Beiträge: 8
Registriert: 15.12.2005 13:37

Beitrag von Jorsch »

@Bonaparte
Hallo
Ich meine damit, ab Version 2.1.x (denk ich, korrigiert mich wenn nicht)

Auch schon zu bestaunen in der Area51
http://area51.phpbb.com/phpBB/
eu_fahrschulcenter
Mitglied
Beiträge: 9
Registriert: 15.11.2005 16:21
Wohnort: Frankfurt am Main
Kontaktdaten:

Fehler

Beitrag von eu_fahrschulcenter »

Hallo Leuts,

Ich bekomme folgenden fehler:

Parse error: parse error in /index.php on line 664

So sieht meine index.php aus, hoffe ihr könnt mir helfen!?!?

<?php
/***************************************************************************
* index.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: index.php,v 1.99.2.3 2004/07/11 16:46:15 acydburn Exp $
*
*
***************************************************************************/

/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

$viewcat = ( !empty($HTTP_GET_VARS[POST_CAT_URL]) ) ? $HTTP_GET_VARS[POST_CAT_URL] : -1;

if( isset($HTTP_GET_VARS['mark']) || isset($HTTP_POST_VARS['mark']) )
{
$mark_read = ( isset($HTTP_POST_VARS['mark']) ) ? $HTTP_POST_VARS['mark'] : $HTTP_GET_VARS['mark'];
}
else
{
$mark_read = '';
}

//
// Handle marking posts
//
if( $mark_read == 'forums' )
{
if( $userdata['session_logged_in'] )
{
setcookie($board_config['cookie_name'] . '_f_all', time(), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
}

$template->assign_vars(array(
"META" => '<meta http-equiv="refresh" content="3;url=' .append_sid("index.$phpEx") . '">')
);

$message = $lang['Forums_marked_read'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a> ');

message_die(GENERAL_MESSAGE, $message);
}
//
// End handle marking posts
//

$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t"]) : array();
$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f"]) : array();

//
// If you don't use these stats on your index you may want to consider
// removing them
//
$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');
$newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];
$newest_uid = $newest_userdata['user_id'];

if( $total_posts == 0 )
{
$l_total_post_s = $lang['Posted_articles_zero_total'];
}
else if( $total_posts == 1 )
{
$l_total_post_s = $lang['Posted_article_total'];
}
else
{
$l_total_post_s = $lang['Posted_articles_total'];
}

if( $total_users == 0 )
{
$l_total_user_s = $lang['Registered_users_zero_total'];
}
else if( $total_users == 1 )
{
$l_total_user_s = $lang['Registered_user_total'];
}
else
{
$l_total_user_s = $lang['Registered_users_total'];
}


//
// Start page proper
//
$sql = "SELECT c.cat_id, c.cat_title, c.cat_order
FROM " . CATEGORIES_TABLE . " c
ORDER BY c.cat_order";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql);
}

$category_rows = array();
while( $category_rows[] = $db->sql_fetchrow($result) );
$db->sql_freeresult($result);

// Begin Simple Subforums MOD
$subforums_list = array();
// End Simple Subforums MOD

if( ( $total_categories = count($category_rows) ) )
{
//
// Define appropriate SQL
//
switch(SQL_LAYER)
{
case 'postgresql':
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE p.post_id = f.forum_last_post_id
AND u.user_id = p.poster_id
UNION (
SELECT f.*, NULL, NULL, NULL, NULL
FROM " . FORUMS_TABLE . " f
WHERE NOT EXISTS (
SELECT p.post_time
FROM " . POSTS_TABLE . " p
WHERE p.post_id = f.forum_last_post_id
)
)
ORDER BY cat_id, forum_order";
break;

case 'oracle':
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE p.post_id = f.forum_last_post_id(+)
AND u.user_id = p.poster_id(+)
ORDER BY f.cat_id, f.forum_order";
break;

default:
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
FROM (( " . FORUMS_TABLE . " f
LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )
LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id )
ORDER BY f.cat_id, f.forum_order";
break;
}
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);
}

$forum_data = array();
while( $row = $db->sql_fetchrow($result) )
{
$forum_data[] = $row;
}
$db->sql_freeresult($result);

if ( !($total_forums = count($forum_data)) )
{
message_die(GENERAL_MESSAGE, $lang['No_forums']);
}

//
// Obtain a list of topic ids which contain
// posts made since user last visited
//
if ( $userdata['session_logged_in'] )
{
$sql = "SELECT t.forum_id, t.topic_id, p.post_time
FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p
WHERE p.post_id = t.topic_last_post_id
AND p.post_time > " . $userdata['user_lastvisit'] . "
AND t.topic_moved_id = 0";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query new topic information', '', __LINE__, __FILE__, $sql);
}

$new_topic_data = array();
while( $topic_data = $db->sql_fetchrow($result) )
{
$new_topic_data[$topic_data['forum_id']][$topic_data['topic_id']] = $topic_data['post_time'];
}
$db->sql_freeresult($result);
}

//
// Obtain list of moderators of each forum
// First users, then groups ... broken into two queries
//
$sql = "SELECT aa.forum_id, u.user_id, u.username
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g, " . USERS_TABLE . " u
WHERE aa.auth_mod = " . TRUE . "
AND g.group_single_user = 1
AND ug.group_id = aa.group_id
AND g.group_id = aa.group_id
AND u.user_id = ug.user_id
GROUP BY u.user_id, u.username, aa.forum_id
ORDER BY aa.forum_id, u.user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
}

$forum_moderators = array();
while( $row = $db->sql_fetchrow($result) )
{
if ( $userdata['session_logged_in'] ) {
$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '">' . $row['username'] . '</a>';
} else {
$forum_moderators[$row['forum_id']][] = $row['username'];
}
}
$db->sql_freeresult($result);

$sql = "SELECT aa.forum_id, g.group_id, g.group_name
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g
WHERE aa.auth_mod = " . TRUE . "
AND g.group_single_user = 0
AND g.group_type <> " . GROUP_HIDDEN . "
AND ug.group_id = aa.group_id
AND g.group_id = aa.group_id
GROUP BY g.group_id, g.group_name, aa.forum_id
ORDER BY aa.forum_id, g.group_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
}

while( $row = $db->sql_fetchrow($result) )
{
if ( $userdata['session_logged_in'] ) {
$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=" . $row['group_id']) . '">' . $row['group_name'] . '</a>';
} else {
$forum_moderators[$row['forum_id']][] = $row['group_name'];
}
}
$db->sql_freeresult($result);

//
// Find which forums are visible for this user
//
$is_auth_ary = array();
$is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data);

//
// Start output of page
//
define('SHOW_ONLINE', true);
$page_title = $lang['Index'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

$template->set_filenames(array(
'body' => 'index_body.tpl')
);

if ( $userdata['session_logged_in'] ) {
$NEWEST_USER=sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>');
} else {
$NEWEST_USER=sprintf($lang['Newest_user'], '', $newest_user,'');
}

$template->assign_vars(array(
'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
'NEWEST_USER' => $NEWEST_USER,

'FORUM_IMG' => $images['forum'],
'FORUM_NEW_IMG' => $images['forum_new'],
'FORUM_LOCKED_IMG' => $images['forum_locked'],

'L_FORUM' => $lang['Forum'],
// Begin Simple Subforums MOD
'L_SUBFORUMS' => $lang['Subforums'],
// End Simple Subforums MOD
'L_TOPICS' => $lang['Topics'],
'L_REPLIES' => $lang['Replies'],
'L_VIEWS' => $lang['Views'],
'L_POSTS' => $lang['Posts'],
'L_LASTPOST' => $lang['Last_Post'],
'L_NO_NEW_POSTS' => $lang['No_new_posts'],
'L_NEW_POSTS' => $lang['New_posts'],
'L_NO_NEW_POSTS_LOCKED' => $lang['No_new_posts_locked'],
'L_NEW_POSTS_LOCKED' => $lang['New_posts_locked'],
'L_ONLINE_EXPLAIN' => $lang['Online_explain'],

'L_MODERATOR' => $lang['Moderators'],
'L_FORUM_LOCKED' => $lang['Forum_is_locked'],
'L_MARK_FORUMS_READ' => $lang['Mark_all_forums'],

'U_MARK_READ' => append_sid("index.$phpEx?mark=forums"))
);

//
// Okay, let's build the index
//
for($i = 0; $i < $total_categories; $i++)
{
$cat_id = $category_rows[$i]['cat_id'];

//
// Should we display this category/forum set?
//
$display_forums = false;
for($j = 0; $j < $total_forums; $j++)
{
if ( $is_auth_ary[$forum_data[$j]['forum_id']]['auth_view'] && $forum_data[$j]['cat_id'] == $cat_id )
{
$display_forums = true;
}
}

//
// Yes, we should, so first dump out the category
// title, then, if appropriate the forum list
//
if ( $display_forums )
{
$template->assign_block_vars('catrow', array(
'CAT_ID' => $cat_id,
'CAT_DESC' => $category_rows[$i]['cat_title'],
'U_VIEWCAT' => append_sid("index.$phpEx?" . POST_CAT_URL . "=$cat_id"))
);

if ( $viewcat == $cat_id || $viewcat == -1 )
{
for($j = 0; $j < $total_forums; $j++)
{
if ( $forum_data[$j]['cat_id'] == $cat_id )
{
$forum_id = $forum_data[$j]['forum_id'];

if ( $is_auth_ary[$forum_id]['auth_view'] )
{
if ( $forum_data[$j]['forum_status'] == FORUM_LOCKED )
{
$folder_image = $images['forum_locked'];
$folder_alt = $lang['Forum_locked'];

// Begin Simple Subforums MOD
$unread_topics = false;
$folder_images = array(
'default' => $folder_image,
'new' => $images['forum_locked'],
'sub' => ( isset($images['forums_locked']) ) ? $images['forums_locked'] : $images['forum_locked'],
'subnew' => ( isset($images['forums_locked']) ) ? $images['forums_locked'] : $images['forum_locked'],
'subalt' => $lang['Forum_locked'],
'subaltnew' => $lang['Forum_locked'],
);
// End Simple Subforums MOD
}
else
{
$unread_topics = false;
if ( $userdata['session_logged_in'] )
{
if ( !empty($new_topic_data[$forum_id]) )
{
$forum_last_post_time = 0;

while( list($check_topic_id, $check_post_time) = @each($new_topic_data[$forum_id]) )
{
if ( empty($tracking_topics[$check_topic_id]) )
{
$unread_topics = true;
$forum_last_post_time = max($check_post_time, $forum_last_post_time);

}
else
{
if ( $tracking_topics[$check_topic_id] < $check_post_time )
{
$unread_topics = true;
$forum_last_post_time = max($check_post_time, $forum_last_post_time);
}
}
}

if ( !empty($tracking_forums[$forum_id]) )
{
if ( $tracking_forums[$forum_id] > $forum_last_post_time )
{
$unread_topics = false;
}
}

if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
{
if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time )
{
$unread_topics = false;
}
}

}
}

$folder_image = ( $unread_topics ) ? $images['forum_new'] : $images['forum'];
$folder_alt = ( $unread_topics ) ? $lang['New_posts'] : $lang['No_new_posts'];
// Begin Simple Subforums MOD
$folder_images = array(
'default' => $folder_image,
'new' => $images['forum_new'],
'sub' => ( isset($images['forums']) ) ? $images['forums'] : $images['forum'],
'subnew' => ( isset($images['forums_new']) ) ? $images['forums_new'] : $images['forum_new'],
'subalt' => $lang['No_new_posts'],
'subaltnew' => $lang['New_posts'],
);
// End Simple Subforums MOD
}

$posts = $forum_data[$j]['forum_posts'];
$topics = $forum_data[$j]['forum_topics'];

if ( $forum_data[$j]['forum_last_post_id'] )
{
$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);

$last_post = $last_post_time . '<br />';


if ( $userdata['session_logged_in'] ) {
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';
} else {
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : $forum_data[$j]['username'];
}


$last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';
// Begin Simple Subforums MOD
$last_post_sub = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . ($unread_topics ? $images['icon_newest_reply'] : $images['icon_latest_reply']) . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';
$last_post_time = $forum_data[$j]['post_time'];
// End Simple Subforums MOD
}
else
{
$last_post = $lang['No_Posts'];

// Begin Simple Subforums MOD
$last_post_sub = '<img src="' . $images['icon_minipost'] . '" border="0" alt="' . $lang['No_Posts'] . '" title="' . $lang['No_Posts'] . '" />';
$last_post_time = 0;
// End Simple Subforums MOD
}

if ( count($forum_moderators[$forum_id]) > 0 )
{
$l_moderators = ( count($forum_moderators[$forum_id]) == 1 ) ? $lang['Moderator'] : $lang['Moderators'];
$moderator_list = implode(', ', $forum_moderators[$forum_id]);
}
else
{
$l_moderators = '&nbsp;';
$moderator_list = '';
}

$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

$template->assign_block_vars('catrow.forumrow', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'FORUM_FOLDER_IMG' => $folder_image,
'FORUM_NAME' => $forum_data[$j]['forum_name'],
'FORUM_DESC' => $forum_data[$j]['forum_desc'],
'POSTS' => $forum_data[$j]['forum_posts'],
'TOPICS' => $forum_data[$j]['forum_topics'],
'LAST_POST' => $last_post,
'MODERATORS' => $moderator_list,

'L_MODERATOR' => $l_moderators,
'L_FORUM_FOLDER_ALT' => $folder_alt,
// Begin Simple Subforums MOD
'FORUM_FOLDERS' => serialize($folder_images),
'HAS_SUBFORUMS' => 0,
'PARENT' => $forum_data[$j]['forum_parent'],
'ID' => $forum_data[$j]['forum_id'],
'UNREAD' => intval($unread_topics),
'TOTAL_UNREAD' => intval($unread_topics),
'TOTAL_POSTS' => $forum_data[$j]['forum_posts'],
'TOTAL_TOPICS' => $forum_data[$j]['forum_topics'],
'LAST_POST_FORUM' => $last_post,
'LAST_POST_TIME' => $last_post_time,
'LAST_POST_TIME_FORUM' => $last_post_time,
// End Simple Subforums MOD

'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))
);
// Begin Simple Subforums MOD
if( $forum_data[$j]['forum_parent'] )
{
$subforums_list[] = array(
'forum_data' => $forum_data[$j],
'folder_image' => $folder_image,
'last_post' => $last_post,
'last_post_sub' => $last_post_sub,
'moderator_list' => $moderator_list,
'unread_topics' => $unread_topics,
'l_moderators' => $l_moderators,
'folder_alt' => $folder_alt,
'last_post_time' => $last_post_time,
'desc' => $forum_data[$j]['forum_desc'],
);
}
// End Simple Subforums MOD
}
}
}
}
}
} // for ... categories

}// if ... total_categories
else
{
message_die(GENERAL_MESSAGE, $lang['No_forums']);
}

// Begin Simple Subforums MOD
unset($data);
unset($item);
unset($cat_item);
unset($row_item);
for( $i = 0; $i < count($subforums_list); $i++ )
{
$forum_data = $subforums_list[$i]['forum_data'];
$parent_id = $forum_data['forum_parent'];

// Find parent item
if( isset($template->_tpldata['catrow.']) )
{
$data = &$template->_tpldata['catrow.'];
$count = count($data);
for( $j = 0; $j < $count; $j++)
{
$cat_item = &$data[$j];
$row_item = &$cat_item['forumrow.'];
$count2 = count($row_item);
for( $k = 0; $k < $count2; $k++)
{
if( $row_item[$k]['ID'] == $parent_id )
{
$item = &$row_item[$k];
break;
}
}
if( isset($item) )
{
break;
}
}
}

if( isset($item) )
{
if( isset($item['sub.']) )
{
$num = count($item['sub.']);
$data = &$item['sub.'];
}
else
{
$num = 0;
$item[] = 'sub.';
$data = &$item['sub.'];
}

// Append new entry
$data[] = array(
'NUM' => $num,
'FORUM_FOLDER_IMG' => $subforums_list[$i]['folder_image'],
'FORUM_NAME' => $forum_data['forum_name'],
'FORUM_DESC' => $forum_data['forum_desc'],
'FORUM_DESC_HTML' => htmlspecialchars(preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $forum_data['forum_desc'])),
'POSTS' => $forum_data['forum_posts'],
'TOPICS' => $forum_data['forum_topics'],
'LAST_POST' => $subforums_list[$i]['last_post'],
'LAST_POST_SUB' => $subforums_list[$i]['last_post_sub'],
'LAST_TOPIC' => $forum_data['topic_title'],
'MODERATORS' => $subforums_list[$i]['moderator_list'],
'PARENT' => $forum_data['forum_parent'],
'ID' => $forum_data['forum_id'],
'UNREAD' => intval($subforums_list[$i]['unread_topics']),

'L_MODERATOR' => $subforums_list[$i]['l_moderators'],
'L_FORUM_FOLDER_ALT' => $subforums_list[$i]['folder_alt'],

'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . '=' . $forum_data['forum_id'])
);
$item['HAS_SUBFORUMS'] ++;
$item['TOTAL_UNREAD'] += intval($subforums_list[$i]['unread_topics']);
// Change folder image
$images = unserialize($item['FORUM_FOLDERS']);
$item['FORUM_FOLDER_IMG'] = $item['TOTAL_UNREAD'] ? $images['subnew'] : $images['sub'];
$item['L_FORUM_FOLDER_ALT'] = $item['TOTAL_UNREAD'] ? $images['subaltnew'] : $images['subalt'];
// Check last post
if( $item['LAST_POST_TIME'] < $subforums_list[$i]['last_post_time'] )
{
$item['LAST_POST'] = $subforums_list[$i]['last_post'];
$item['LAST_POST_TIME'] = $subforums_list[$i]['last_post_time'];
}
if( !$item['LAST_POST_TIME_FORUM'] )
{
$item['LAST_POST_FORUM'] = $item['LAST_POST'];
}
// Add topics/posts
$item['TOTAL_POSTS'] += $forum_data['forum_posts'];
$item['TOTAL_TOPICS'] += $forum_data['forum_topics'];
}
unset($item);
unset($data);
unset($cat_item);
unset($row_item);

//
// Generate the page
//
$template->pparse('body');

$result=mysql_query("SELECT topic_id, topic_title FROM " . TOPICS_TABLE . " ORDER BY topic_id DESC LIMIT 0,50");
?>
<br>
<div style="color:#688CA3;border:1px solid #CDCDCD;font-family:verdana;font-size:10px;padding:5px;text-align:left;margin-left:27%;margin-right:27%;background-color:#EDEDED;height:100px;overflow:auto;">
Die neuesten Themen: <br>
<?
$url_search = array( 'Ö', 'Ä', 'Ü', 'ö', 'ä', 'à', 'é', 'è', 'ü', ' ', ".", "'", '#', '&', '/','ß','@','?','!');
$url_replace = array( 'Oe', 'Ae', 'Ue', 'oe', 'ae', 'a', 'e', 'e', 'ue', '-', "-", "-", '-', '-und-', '-','ss', '-at-','','');
while ($line=mysql_fetch_array($result)) {
$url="";
$url = urlencode(str_replace($url_search, $url_replace, $line['topic_title']));
?>
<a href="<?=$url?>-t<?=$line[topic_id]?>.html" style="text-decoration:none;font-family:verdana;font-size:10px;"><?=$line[topic_title]?></a><br>
<?
}
?>
</div>

<?

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
Wer seinen Führerschein verliert geht hier hin:
http://www.fuehrerschein-mpu-forum.de
http://www.eu-fahrschulcenter.de
Antworten

Zurück zu „phpBB 2.0: Mod Suche/Anfragen“