Categories hierarchy

Hulp nodig bij een modificaties of op zoek naar een MOD? Bekijk ons archief. Support wordt helaas niet meer verleend.
Forumregels

Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
phpBB2.0.x
Gesloten
Kielse Rat
Berichten: 277
Lid geworden op: 08 jul 2005, 09:03

Categories hierarchy

Bericht door Kielse Rat » 20 aug 2005, 14:56

Ik heb deze lange mod geinstalleerd maar als ik naar mijn forum ga, krijg ik altijd deze melding:


Parse error: parse error, unexpected T_ELSE in /home/jalled/www/phpBB2/index.php on line 103



Dit is mijn bestandje index.php:

Code: Selecteer alles

<?php
//-- mod : categories hierarchy --------------------------------------------------------------------
/***************************************************************************
 *                                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
//

// Bookie Mod
if ( $userdata['user_level'] == ADMIN ) 
{
include_once($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_bookmakers.' . $phpEx);
$time_now = time();
$total_bets = 0;
$count_assigned = 0;
$sql = "SELECT * FROM " . BOOKIE_ADMIN_BETS_TABLE . " WHERE bet_time<'$time_now' AND checked=0 ";

if ( !($result = $db->sql_query($sql)) ) 
{ 
   message_die(GENERAL_ERROR, 'Error getting total for Bookie Mod', '', __LINE__, __FILE__, $sql); 
}
 while ( $row = $db->sql_fetchrow($result) ) 
	{ 
	$total_bets = $total_bets +1;
	}
	if ( $total_bets > 0 )
	{
	$bookie_image = '<img src="' . $images['folder_hot_new'] . '" alt="New" title="New" hspace="3" border="0" />';
	$template->assign_block_vars('bookie_bets_due', array());
	}
	}

// End Bookie Mod

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

//-- mod : categories hierarchy --------------------------------------------------------------------
//-- add
$viewcat = intval($viewcat);
if ($viewcat <= 0) $viewcat = -1;
$viewcatkey = ($viewcat < 0) ? 'Root' : POST_CAT_URL . $viewcat;
//-- fin mod : categories hierarchy ----------------------------------------------------------------

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' )
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- add
	if ( $viewcat < 0 )
	{
//-- fin mod : categories hierarchy ----------------------------------------------------------------
{
	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") . '">')
	);
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- add
	}
	else
	{
		if( $userdata['session_logged_in'] )
		{
			// get the list of object authorized
			$keys = array();
			$keys = get_auth_keys($viewcatkey);

			// mark each forums
			for ($i=0; $i < count($keys['id']); $i++) if ($tree['type'][ $keys['idx'][$i] ] == POST_FORUM_URL)
			{
				$forum_id = $tree['id'][ $keys['idx'][$i] ];
				$sql = "SELECT MAX(post_time) AS last_post FROM " . POSTS_TABLE . " WHERE forum_id = $forum_id";
				if ( !($result = $db->sql_query($sql)) ) message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql);
				if ( $row = $db->sql_fetchrow($result) )
				{
					$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) : array();
					$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : array();

					if ( ( count($tracking_forums) + count($tracking_topics) ) >= 150 && empty($tracking_forums[$forum_id]) )
					{
						asort($tracking_forums);
						unset($tracking_forums[key($tracking_forums)]);
					}

					if ( $row['last_post'] > $userdata['user_lastvisit'] )
					{
						$tracking_forums[$forum_id] = time();
						setcookie($board_config['cookie_name'] . '_f', serialize($tracking_forums), 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?" . POST_CAT_URL . "=$viewcat") . '">')
		);
	}
//-- fin mod : categories hierarchy ----------------------------------------------------------------

	$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
//

//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
// $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();
//-- fin mod : categories hierarchy ----------------------------------------------------------------
//
// If you don't use these stats on your index you may want to consider
// removing them
//
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
// $total_posts = get_db_stat('postcount');
// $total_users = get_db_stat('usercount');
//-- add
include_once($phpbb_root_path . 'includes/mods_settings/mod_categories_hierarchy.' . $phpEx);
if ( ($board_config['display_viewonline'] == 2) || ( ($viewcat < 0) && ($board_config['display_viewonline'] == 1) ) )
{
	if ( empty($board_config['max_posts']) || empty($board_config['max_users']) )
	{
		board_stats();
	}
	$total_posts = $board_config['max_posts'];
	$total_users = $board_config['max_users'];
//-- fin mod : categories hierarchy ----------------------------------------------------------------
$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'];
}
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- add
}
//-- fin mod : categories hierarchy ----------------------------------------------------------------


//
// Start page proper
//
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
/


/
//-- fin mod : categories hierarchy ----------------------------------------------------------------

	//
	// Start output of page
	//
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- add
// set the parm of the mark read func
$mark = ($viewcat == -1 ) ? '' : '&' . POST_CAT_URL . '=' . $viewcat;
// monitor the board statistic
if (($board_config['display_viewonline'] == 2) || (($viewcat < 0) && ($board_config['display_viewonline'] == 1)))
{
//-- fin mod : categories hierarchy ----------------------------------------------------------------
	define('SHOW_ONLINE', true);
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- add
}
//-- fin mod : categories hierarchy ----------------------------------------------------------------
	$page_title = $lang['Index'];
	include($phpbb_root_path . 'includes/page_header.'.$phpEx);

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

	$template->assign_vars(array(
		'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
		'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
		'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'), 

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

		'L_FORUM' => $lang['Forum'],
		'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'],
		// Bookie Mod
		'BOOKIE_START' => $lang['bookie_start'],
		'BOOKIE_COUNT' => $total_bets,
		'BOOKIE_END' => $lang['bookie_finish'],
		'ASSIGN_START' => $lang['bookie_assign_start'],
		'ASSIGN_COUNT' => $count_assigned,
		'ASSIGN_END' => $lang['bookie_assign_finish'],
		'BOOKIE_HEADER' => $lang['bookie_header'],
		'BOOKIE_IMAGE' => $bookie_image,
		'ASSIGN_IMAGE' => $assign_image,
		
		// End Bookie Mod 

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

//-- mod : categories hierarchy --------------------------------------------------------------------
// here we added
//	$mark
//-- modify
		'U_MARK_READ' => append_sid("index.$phpEx?mark=forums$mark"))
//-- fin mod : categories hierarchy ----------------------------------------------------------------
	);

	//
	// Okay, let's build the index
	//
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
/
/
// don't display the board statistics
if ( ($board_config['display_viewonline'] == 2) || ( ($viewcat < 0) && ($board_config['display_viewonline'] == 1) ) )
{
	$template->assign_block_vars('disable_viewonline', array());
}

// display the index
$display = display_index($viewcatkey);

if ( !$display )
//-- fin mod : categories hierarchy ----------------------------------------------------------------
{
	message_die(GENERAL_MESSAGE, $lang['No_forums']);
}

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

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

?>

Gebruikersavatar
Bee
Berichten: 13403
Lid geworden op: 29 aug 2004, 10:30

Bericht door Bee » 20 aug 2005, 15:02

Code: Selecteer alles

//-- mod : categories hierarchy -------------------------------------------------------------------- 
//-- add 
   if ( $viewcat < 0 ) 
   { 
//-- fin mod : categories hierarchy ---------------------------------------------------------------- 
{ 
vervangen door

Code: Selecteer alles

{
//-- mod : categories hierarchy -------------------------------------------------------------------- 
//-- add 
   if ( $viewcat < 0 ) 
   { 
//-- fin mod : categories hierarchy ---------------------------------------------------------------- 
... Maar ik modereer (nog) niet.

Kielse Rat
Berichten: 277
Lid geworden op: 08 jul 2005, 09:03

Bericht door Kielse Rat » 20 aug 2005, 15:05

Dan krijg ik weer dit:
Parse error: parse error, unexpected '/' in /home/jalled/www/phpBB2/index.php on line 216

abcde
Berichten: 1494
Lid geworden op: 19 feb 2004, 16:02

Bericht door abcde » 20 aug 2005, 15:09

Zoek:

Code: Selecteer alles

//-- mod : categories hierarchy -------------------------------------------------------------------- 
//-- delete 
/ 
/ 
// don't display the board statistics 
Vervang met:

Code: Selecteer alles

//-- mod : categories hierarchy -------------------------------------------------------------------- 
//-- delete 
// 
//
// don't display the board statistics 
Bijna 1500 posts!

Kielse Rat
Berichten: 277
Lid geworden op: 08 jul 2005, 09:03

Bericht door Kielse Rat » 20 aug 2005, 15:13

Ik kan nu min forum openen maar ik zie alleen de header en eronder staat dit:
Template->make_filename(): Error - file index_box.tpl does not exist

abcde
Berichten: 1494
Lid geworden op: 19 feb 2004, 16:02

Bericht door abcde » 20 aug 2005, 15:19

Zoek:

Code: Selecteer alles

   return $auth_user;  
}
Vervang met:

Code: Selecteer alles

   return $auth_user;  
Zou je voortaan de regel in kwestie even willen verduidelijken zodat ik niet zelf hoef te zoeken!

Edit: Ik zie dat de code hebt weggehaald, verder heb je dat bestand gewoon niet geupload.
Bijna 1500 posts!

Kielse Rat
Berichten: 277
Lid geworden op: 08 jul 2005, 09:03

Bericht door Kielse Rat » 20 aug 2005, 15:23

Sorry daarvoor.
Het bestandje index_body.tpl staat daar wel degelijk hoor.
Dit is het bestand:

Code: Selecteer alles

<!-- mod : categories hierarchy v 2 -->
<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
  <tr> 
	<td align="left" valign="bottom"><span class="gensmall">
	<!-- BEGIN switch_user_logged_in -->
	{LAST_VISIT_DATE}<br />
	<!-- END switch_user_logged_in -->
	{CURRENT_TIME}<br /></span><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a>{NAV_CAT_DESC}</span></td>
	<td align="right" valign="bottom" class="gensmall">
		<!-- BEGIN switch_user_logged_in -->
		<a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br /><a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
		<!-- END switch_user_logged_in -->
		<a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a></td>
  </tr>
</table>

<!-- BEGIN bookie_bets_due --> 
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
		<th height="25" class="thHead" nowrap="nowrap" colspan="2">{BOOKIE_HEADER}</th>
	</tr>

<tr>
<td class="row1">{BOOKIE_IMAGE}</td>
<td class="row1" width="100%"><span class="genmed">{BOOKIE_START}&nbsp;<b>{BOOKIE_COUNT}</b>&nbsp;{BOOKIE_END}</span></td>
</tr>
</table>
<br />
<!-- END bookie_bets_due -->

{BOARD_INDEX}

<table width="100%" cellspacing="0" border="0" align="center" cellpadding="2">
  <tr> 
	<td align="left"><span class="gensmall"><a href="{U_MARK_READ}" class="gensmall">{L_MARK_FORUMS_READ}</a></span></td>
	<td align="right"><span class="gensmall">{S_TIMEZONE}</span></td>
  </tr>
</table>

<!-- BEGIN disable_viewonline -->

<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
  <tr> 
	<td class="catHead" colspan="2" height="28"><span class="cattitle"><a href="{U_VIEWONLINE}" class="cattitle">{L_WHO_IS_ONLINE}</a></span></td>
  </tr>
  <tr> 
	<td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
	<td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}</span>
	</td>
  </tr>
  <tr> 
	<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} &nbsp; {COLOR_GROUPS_LIST}<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>
  </tr>
</table>

<table width="100%" cellpadding="1" cellspacing="1" border="0">
<tr>
	<td align="left" valign="top"><span class="gensmall">{L_ONLINE_EXPLAIN}</span></td>
</tr>
</table>

<!-- END disable_viewonline -->
<!-- BEGIN switch_user_logged_out -->
<form method="post" action="{S_LOGIN_ACTION}">
  <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
	<tr> 
	  <td class="catHead" height="28"><a name="login"></a><span class="cattitle">{L_LOGIN_LOGOUT}</span></td>
	</tr>
	<tr> 
	  <td class="row1" align="center" valign="middle" height="28"><span class="gensmall">{L_USERNAME}: 
		<input class="post" type="text" name="username" size="10" />
		&nbsp;&nbsp;&nbsp;{L_PASSWORD}: 
		<input class="post" type="password" name="password" size="10" maxlength="32" />
		&nbsp;&nbsp; &nbsp;&nbsp;{L_AUTO_LOGIN} 
		<input class="text" type="checkbox" name="autologin" />
		&nbsp;&nbsp;&nbsp; 
		<input type="submit" class="mainoption" name="login" value="{L_LOGIN}" />
		</span> </td>
	</tr>
  </table>
</form>
<!-- END switch_user_logged_out -->

<br clear="all" />

<table cellspacing="3" border="0" align="center" cellpadding="0">
  <tr> 
	<td width="20" align="center"><img src="templates/subSilver/images/folder_new_big.gif" alt="{L_NEW_POSTS}"/></td>
	<td><span class="gensmall">{L_NEW_POSTS}</span></td>
	<td>&nbsp;&nbsp;</td>
	<td width="20" align="center"><img src="templates/subSilver/images/folder_big.gif" alt="{L_NO_NEW_POSTS}" /></td>
	<td><span class="gensmall">{L_NO_NEW_POSTS}</span></td>
	<td>&nbsp;&nbsp;</td>
	<td width="20" align="center"><img src="templates/subSilver/images/folder_locked_big.gif" alt="{L_FORUM_LOCKED}" /></td>
	<td><span class="gensmall">{L_FORUM_LOCKED}</span></td>
  </tr>
</table>

abcde
Berichten: 1494
Lid geworden op: 19 feb 2004, 16:02

Bericht door abcde » 20 aug 2005, 15:24

Kielse Rat schreef:Ik kan nu min forum openen maar ik zie alleen de header en eronder staat dit:
Template->make_filename(): Error - file index_box.tpl does not exist
Hij zegt index_box.tpl en dus niet index_body.tpl. :roll:
Bijna 1500 posts!

Kielse Rat
Berichten: 277
Lid geworden op: 08 jul 2005, 09:03

Bericht door Kielse Rat » 20 aug 2005, 15:28

Soory nogmaals :oops: .
Als ik naar mijn administratiepaneel ga krijg ik alweer deze eroor:
Parse error: parse error, unexpected T_ELSE in /home/jalled/www/phpBB2/admin/admin_forum_prune.php on line 93

Dit is het bestandje:

Code: Selecteer alles

<?php
//-- mod : categories hierarchy --------------------------------------------------------------------
/***************************************************************************
*                             admin_forum_prune.php
*                              -------------------
*     begin                : Mon Jul 31, 2001
*     copyright            : (C) 2001 The phpBB Group
*     email                : support@phpbb.com
*
*     $Id: admin_forum_prune.php,v 1.22.2.3 2002/12/18 14:14:07 psotfx 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);

if ( !empty($setmodules) )
{
	$filename = basename(__FILE__);
	$module['Forums']['Prune'] = $filename;

	return;
}

//
// Load default header
//
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
require($phpbb_root_path . 'includes/prune.'.$phpEx);
require($phpbb_root_path . 'includes/functions_admin.'.$phpEx); 

//
// Get the forum ID for pruning
//
if( isset($HTTP_GET_VARS[POST_FORUM_URL]) || isset($HTTP_POST_VARS[POST_FORUM_URL]) )
{
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
//	$forum_id = ( isset($HTTP_POST_VARS[POST_FORUM_URL]) ) ? $HTTP_POST_VARS[POST_FORUM_URL] : $HTTP_GET_VARS[POST_FORUM_URL];
//
//	if( $forum_id == -1 )
//	{
//		$forum_sql = '';
//	}
//	else
//	{
//		$forum_id = intval($forum_id);
//		$forum_sql = "AND forum_id = $forum_id";
//	}
//-- add
	$fid = ( isset($HTTP_POST_VARS[POST_FORUM_URL]) ) ? $HTTP_POST_VARS[POST_FORUM_URL] : $HTTP_GET_VARS[POST_FORUM_URL];
	$type = substr($fid, 0, 1);
	$id = intval(substr($fid, 1));
	$cat_id = -1;
	$forum_id = -1;
	if ($fid == 'Root') $type = POST_CAT_URL;
	if ($type == POST_CAT_URL)
	{
		$cat_id = $id;
	}
	else
	{
		$forum_id = $id;
	}
	$fid = $type . $id;
	if ( empty($fid) || ( $fid == POST_CAT_URL . '0' ) )
	{
		$fid = 'Root';
	}

	// set the sql request
	$tkeys = array();
	$tkeys = get_auth_keys($fid, true);
	$forum_rows = array();
	for ($i=0; $i < count($tkeys['id']); $i++)
	{
		if ($tree['type'][$tkeys['idx'][$i]] == POST_FORUM_URL)
		{
			$forum_rows[] = $tree['data'][$tkeys['idx'][$i]];
		}
	}
//-- fin mod : categories hierarchy ----------------------------------------------------------------}
else
{
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- add
	$forum_rows = array();
//-- fin mod : categories hierarchy ----------------------------------------------------------------
	$forum_id = '';
	$forum_sql = '';
}
//
// Get a list of forum's or the data for the forum that we are pruning.
//
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
// $sql = "SELECT f.*
//	FROM " . FORUMS_TABLE . " f, " . CATEGORIES_TABLE . " c
//	WHERE c.cat_id = f.cat_id
//	$forum_sql
//	ORDER BY c.cat_order ASC, f.forum_order ASC";
// if( !($result = $db->sql_query($sql)) )
// {
//	message_die(GENERAL_ERROR, 'Could not obtain list of forums for pruning', '', __LINE__, __FILE__, $sql);
// }
//
// $forum_rows = array();
// while( $row = $db->sql_fetchrow($result) )
// {
//	$forum_rows[] = $row;
// }
//-- fin mod : categories hierarchy ----------------------------------------------------------------

//
// Check for submit to be equal to Prune. If so then proceed with the pruning.
//
if( isset($HTTP_POST_VARS['doprune']) )
{
	$prunedays = ( isset($HTTP_POST_VARS['prunedays']) ) ? intval($HTTP_POST_VARS['prunedays']) : 0;

	// Convert days to seconds for timestamp functions...
	$prunedate = time() - ( $prunedays * 86400 );

	$template->set_filenames(array(
		'body' => 'admin/forum_prune_result_body.tpl')
	);

	for($i = 0; $i < count($forum_rows); $i++)
	{
		$p_result = prune($forum_rows[$i]['forum_id'], $prunedate);
		sync('forum', $forum_rows[$i]['forum_id']);
	
		$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
		$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
	
		$template->assign_block_vars('prune_results', array(
			'ROW_COLOR' => '#' . $row_color, 
			'ROW_CLASS' => $row_class, 
			//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
//			'FORUM_NAME' => $forum_rows[$i]['forum_name'],
//-- add
			'FORUM_NAME' => get_object_lang(POST_FORUM_URL . $forum_rows[$i]['forum_id'], 'name'),
//-- fin mod : categories hierarchy ----------------------------------------------------------------
			'FORUM_TOPICS' => $p_result['topics'],
			'FORUM_POSTS' => $p_result['posts'])
		);
	}

	$template->assign_vars(array(
		'L_FORUM_PRUNE' => $lang['Forum_Prune'],
		'L_FORUM' => $lang['Forum'],
		'L_TOPICS_PRUNED' => $lang['Topics_pruned'],
		'L_POSTS_PRUNED' => $lang['Posts_pruned'],
		'L_PRUNE_RESULT' => $lang['Prune_success'])
	);
}
else
{
	//
	// If they haven't selected a forum for pruning yet then
	// display a select box to use for pruning.
	//
	if( empty($HTTP_POST_VARS[POST_FORUM_URL]) )
	{
		//
		// Output a selection table if no forum id has been specified.
		//
		$template->set_filenames(array(
			'body' => 'admin/forum_prune_select_body.tpl')
		);

//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
//		$select_list = '<select name="' . POST_FORUM_URL . '">';
//		$select_list .= '<option value="-1">' . $lang['All_Forums'] . '</option>';
//
//		for($i = 0; $i < count($forum_rows); $i++)
//		{
//			$select_list .= '<option value="' . $forum_rows[$i]['forum_id'] . '">' . $forum_rows[$i]['forum_name'] . '</option>';
//		}
//		$select_list .= '</select>';
//-- add
		$select_list = selectbox(POST_FORUM_URL, false, '', true);
//-- fin mod : categories hierarchy ----------------------------------------------------------------

		//
		// Assign the template variables.
		//
		$template->assign_vars(array(
			'L_FORUM_PRUNE' => $lang['Forum_Prune'],
			'L_SELECT_FORUM' => $lang['Select_a_Forum'], 
			'L_LOOK_UP' => $lang['Look_up_Forum'],

			'S_FORUMPRUNE_ACTION' => append_sid("admin_forum_prune.$phpEx"),
			'S_FORUMS_SELECT' => $select_list)
		);
	}
	else
	{
		//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
//		$forum_id = intval($HTTP_POST_VARS[POST_FORUM_URL]);
//-- fin mod : categories hierarchy ----------------------------------------------------------------
		
		//
		// Output the form to retrieve Prune information.
		//
		$template->set_filenames(array(
			'body' => 'admin/forum_prune_body.tpl')
		);

//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
//		$forum_name = ( $forum_id == -1 ) ? $lang['All_Forums'] : $forum_rows[0]['forum_name'];
//-- add
		$forum_name = ($fid == 'Root') ? $lang['All_Forums'] : get_object_lang($fid, 'name');
//-- fin mod : categories hierarchy ----------------------------------------------------------------

		$prune_data = $lang['Prune_topics_not_posted'] . " "; 
		$prune_data .= '<input class="post" type="text" name="prunedays" size="4"> ' . $lang['Days'];

//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
//		$hidden_input = '<input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />';
//-- add
		$hidden_input = '<input type="hidden" name="' . POST_FORUM_URL . '" value="' . $fid . '" />';
//-- fin mod : categories hierarchy ----------------------------------------------------------------

		//
		// Assign the template variables.
		//
		$template->assign_vars(array(
			'FORUM_NAME' => $forum_name,

//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
//			'L_FORUM' => $lang['Forum'],
//-- add
			'L_FORUM' => ( $cat_id > 0 ) ? $lang['Category'] : $lang['Forum'],
//-- fin mod : categories hierarchy ----------------------------------------------------------------
			'L_FORUM_PRUNE' => $lang['Forum_Prune'], 
			'L_FORUM_PRUNE_EXPLAIN' => $lang['Forum_Prune_explain'], 
			'L_DO_PRUNE' => $lang['Do_Prune'],

			'S_FORUMPRUNE_ACTION' => append_sid("admin_forum_prune.$phpEx"),
			'S_PRUNE_DATA' => $prune_data,
			'S_HIDDEN_VARS' => $hidden_input)
		);
	}
}
//
// Actually output the page here.
//
$template->pparse('body');

include('./page_footer_admin.'.$phpEx);

?>
Ik wil wel de regel zoeken maar hoe kan ik dat doen zonder tot 93 te tellen?

Gebruikersavatar
Diablo Gamer
Berichten: 1394
Lid geworden op: 02 jan 2004, 20:33
Locatie: Dalen/Drenthe/Holland
Contacteer:

Bericht door Diablo Gamer » 20 aug 2005, 16:14

zoek ( als ik het goed heb )

Code: Selecteer alles

//-- fin mod : categories hierarchy ----------------------------------------------------------------} 
else 
{ 
//-- mod : categories hierarchy -------------------------------------------------------------------- 
vervangen door

Code: Selecteer alles

//-- fin mod : categories hierarchy ----------------------------------------------------------------
} 
else 
{ 
//-- mod : categories hierarchy -------------------------------------------------------------------- 

abcde
Berichten: 1494
Lid geworden op: 19 feb 2004, 16:02

Bericht door abcde » 20 aug 2005, 19:59

Kielse Rat schreef:Ik wil wel de regel zoeken maar hoe kan ik dat doen zonder tot 93 te tellen?
Het bestand openen in een (php)editor.

@Diablo Gamer: die fix klopt volgens mij ook voor die error (alhoewel je die '}' ook boven de comment line kan zetten) :wink: .
Bijna 1500 posts!

Gebruikersavatar
Diablo Gamer
Berichten: 1394
Lid geworden op: 02 jan 2004, 20:33
Locatie: Dalen/Drenthe/Holland
Contacteer:

Bericht door Diablo Gamer » 21 aug 2005, 08:47

voor de gene die de hele hack/mod install wil kijken hier is de link van de hack ( volgens mijn en het is ook de enge hack/mod met de naam Categories Hierarchy )

Gebruikersavatar
Paul
Beheerder
Beheerder
Berichten: 20316
Lid geworden op: 23 okt 2003, 11:38
Locatie: Utrecht
Contacteer:

Bericht door Paul » 21 aug 2005, 08:54

En dat is dus een oude versie(2.0.3), dan kan je beter 2.0.5RC2 nemen ;)

Gebruikersavatar
Diablo Gamer
Berichten: 1394
Lid geworden op: 02 jan 2004, 20:33
Locatie: Dalen/Drenthe/Holland
Contacteer:

Bericht door Diablo Gamer » 21 aug 2005, 09:11

waar kan je die vinde ?
op phpbbhack staat ie dus niet

Gebruikersavatar
Bee
Berichten: 13403
Lid geworden op: 29 aug 2004, 10:30

Bericht door Bee » 21 aug 2005, 09:24

In dit topic: http://rpgnet.clanmckeen.com/demo/viewtopic.php?t=1823

Eerst cache installeren, dan deel 1, en als je zin hebt nog deel 2 ;)
... Maar ik modereer (nog) niet.

Gesloten