Simple Subforums

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
196
61%
Very Good
59
18%
Good
34
11%
Fair
7
2%
Poor
26
8%
 
Total votes: 322

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: Simple Subforums

Post by D¡cky »

CartoonGirl wrote: Okay I sorted out my other problem but when my members view the forum with 'simple subforums' installed they see this at the top of the page using firefox and IE (works fine in Safari) :


"/* Begin Simple Subforums MOD */ a.topic-new, a.topic-new:visited { color: #DD6900; } a.topic-new:hover, a.topic-new:active { color: #006699; } /* End Simple Subforums MOD */"
How do I fix THAT?
That code needs to between the style tags in the header. If you are using an external stylesheet and don't have style tags in overall_header, you can create them.They must be between the <head> and </head> tags

Code: Select all

<style type="text/css">
<!--
/* Begin Simple Subforums MOD */
a.topic-new, a.topic-new:visited { color: {T_BODY_HLINK}; }
a.topic-new:hover, a.topic-new:active { color: {T_BODY_LINK}; }
/* Begin Simple Subforums MOD */
-->
</style>
CartoonGirl wrote: ALSO... apparently the last poster is not listed correctly in the subforum on IE and Firefox. It seems to be listing the last poster to post in the main forum and not the sub forum specifically. Again it works FINE in Safari for Mac.

Suggestions?

Pleeeeeeaaase.
I find it strange that the different browser would make a difference in which last poster is displayed since the last poster is created by the php code which is server side. The only possibility I can think of is that your index.php is not edited correctly, or you have another MOD which is conflicting.
Have you hugged someone today?
FernandoLeite_77
Registered User
Posts: 5
Joined: Sun Mar 18, 2007 11:35 pm

Re: Simple Subforums

Post by FernandoLeite_77 »

pentapenguin wrote: You can download my newer MODs here: http://www.phpbb.com/files/mods/simple_ ... 1.0.2b.zip


Thanks pentapenguin. I was looking forward to get this one ! 8)

I´ll install it as soon as I can !

I hope I find it usefull. I´m sure I will ;-)

Give you feedback later...
Last edited by Paul on Tue Mar 20, 2007 12:27 pm, edited 1 time in total.
Reason: Link changed
CartoonGirl
Registered User
Posts: 31
Joined: Sun Jun 25, 2006 2:35 pm
Contact:

Re: Simple Subforums

Post by CartoonGirl »

Thank you for the reply.

Well I do have a 'last post made by' mod that appears on the index page where all the 'who is online ' info is. It's possible that is the thing that is conflicting?

I'll have a look at my index.php file and see if I have missed something. I did mod it by hand. It took a hell of a long time let me tell you...lol

Thanks again.
User avatar
kaanuslu
Registered User
Posts: 131
Joined: Sun Jul 03, 2005 4:24 pm
Contact:

What does this means ?

Post by kaanuslu »

Hi, I just dont know too much about phpBB.

I installed extreme style, no problem ( what could it be :oops: )

When I started to install Simple Subforums, I stuck at the first line :

SQL
ALTER TABLE phpbb_forums ADD forum_parent INT NOT NULL DEFAULT '0';


There are 152 pages in this topic, almost impossible to find an answer. What I am going to do ?

Thank you
CartoonGirl
Registered User
Posts: 31
Joined: Sun Jun 25, 2006 2:35 pm
Contact:

Re: What does this means ?

Post by CartoonGirl »

kaanuslu wrote: Hi, I just dont know too much about phpBB.

I installed extreme style, no problem ( what could it be :oops: )

When I started to install Simple Subforums, I stuck at the first line :

SQL
ALTER TABLE phpbb_forums ADD forum_parent INT NOT NULL DEFAULT '0';


There are 152 pages in this topic, almost impossible to find an answer. What I am going to do ?

Thank you



You need to go into your database and enter an sql query thing. I was clueless at first too but it isn't a hard thing once you know how.

Go to where your space is hosted and get into the hosting control panel. You want to go to the mysql section and open up mysqladmin if thats what you have running. You click on your database and the SQL tab and enter the SQL ALTER TABLE phpbb_forums ADD forum_parent INT NOT NULL DEFAULT '0'; bit. That's it.

YOu are way better off trying to install this with Easy Mod though. I did it by hand. I wish I had done it with Easy Mod. You wont need to worry about entering the SQL on your own if you install Easy Mod and use that to install Simple Sub forums.. it will do it for you.
debragrant
Registered User
Posts: 9
Joined: Tue Mar 20, 2007 8:44 am

Re: Simple Subforums

Post by debragrant »

how do i use easy mod to install it? I have tryed but I think I'm placing the wrong files/folders in the wrong places
User avatar
pentapenguin
Former Team Member
Posts: 11030
Joined: Thu Jul 01, 2004 4:15 am
Location: GA, USA

Re: Simple Subforums

Post by pentapenguin »

debragrant wrote: how do i use easy mod to install it? I have tryed but I think I'm placing the wrong files/folders in the wrong places

Readme for EasyMOD: http://easymod.sourceforge.net/readme/ If you have questions about EasyMOD please ask here: http://area51.phpbb.com/phpBB/viewforum.php?f=15
Support Resources: Support Request Template
If you need professional assistance with your board, please contact me for my reasonable rates.
User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: Simple Subforums

Post by D¡cky »

debragrant wrote: how do i use easy mod to install it? I have tryed but I think I'm placing the wrong files/folders in the wrong places

When installing with EasyMOD, the file that you need to install with EasyMOD is simple_subforums_1.0.2.txt. It is in the contrib directory. You need to move, or copy, the file from the contrib directory up one directory to the simple_subforums_1.0.2 directory
Have you hugged someone today?
debragrant
Registered User
Posts: 9
Joined: Tue Mar 20, 2007 8:44 am

Re: Simple Subforums

Post by debragrant »

So I tryed to install, below is what I got. I did have fiapplepink as my style and got these errors, I then changed to subsilver and got the same errors. Should I remove fiapplepink all together?

Code: Select all

Error Detail 
  
Warning

FIND FAILED: In file [templates/fiapplepink/admin/forum_admin_body.tpl] could not find:

<td class="row2"><span class="gen"><a href="{catrow.forumrow.U_VIEWFORUM}" 

MOD script line #781 :: FAQ :: Report 

Error Detail 
  
Warning

FIND FAILED: In file [templates/fiapplepink/index_body.tpl] could not find:

<span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td> 
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOPICS}</span></td> 
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.POSTS}</span></td> 

MOD script line #817 :: FAQ :: Report 

Error Detail 
  
Warning

FIND FAILED: In file [templates/fiapplepink/modcp_body.tpl] could not find:

<a href="{U_INDEX}" class="nav">{L_INDEX}</a> 

MOD script line #854 :: FAQ :: Report 
  
Error Detail 
  
Warning

FIND FAILED: In file [templates/fiapplepink/modcp_split.tpl] could not find:

<a href="{U_INDEX}" class="nav">{L_INDEX}</a><span class="nav"> 

MOD script line #878 :: FAQ :: Report 

Error Detail 
  
Warning

FIND FAILED: In file [templates/fiapplepink/overall_header.tpl] could not find:

@import url("templates/fiapplepink/formIE.css"); 

MOD script line #896 :: FAQ :: Report 

Error Detail 
  
Warning

FIND FAILED: In file [templates/fiapplepink/fiapplepink.cfg] could not find:

$images['forum_locked'] = "$current_template_images/folder_locked_big.gif"; 

MOD script line #936 :: FAQ :: Report 

Error Detail 
  
Warning

FIND FAILED: In file [templates/fiapplepink/viewforum_body.tpl] could not find:

<td align="left" valign="middle" class="nav" width="100%"><span class="nav">&nbsp;&nbsp;&nbsp;<a href="{U_INDEX}" class="nav">{L_INDEX}</a> 

MOD script line #958 :: FAQ :: Report 

Error Detail 
  
Warning

FIND FAILED: In file [templates/fiapplepink/viewtopic_body.tpl] could not find:

<a href="{U_INDEX}" class="nav">{L_INDEX}</a> 

MOD script line #1059 :: FAQ :: Report 

Error Detail 
  
Critical Error

FIND FAILED: In file [index.php] could not find:

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

MOD script line #1101 :: FAQ :: Report 
  
MOD Data 
MOD Title: Simple Subforums MOD     1.0.0 RC2     simple_subforums_1.0.0_RC2.txt 
Author: pentapenguin     pentapenguin@bluebottle.com     n/a     http://www.pentapenguin.com 
Processed Themes: subSilver; fiapplepink 
Processed Languages: english 
Files Edited: 24 
Commands Processed: 116 
Unprocessed Commands: 0 


The following commands were not recognized by EasyMOD and were ignored. The MOD script line number is displayed. 
Unprocessed Commands 
 

EasyMOD successfully processed the following commands: 
Commands Processed 
DIY INSTRUCTIONS     #83  
This MOD requires the eXtreme Styles MOD.
You *must* install the eXtreme Styles MOD which is available at these locations:
http://www.phpbbstyles.com/viewtopic.php?t=356
http://www.phpbb.com/phpBB/viewtopic.php?t=125251

 
SQL     #92  
ALTER TABLE phpbb_forums ADD forum_parent INT NOT NULL DEFAULT '0';

 
COPY     #98  
copy contrib/admin/xs_simple_subforums.cfg to admin/xs_simple_subforums.cfg
copy templates/subSilver/images/folders_big.gif to templates/subSilver/images/folders_big.gif
copy templates/subSilver/images/folders_new_big.gif to templates/subSilver/images/folders_new_big.gif

 
OPEN     #106  
admin/admin_forumauth.php

 
FIND     #112  
	for($i = 0; $i < count($forum_rows); $i++)
	{

 
AFTERADD     #119  
		// Begin Simple Subforums MOD
		if( !$forum_rows[$i]['forum_parent'] )
		{
		// End Simple Subforums MOD



FIND     #129  
		$select_list .= '<option value="' . $forum_rows[$i]['forum_id'] . '">' . $forum_rows[$i]['forum_name'] . '</option>';

 
AFTERADD     #135  
		// Begin Simple Subforums MOD
			$parent_id = $forum_rows[$i]['forum_id'];
			for( $j = 0; $j < count($forum_rows); $j++ )
			{
				if( $forum_rows[$j]['forum_parent'] == $parent_id )
				{
					$select_list .= '<option value="' . $forum_rows[$j]['forum_id'] . '">-- ' . $forum_rows[$j]['forum_name'] . '</option>';
				}
			}
		}
		// End Simple Subforums MOD

 
OPEN     #152  
admin/admin_forums.php

 
FIND     #158  
	return($catlist);
}

 
AFTERADD     #165  
// Begin Simple Subforums MOD
function get_list_cat($id, $parent, $forum_id)
{
	global $db;

	// Get categories
	$sql = 'SELECT * FROM ' . CATEGORIES_TABLE . ' ORDER BY cat_order ASC';
	
	if( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, "Couldn't get list of categories", '', __LINE__, __FILE__, $sql);
	}
	
	$cat_list = array();
	
	while( $row = $db->sql_fetchrow($result) )
	{
		$cat_list[] = $row;
	}

	$db->sql_freeresult($result);

	// Get all forums and check if forum has subforums
	$has_sub = false;
	$sql = 'SELECT forum_id, cat_id, forum_name, forum_parent FROM ' . FORUMS_TABLE . ' ORDER BY forum_order ASC';
	
	if( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, "Couldn't get list of forums", '', __LINE__, __FILE__, $sql);
	}
	
	$forums_list = array();
	
	while( $row = $db->sql_fetchrow($result) )
	{
		if( $row['forum_parent'] > 0 && $row['forum_parent'] == $forum_id )
		{
			$has_sub = true;
		}
		
		if( !$row['forum_parent'] )
		{
			$forums_list[] = $row;
		}
	}
	$db->sql_freeresult($result);

	// Generate select
	for( $i = 0; $i < count($cat_list); $i++ )
	{
		$cat_id = $cat_list[$i]['cat_id'];
		$selected = ( $id == $cat_id && $parent == 0 ) ? ' selected="selected"' : '';
		$str .= '<option value="' . $cat_id . '"' . $selected . '>' . $cat_list[$i]['cat_title'] . '</option>';
		
		if( !$has_sub )
		{
			for( $j = 0; $j < count($forums_list); $j++)
			{
				if( $forums_list[$j]['cat_id'] == $cat_id && $forums_list[$j]['forum_id'] != $forum_id )
				{
					$forum_id2 = $forums_list[$j]['forum_id'];
					$selected = ( $id == $cat_id && $parent == $forum_id2 ) ? ' selected="selected"' : '';
					$str .= '<option value="' . $cat_id . ',' . $forum_id2 . '"' . $selected . '>- ' . $forums_list[$j]['forum_name'] . '</option>';
				}
			}
		}
	}
	return $str;
}
// End Simple Subforums MOD



 
FIND     #241  
				$cat_id = $row['cat_id'];

 
AFTERADD     #247  
				// Begin Simple Subforums MOD
				$parent_id = $row['forum_parent'];
				// End Simple Subforums MOD



 
FIND     #256  
				$forum_id = ''; 
				$prune_enabled = '';

 
AFTERADD     #263  
				// Begin Simple Subforums MOD
				$parent_id = 0;
				// End Simple Subforums MOD



 
FIND     #272  
			$catlist = get_list('category', $cat_id, TRUE);

 
REPLACE     #278  
			// Begin Simple Subforums MOD
			$catlist = get_list_cat($cat_id, $parent_id, $forum_id);
			// End Simple Subforums MOD



 
FIND     #287  
				'L_CATEGORY' => $lang['Category'], 

 
IN-LINE FIND     #293  
$lang['Category']

 
IN-LINE AFTERADD     #299  
 . ' / ' . $lang['Forum']

 
FIND     #305  
			$sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")
				VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";

 
BEFOREADD     #312  
			// Begin Simple Subforums MOD
			$list = explode(',', $HTTP_POST_VARS[POST_CAT_URL]);
			$new_cat = ( count($list) ) ? intval($list[0]) : intval($HTTP_POST_VARS[POST_CAT_URL]);
			$new_parent = ( isset($list[1]) ) ? intval($list[1]) : 0;
			// End Simple Subforums MOD



 
IN-LINE FIND     #323  
cat_id,

 
IN-LINE AFTERADD     #331  
 forum_parent,

 
IN-LINE FIND     #337  
intval($HTTP_POST_VARS[POST_CAT_URL])

 
IN-LINE REPLACE     #343  
$new_cat . ', ' . $new_parent

 
FIND     #349  
		case 'modforum':

 
AFTERADD     #355  
			// Begin Simple Subforums MOD
			$forum_id = intval($HTTP_POST_VARS[POST_FORUM_URL]);
			$row = get_info('forum', $forum_id);
			$list = explode(',', $HTTP_POST_VARS[POST_CAT_URL]);
			$new_cat = ( count($list) ) ? intval($list[0]) : intval($HTTP_POST_VARS[POST_CAT_URL]);
			$new_parent = ( isset($list[1]) ) ? intval($list[1]) : 0;
			
			if( !$row['forum_parent'] && $row['cat_id'] !== $new_cat )
			{
				// Move subforums to new category
				$sql = "UPDATE " . FORUMS_TABLE . " SET cat_id='$new_cat' WHERE forum_parent='$forum_id'";
				$db->sql_query($sql);
			}
			// End Simple Subforums MOD



 
FIND     #375  
			$sql = "UPDATE " . FORUMS_TABLE . "
				SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "',

 
IN-LINE FIND     #382  
" . intval($HTTP_POST_VARS[POST_CAT_URL]) . "

 
IN-LINE REPLACE     #388  
$new_cat, forum_parent = $new_parent

 
FIND     #394  
			$sql = "DELETE FROM " . FORUMS_TABLE . "
				WHERE forum_id = $from_id";
			if( !$result = $db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, "Couldn't delete forum", "", __LINE__, __FILE__, $sql);
			}

 
AFTERADD     #405  
			// Begin Simple Subforums MOD
			// Move subforums to category
			$sql = "UPDATE " . FORUMS_TABLE . " SET forum_parent = '0' WHERE forum_parent = '$from_id'";
			$db->sql_query($sql);
			// End Simple Subforums MOD



 
FIND     #416  
			$cat_id = $forum_info['cat_id'];

 
AFTERADD     #422  
			// Begin Simple Subforums MOD
			if( !$forum_info['forum_parent'] )
			{
				// Find previous/next forum
				if( $move > 0 )
				{
					$sql = "SELECT forum_id, forum_order FROM " . FORUMS_TABLE . " WHERE cat_id = '$cat_id' AND forum_parent = '0' AND forum_order > '" . $forum_info['forum_order'] . "' ORDER BY forum_order ASC";
				}
				
				else
				{
					$sql = "SELECT forum_id, forum_order FROM " . FORUMS_TABLE . " WHERE cat_id = '$cat_id' AND forum_parent = '0' AND forum_order < '" . $forum_info['forum_order'] . "' ORDER BY forum_order DESC";
				}
				
				if( !($result = $db->sql_query($sql)) )
				{
					message_die(GENERAL_ERROR, "Couldn't change category order", '', __LINE__, __FILE__, $sql);
				}
				
				$row = $db->sql_fetchrow($result);
				$db->sql_freeresult($result);
				if($row !== false)
				{
					// Swap forum orders
					$sql = "UPDATE " . FORUMS_TABLE . " SET forum_order = '" . $row['forum_order'] . "' WHERE forum_id = '$forum_id'";
					$db->sql_query($sql);
					
					$sql = "UPDATE " . FORUMS_TABLE . " SET forum_order = '" . $forum_info['forum_order'] . "' WHERE forum_id = '" . $row['forum_id'];
					$db->sql_query($sql);
				}
			}
			
			else
			{
			// End Simple Subforums MOD



 
FIND     #463  
				renumber_order('forum', $forum_info['cat_id']);

 
AFTERADD     #469  
			// Begin Simple Subforums MOD
			}
			// End Simple Subforums MOD



 
FIND     #478  
			if ($forum_rows[$j]['cat_id'] == $cat_id)

 
IN-LINE FIND     #484  
$cat_id

 
IN-LINE AFTERADD     #490  
 && $forum_rows[$j]['forum_parent'] == 0

 
FIND     #496  
					'U_FORUM_RESYNC' => append_sid("admin_forums.$phpEx?mode=forum_sync&" . POST_FORUM_URL . "=$forum_id"))
				);

 
AFTERADD     #503  
				// Begin Simple Subforums MOD
				for( $k = 0; $k < $total_forums; $k++ )
				{
					$forum_id2 = $forum_rows[$k]['forum_id'];
					if ( $forum_rows[$k]['forum_parent'] == $forum_id )
					{
						$template->assign_block_vars("catrow.forumrow",	array(
							'FORUM_NAME' => $forum_rows[$k]['forum_name'],
							'FORUM_DESC' => $forum_rows[$k]['forum_desc'],
							'ROW_COLOR' => $row_color,
							'NUM_TOPICS' => $forum_rows[$k]['forum_topics'],
							'NUM_POSTS' => $forum_rows[$k]['forum_posts'],
							'STYLE' => ' style="padding-left: 20px;" ',
	
							'U_VIEWFORUM' => append_sid($phpbb_root_path."viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id2"),
							'U_FORUM_EDIT' => append_sid("admin_forums.$phpEx?mode=editforum&" . POST_FORUM_URL . "=$forum_id2"),
							'U_FORUM_DELETE' => append_sid("admin_forums.$phpEx?mode=deleteforum&" . POST_FORUM_URL . "=$forum_id2"),
							'U_FORUM_MOVE_UP' => append_sid("admin_forums.$phpEx?mode=forum_order&move=-15&" . POST_FORUM_URL . "=$forum_id2"),
							'U_FORUM_MOVE_DOWN' => append_sid("admin_forums.$phpEx?mode=forum_order&move=15&" . POST_FORUM_URL . "=$forum_id2"),
							'U_FORUM_RESYNC' => append_sid("admin_forums.$phpEx?mode=forum_sync&" . POST_FORUM_URL . "=$forum_id2"))
						);

					}
					
				} // for ... forums
				// End Simple Subforums MOD



 
OPEN     #535  
includes/functions.php

 
FIND     #541  
function make_jumpbox($action, $match_forum_id = 0)
{

 
AFTERADD     #548  
	$list = array();
	return make_jumpbox_ref($action, $match_forum_id, $list);
}

function make_jumpbox_ref($action, $match_forum_id, &$forums_list)
{



 
FIND     #559  
			$forum_rows[] = $row;

 
AFTERADD     #565  
			// Begin Simple Subforums MOD
			$forums_list[] = $row;
			// End Simple Subforums MOD



 
FIND     #573  
if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$j]['auth_view'] <= AUTH_REG )

 
IN-LINE FIND     #579  
if (

 
IN-LINE AFTERADD     #585  
 !$forum_rows[$j]['forum_parent'] && 

 
FIND     #591  
//					if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $is_auth[$forum_rows[$j]['forum_id']]['auth_view'] )

 
IN-LINE FIND     #597  
if (

 
IN-LINE AFTERADD     #603  
 !$forum_rows[$j]['forum_parent'] && 

 
FIND     #609  
						$selected = ( $forum_rows[$j]['forum_id'] == $match_forum_id ) ? 'selected="selected"' : '';

 
BEFOREADD     #615  
							// Begin Simple Subforums MOD
							$id = $forum_rows[$j]['forum_id'];
							// End Simple Subforums MOD



 
FIND     #624  
							'title' => $forum_rows[$j]['forum_name']
						);

 
AFTERADD     #631  
						// Begin Simple Subforums MOD
						for( $k = 0; $k < $total_forums; $k++ )
						{
							if ( $forum_rows[$k]['forum_parent'] == $id && $forum_rows[$k]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$k]['auth_view'] <= AUTH_REG )
							{
//							if ( $forum_rows[$k]['forum_parent'] == $id && $forum_rows[$k]['cat_id'] == $category_rows[$i]['cat_id'] && $is_auth[$forum_rows[$k]['forum_id']]['auth_view'] )
//							{
								$selected = ( $forum_rows[$k]['forum_id'] == $match_forum_id ) ? 'selected="selected"' : '';
								$boxstring_forums .=  '<option value="' . $forum_rows[$k]['forum_id'] . '"' . $selected . '>-- ' . $forum_rows[$k]['forum_name'] . '</option>';

								//
								// Add an array to $nav_links for the Mozilla navigation bar.
								// 'chapter' and 'forum' can create multiple items, therefore we are using a nested array.
								//
								$nav_links['chapter forum'][$forum_rows[$k]['forum_id']] = array (
									'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$k]['forum_id']),
									'title' => $forum_rows[$k]['forum_name']
								);
								
							}
						}
						// End Simple Subforums MOD



 
OPEN     #659  
includes/functions_admin.php

 
FIND     #665  
	$sql = 'SELECT f.forum_id, f.forum_name

 
IN-LINE FIND     #671  
f.forum_name

 
IN-LINE AFTERADD     #677  
, f.forum_parent 

 
FIND     #683  
	$forum_list = '';

 
REPLACE     #689  
	// Begin Simple Subforums MOD
	$list = array();
	// End Simple Subforums MOD



 
FIND     #697  
	while( $row = $db->sql_fetchrow($result) )
	{

 
AFTERADD     #704  
	
	// Begin Simple Subforums MOD
		$list[] = $row;
	}
	$forum_list = '';
	for( $i = 0; $i < count($list); $i++ )
	{
		if( !$list[$i]['forum_parent'] )
		{
			$row = $list[$i];
			$parent_hidden = true;
	// End Simple Subforums MOD



 
FIND     #721  
				$forum_list .= '<option value="' . $row['forum_id'] . '"' . $selected .'>' . $row['forum_name'] . '</option>';

 
AFTERADD     #727  
			// Begin Simple Subforums MOD
				$parent_hidden = false;
			}
			if ( $is_auth_ary[$row['forum_id']]['auth_read'] )
			{
				$parent_id = $row['forum_id'];
				for($j=0; $j<count($list); $j++)
				{
					$row = $list[$j];
					if( $row['forum_parent'] == $parent_id && $is_auth_ary[$row['forum_id']]['auth_read'] && $ignore_forum != $row['forum_id'] )
					{
						if( $parent_hidden )
						{
							$forum_list .= '<option value="" disabled="disabled">' . $list[$i]['forum_name'] . '</option>';
							$parent_hidden = false;
						}
						$selected = ( $select_forum == $row['forum_id'] ) ? ' selected="selected"' : '';
						$forum_list .= '<option value="' . $row['forum_id'] . '"' . $selected .'>-- ' . $row['forum_name'] . '</option>';
					}
				}			
			}
			// End Simple Subforums MOD


 
OPEN     #754  
language/lang_english/lang_main.php

 
FIND     #760  
?>

 
BEFOREADD     #766  
// Begin Simple Subforums MOD
$lang['Subforums'] = 'Subforums';
// End Simple Subforums MOD



 
OPEN     #775  
templates/subSilver/admin/forum_admin_body.tpl

 
FIND     #781  
		<td class="row2"><span class="gen"><a href="{catrow.forumrow.U_VIEWFORUM}"

 
IN-LINE FIND     #787  
"row2"

 
IN-LINE AFTERADD     #793  
{catrow.forumrow.STYLE}

 
OPEN     #799  
templates/subSilver/index_body.tpl

 
FIND     #805  
  <!-- BEGIN forumrow -->

 
AFTERADD     #811  
  <!-- IF ! forumrow.PARENT -->



 
FIND     #817  
<span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>
	<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOPICS}</span></td>
	<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.POSTS}</span></td>

 
REPLACE     #825  
<!-- IF catrow.forumrow.MODERATORS --><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}<br /></span><!-- ENDIF -->
	  <!-- BEGIN sub --><!-- DEFINE $HAS_SUB = 1 --><!-- IF catrow.forumrow.sub.NUM > 0 -->, <!-- ELSE --><span class="genmed">{L_SUBFORUMS}: <!-- ENDIF -->{catrow.forumrow.sub.LAST_POST_SUB} <a href="{catrow.forumrow.sub.U_VIEWFORUM}" <!-- IF catrow.forumrow.sub.UNREAD -->class="topic-new"<!-- ENDIF --> title="{catrow.forumrow.sub.FORUM_DESC_HTML}">{catrow.forumrow.sub.FORUM_NAME}</a><!-- END sub -->
	  <!-- IF $HAS_SUB --></span><!-- UNDEFINE $HAS_SUB --><!-- ENDIF -->
	</td>
	<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOTAL_TOPICS}</span></td>
	<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOTAL_POSTS}</span></td>



 
FIND     #836  
  <!-- END forumrow -->

 
BEFOREADD     #842  
  <!-- ENDIF -->



 
OPEN     #848  
templates/subSilver/modcp_body.tpl

 
FIND     #854  
<a href="{U_INDEX}" class="nav">{L_INDEX}</a>

 
IN-LINE FIND     #860  
</a>

 
IN-LINE AFTERADD     #866  
 <!-- IF PARENT_FORUM --> -> <a class="nav" href="{U_VIEW_PARENT_FORUM}">{PARENT_FORUM_NAME}</a> <!-- ENDIF -->

 
OPEN     #872  
templates/subSilver/modcp_split.tpl

 
FIND     #878  
<a href="{U_INDEX}" class="nav">{L_INDEX}</a><span class="nav"> 

 
AFTERADD     #884  
 <!-- IF PARENT_FORUM --> -> <a class="nav" href="{U_VIEW_PARENT_FORUM}">{PARENT_FORUM_NAME}</a> <!-- ENDIF -->



 
OPEN     #890  
templates/subSilver/overall_header.tpl

 
FIND     #896  
@import url("templates/subSilver/formIE.css"); 

 
AFTERADD     #902  
/* Begin Simple Subforums MOD */
a.topic-new, a.topic-new:visited { color: {T_BODY_HLINK}; }
a.topic-new:hover, a.topic-new:active { color: {T_BODY_LINK}; }
/* End Simple Subforums MOD */



 
OPEN     #912  
templates/subSilver/posting_body.tpl

 
FIND     #918  
		<!-- BEGIN switch_not_privmsg --> 

 
AFTERADD     #924  
		<!-- IF PARENT_FORUM --> -> <a class="nav" href="{U_VIEW_PARENT_FORUM}">{PARENT_FORUM_NAME}</a> <!-- ENDIF -->



 
OPEN     #930  
templates/subSilver/subSilver.cfg

 
FIND     #936  
$images['forum_locked'] = "$current_template_images/folder_locked_big.gif";

 
AFTERADD     #942  
// Begin Simple Subforums MOD
$images['forums'] = "$current_template_images/folders_big.gif";
$images['forums_new'] = "$current_template_images/folders_new_big.gif";
// End Simple Subforums MOD



 
OPEN     #952  
templates/subSilver/viewforum_body.tpl

 
FIND     #958  
	  <td align="left" valign="middle" class="nav" width="100%"><span class="nav">&nbsp;&nbsp;&nbsp;<a href="{U_INDEX}" class="nav">{L_INDEX}</a>

 
IN-LINE FIND     #964  
</a>

 
IN-LINE AFTERADD     #970  
 <!-- IF PARENT_FORUM --> -> <a class="nav" href="{U_VIEW_PARENT_FORUM}">{PARENT_FORUM_NAME}</a> <!-- ENDIF -->

 
FIND     #976  
	  <td align="right" valign="bottom" class="nav" nowrap="nowrap"><span class="gensmall"><a href="{U_MARK_READ}">{L_MARK_TOPICS_READ}</a></span></td>
	</tr>
  </table>

 
AFTERADD     #984  
<!-- BEGIN catrow -->
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
  <tr> 
	<th colspan="2" class="thCornerL" height="25" nowrap="nowrap">&nbsp;{catrow.CAT_DESC}&nbsp;</th>
	<th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
	<th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_POSTS}&nbsp;</th>
	<th class="thCornerR" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th>
  </tr>
  <!-- BEGIN forumrow -->
  <tr> 
	<td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>
	<td class="row1" width="100%" height="50"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink<!-- IF catrow.forumrow.UNREAD --> topic-new<!-- ENDIF -->">{catrow.forumrow.FORUM_NAME}</a><br />
	  </span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br />
	  </span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>
	<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOPICS}</span></td>
	<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.POSTS}</span></td>
	<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td>
  </tr>
  <!-- END forumrow -->
</table>
<br />
<!-- END catrow -->

<!-- IF NUM_TOPICS || ! HAS_SUBFORUMS -->



 
FIND     #1014  
	  <td align="left" valign="middle" width="100%"><span class="nav">&nbsp;&nbsp;&nbsp;<a href="{U_INDEX}" class="nav">{L_INDEX}</a>

 
IN-LINE FIND     #1020  
</a>

 
IN-LINE AFTERADD     #1026  
 <!-- IF PARENT_FORUM --> -> <a class="nav" href="{U_VIEW_PARENT_FORUM}">{PARENT_FORUM_NAME}</a><!-- ENDIF -->

 
FIND     #1032  
		<td align="right"><span class="gensmall">{S_AUTH_LIST}</span></td>
	</tr>
</table>

 
AFTERADD     #1040  
<!-- ELSE -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
	<td align="right">{JUMPBOX}</td>
  </tr>
</table>
<!-- ENDIF -->



 
OPEN     #1053  
templates/subSilver/viewtopic_body.tpl

 
FIND     #1059  
<a href="{U_INDEX}" class="nav">{L_INDEX}</a>

 
IN-LINE FIND     #1065  
</a>

 
IN-LINE AFTERADD     #1071  
 <!-- IF PARENT_FORUM --> -> <a class="nav" href="{U_VIEW_PARENT_FORUM}">{PARENT_FORUM_NAME}</a><!-- ENDIF -->

 
FIND     #1077  
<td align="left" valign="middle" width="100%"><span class="nav">&nbsp;&nbsp;&nbsp;<a href="{U_INDEX}" class="nav">{L_INDEX}</a>

 
IN-LINE FIND     #1083  
</a>

 
IN-LINE AFTERADD     #1089  
 <!-- IF PARENT_FORUM --> -> <a class="nav" href="{U_VIEW_PARENT_FORUM}">{PARENT_FORUM_NAME}</a><!-- ENDIF -->

 
OPEN     #1095  
index.php

 
User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: Simple Subforums

Post by D¡cky »

debragrant wrote: So I tryed to install, below is what I got. I did have fiapplepink as my style and got these errors, I then changed to subsilver and got the same errors. Should I remove fiapplepink all together?
No, don't remove fiapplepink. Another MOD must have modified that line. The thing to do is look for the variable, {catrow.forumrow.U_VIEWFORUM} and then use your best judgement a to how the new code should go in.
If you are having that problem with subsilver, you will need to modify that line in the install file to match your line so EasyMOD can install the MOD.
Have you hugged someone today?
debragrant
Registered User
Posts: 9
Joined: Tue Mar 20, 2007 8:44 am

Re: Simple Subforums

Post by debragrant »

D¡cky wrote:
debragrant wrote: So I tryed to install, below is what I got. I did have fiapplepink as my style and got these errors, I then changed to subsilver and got the same errors. Should I remove fiapplepink all together?
No, don't remove fiapplepink. Another MOD must have modified that line. The thing to do is look for the variable, {catrow.forumrow.U_VIEWFORUM} and then use your best judgement a to how the new code should go in.
If you are having that problem with subsilver, you will need to modify that line in the install file to match your line so EasyMOD can install the MOD.



yes having the problem with Subsilver, will have a look at modifiying the file.

So do I just need to add all the missing lines to the index file?
JeffAndersen
Registered User
Posts: 4
Joined: Sun Feb 18, 2007 3:21 pm

Re: Simple Subforums

Post by JeffAndersen »

I have the simple subforums mod installed, why is it that when I try to move a thread the drop down menu doesn't show up? Other than this mod, it is a fresh PHPBB install.
onyxls1
Registered User
Posts: 5
Joined: Thu Mar 22, 2007 11:56 pm

Re: Simple Subforums

Post by onyxls1 »

Help please. I get the following error when I install the mod. I am using phpBB 2.0.22 with the attachment mod, eXtreme Styles, and the "SmoothBlue" theme. Website is http://www.gcoupe.com/

Parse error: parse error, unexpected ')' in /home/content/o/n/y/onyxls1/html/forum/includes/functions.php on line 263

Here is the code around 263...

Code: Select all

	// Begin Simple Subforums MOD
			$forums_list[] = $row;
			// End Simple Subforums MOD

		}

		if ( $total_forums = count($forum_rows) )
		{
			for($i = 0; $i < $total_categories; $i++)
			{
				$boxstring_forums = '';
				for($j = 0; $j < $total_forums; $j++)
				{
					if (  !$forum_rows[$j]['forum_parent'] && 
$forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$j]['auth_view'] <= AUTH_REG )
					{

//					if (  !$forum_rows[$j]['forum_parent'] && 
$forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $is_auth[$forum_rows[$j]['forum_id']]['auth_view'] )
//					{
							// Begin Simple Subforums MOD
							$id = $forum_rows[$j]['forum_id'];
							// End Simple Subforums MOD
						$selected = ( $forum_rows[$j]['forum_id'] == $match_forum_id ) ? 'selected="selected"' : '';
						$boxstring_forums .=  '<option value="' . $forum_rows[$j]['forum_id'] . '"' . $selected . '>' . $forum_rows[$j]['forum_name'] . '</option>';
User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: Simple Subforums

Post by D¡cky »

debragrant wrote:
D¡cky wrote:
debragrant wrote: So I tryed to install, below is what I got. I did have fiapplepink as my style and got these errors, I then changed to subsilver and got the same errors. Should I remove fiapplepink all together?
No, don't remove fiapplepink. Another MOD must have modified that line. The thing to do is look for the variable, {catrow.forumrow.U_VIEWFORUM} and then use your best judgement a to how the new code should go in.
If you are having that problem with subsilver, you will need to modify that line in the install file to match your line so EasyMOD can install the MOD.



yes having the problem with Subsilver, will have a look at modifiying the file.

So do I just need to add all the missing lines to the index file?
The lines are not missing. They are just different, possibly changed by another MOD That is why I said to look for the variable. The variable does not change. You need to make the line in the install file match the line in your subSilver file. Do not wory about matching the lines in fiapplepink. As long as the subSilver lines match, the MOD will install, but keep track of any errors regarding fiapplepink. You can edit the fiapplepink lines manually after the install.


JeffAndersen wrote: I have the simple subforums mod installed, why is it that when I try to move a thread the drop down menu doesn't show up? Other than this mod, it is a fresh PHPBB install.
includes/functions_admin.php is not edited correctly.
Have you hugged someone today?
User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: Simple Subforums

Post by D¡cky »

onyxls1 wrote: Parse error: parse error, unexpected ')' in /home/content/o/n/y/onyxls1/html/forum/includes/functions.php on line 263

Here is the code around 263...

Code: Select all

	// Begin Simple Subforums MOD
			$forums_list[] = $row;
			// End Simple Subforums MOD

		}
...<snip>..
You should have this code around line 263

Code: Select all

		$forum_rows = array();
		while ( $row = $db->sql_fetchrow($result) )
		{
			$forum_rows[] = $row;
			// Begin Simple Subforums MOD
			$forums_list[] = $row;
			// End Simple Subforums MOD

		}

		if ( $total_forums = count($forum_rows) )
		{
			for($i = 0; $i < $total_categories; $i++)
			{
				$boxstring_forums = '';
Have you hugged someone today?
Post Reply

Return to “[2.0.x] MOD Database Releases”