[ABD] Sub forums for 2.0.4

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
jamjammo
Registered User
Posts: 35
Joined: Thu Jan 03, 2002 4:38 pm
Location: El Paso TX
Contact:

Re: [DEV] Subforums, Subcategories, Hierarchies for phpbb 2.

Post by jamjammo » Thu Sep 26, 2002 5:18 am

leokor wrote:
DoubleDoom wrote:ILatest version of code: = 0.942 - 23rd Sept 2002
Download from: http://www.cerebral-assassin.net/czfxpt ... rchies.zip

The latest download contains:
Full instructions to install manually (-updated 23/9/02)
Already modified 2.0.2 subSilver files (for those with no other mods installed)
Required files to use the mod.


You didn't include the modified *.sql schema files, did you?

Code: Select all

SQL Error : 1146 Table 'Attic.phpbb_cat_rel_cat_parents' doesn't exist

LOCK TABLES phpbb_cat_rel_cat_parents WRITE, phpbb_cat_rel_forum_parents WRITE
Leo


thank you, i DID download the latest version tonight:

Code: Select all

## Mod Title: Hierarchies
## Mod Version: 0.9.42 
and i DID run the following in phpMyAdmin

Code: Select all

ALTER TABLE phpbb2_categories
ADD parent_forum_id SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL,
ADD cat_hier_level TINYINT UNSIGNED DEFAULT '0' NOT NULL;


ALTER TABLE phpbb2_forums
ADD forum_hier_level TINYINT UNSIGNED DEFAULT '0' NOT NULL AFTER forum_last_post_id,
ADD forum_issub TINYINT(1) DEFAULT '0' NOT NULL AFTER forum_hier_level;


CREATE TABLE phpbb2_cat_rel_cat_parents (
cat_id mediumint(8) unsigned NOT NULL default '0',
parent_cat_id mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY  (cat_id,parent_cat_id)
);

CREATE TABLE phpbb2_cat_rel_forum_parents (
cat_id mediumint(8) unsigned NOT NULL default '0',
parent_forum_id smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY  (cat_id,parent_forum_id)
);
what else could i have missed?
jamjammo ~
CEO, CFO, and founder of suncitystreetscene.NET
:-D

DoubleDoom
Registered User
Posts: 844
Joined: Wed Jun 26, 2002 6:48 pm

Post by DoubleDoom » Thu Sep 26, 2002 7:38 am

couple of responses here:

Tuck, i have looked at forum_admin.php and replaced the supplied file with a new version (basically the one supplied was a 201 version. It is now a 202 version). However, i installed the code into a new 202 version, following the instructions, and it works fine afterwards.

You didn't include the modified *.sql schema files, did you?


They are in the main readme now to stop confusion with all these different text files.

jamjammo. Certainly looks like an error in your forum_admin_body.tpl. Possibly a bunch of code missing.

I would suggest you replace that file you have with the one supplied. It shouldnt be a problem as i have yet to come across a mod that changes that file so you shouldnt have a conflict.

leokor
Registered User
Posts: 94
Joined: Wed Sep 25, 2002 3:37 am
Contact:

Post by leokor » Thu Sep 26, 2002 12:33 pm

DoubleDoom wrote:
You didn't include the modified *.sql schema files, did you?


They are in the main readme now to stop confusion with all these different text files.


Thank you.

Leo

jamjammo
Registered User
Posts: 35
Joined: Thu Jan 03, 2002 4:38 pm
Location: El Paso TX
Contact:

Post by jamjammo » Thu Sep 26, 2002 7:28 pm

DoubleDoom wrote: jamjammo. Certainly looks like an error in your forum_admin_body.tpl. Possibly a bunch of code missing.


thank you ... error fixed!
my 248 members and I thank you! LOL :)
jamjammo ~
CEO, CFO, and founder of suncitystreetscene.NET
:-D

User avatar
DSC-Mutter
Registered User
Posts: 15
Joined: Wed Sep 25, 2002 4:13 am
Location: Georgia
Contact:

Huh?

Post by DSC-Mutter » Thu Sep 26, 2002 10:33 pm

OK guys I'm looking for a way to allow one of my forums have a different style form the rest of my forums.

I'm wondering if this is what I need to do that?

My forum is located at:
www.darkspireclan.net/msg


:?:
-Rick

jamjammo
Registered User
Posts: 35
Joined: Thu Jan 03, 2002 4:38 pm
Location: El Paso TX
Contact:

Post by jamjammo » Thu Sep 26, 2002 10:41 pm

ooohh geezzz ...

yall are gonna get sick of me, i know it. :roll:
i reinstalled a phpBb202 in a new forum directory using the same config.php file from my current forum. it works just fine.
this is a basic install with NO MODS other that the new or modified files to get this Hierarchy to work.

i go to my Control Panel and under Forum Admin, i click on Management.
that is this screen:
Image

but then i enter a new name for either a Category or a Forum, and it takes me to LOGIN WHEN I AM ALREADY LOGGED IN AS ADMIN?! i deleted my cookies and verified the cookie path was correct. so i doubt that is the issue:
Image

i am yet stumped again!
jamjammo ~
CEO, CFO, and founder of suncitystreetscene.NET
:-D

DoubleDoom
Registered User
Posts: 844
Joined: Wed Jun 26, 2002 6:48 pm

Post by DoubleDoom » Fri Sep 27, 2002 6:40 am

jamjammo, you have to login using the same domain stated in the cookie.

Using localhost or a sub-domain will not work.

AbelaJohnB
Former Team Member
Posts: 5674
Joined: Fri Jul 06, 2001 11:56 pm

Post by AbelaJohnB » Sat Sep 28, 2002 2:55 pm

Happy Developing Guys!


Hope the new 'MOD Beta Development' forum works out as planned, for everyone!



Thanks!

darktrunks
Registered User
Posts: 27
Joined: Sat Sep 21, 2002 3:53 am

Post by darktrunks » Sat Sep 28, 2002 11:25 pm

Ok I got this up, but when I got to the Admin Panel I get:

Parse error: parse error, expecting `')'' in admin_forums.php on line 576


Also I am messing the Mangment area one the Forum Admin(I think that is the one

DoubleDoom
Registered User
Posts: 844
Joined: Wed Jun 26, 2002 6:48 pm

Post by DoubleDoom » Sun Sep 29, 2002 7:52 am

darktrunks wrote: Ok I got this up, but when I got to the Admin Panel I get:

Parse error: parse error, expecting `')'' in admin_forums.php on line 576


Also I am messing the Mangment area one the Forum Admin(I think that is the one


Your line 576 and my line 576 are likely to be different.

Can you post the code for your line 56 and include about 5 lines either side please.

darktrunks
Registered User
Posts: 27
Joined: Sat Sep 21, 2002 3:53 am

Post by darktrunks » Sun Sep 29, 2002 4:27 pm

I believe you meant 576, so here it is. It is lines 560 to 580

Code: Select all

$viewforum = $phpbb_root_path."viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id";
				}
				
				$template->assign_block_vars("$current_block.forumrowh".($current_hierarchie-$start_hierarchie),	array(
					'FORUM_NAME' => $forum_rows[$j]['forum_name'],
					'FORUM_DESC' => $forum_rows[$j]['forum_desc'],
					'ROW_COLOR' => $row_color,
					'NUM_TOPICS' => $forum_rows[$j]['forum_topics'],
					'NUM_POSTS' => $forum_rows[$j]['forum_posts'],
//
// End function block
// ------------------

//
// Begin program proper
//
if( isset($HTTP_POST_VARS['addforum']) || isset($HTTP_POST_VARS['addcategory']) )
{
	$mode = ( isset($HTTP_POST_VARS['addforum']) ) ? "addforum" : "addcat";

	if( $mode == "addforum" )
	{

DoubleDoom
Registered User
Posts: 844
Joined: Wed Jun 26, 2002 6:48 pm

Post by DoubleDoom » Sun Sep 29, 2002 5:42 pm

You have missed some of the code out.:

Find:

Code: Select all


//
// End function block
// ------------------
add before:

Code: Select all


					'U_VIEWFORUM' => append_sid($viewforum),
					'U_FORUM_EDIT' => append_sid("admin_forums.$phpEx?mode=editforum&" . POST_FORUM_URL . "=$forum_id"),
					'U_FORUM_DELETE' => append_sid("admin_forums.$phpEx?mode=deleteforum&" . POST_FORUM_URL . "=$forum_id"),
					'U_FORUM_MOVE_UP' => append_sid("admin_forums.$phpEx?mode=forum_order&move=-1&" . POST_FORUM_URL . "=$forum_id"),
					'U_FORUM_MOVE_DOWN' => append_sid("admin_forums.$phpEx?mode=forum_order&move=1&" . POST_FORUM_URL . "=$forum_id"),
					'U_FORUM_RESYNC' => append_sid("admin_forums.$phpEx?mode=forum_sync&" . POST_FORUM_URL . "=$forum_id"),
					'U_FORUM_VIEWASROOT' => append_sid($u_forum_viewasroot),

					'L_FORUM_VIEWASROOT' => $l_forum_viewasroot)
				);
				
	      if ( $forum_rows[$j]['forum_issub'] && $current_hierarchie < $start_hierarchie + 2 )
				{
					typeout_hierarchie_recursive($category_rows, $forum_rows, $total_categories, $total_forums, $current_hierarchie+1, $forum_id, $start_hierarchie);
				}

			}// if ... forumid == catid
			
		} // for ... forums

	} // for ... categories
}
// DJ-End, 27.3.02

// DJ-Begin, 14.4.02
function typeout_hidden_posts($current_hierarchie = -1, $parent_forum_id = -1)
{
	global $db, $template, $phpEx;

	$sql = "SELECT CONCAT(c.cat_title, ', ', f.forum_name) AS cat_forum_title, f.forum_id, COUNT(*) AS total_posts
		FROM phpbb_forums f, phpbb_posts p, phpbb_categories c
		WHERE f.forum_issub = '1'
		AND p.forum_id = f.forum_id
		AND f.cat_id = c.cat_id
		AND f.forum_hier_level >= $current_hierarchie";
		
	if( $parent_forum_id > 0 && $current_hierarchie > -1 )
	{
		$foruminfo = get_info('forum', $parent_forum_id);
		$inferiorforums = get_list_inferior('forum', $foruminfo['cat_id']);
		$sql .= " AND f.forum_id IN ($inferiorforums)";
	}
	
	$sql .= " GROUP BY f.forum_name";
	
	if( !($result = $db->sql_query($sql)) || $db->sql_numrows($result) == 0)
	{
		$template->assign_block_vars("switch_nohiddenposts", array());
	}
	else
	{
		while( $row = $db->sql_fetchrow($result) )
		{
			$sql = "SELECT f.forum_id, f.forum_name, COUNT(*) AS total_topics
			FROM phpbb_forums f, phpbb_topics t
			WHERE f.forum_issub = '1'
			AND t.forum_id = f.forum_id
			GROUP BY f.forum_name";
	
			if( !($result2 = $db->sql_query($sql)) )
			{
				message_die(GENERAL_ERROR, 'Could not query hierarchie title', '', __LINE__, __FILE__, $sql);
			}
			$row2 = $db->sql_fetchrow($result2);

			$template->assign_block_vars("hiddenpostsrow", array(
				'FORUM_NAME' => $row['cat_forum_title'],
				'NUM_TOPICS' => $row2['total_topics'],
				'NUM_POSTS' => $row['total_posts'],
				'U_POSTS_DELETE' => append_sid("admin_forums.$phpEx?mode=deleteposts&" . POST_FORUM_URL . "=" . $row['forum_id']),
				'U_POSTS_MOVE' => append_sid("admin_forums.$phpEx?mode=moveposts&" . POST_FORUM_URL . "=" . $row['forum_id']))
			);
		}
	}
}
// DJ-End, 14.4.02

You were missing that chunk between the num_posts and the end function block.

darktrunks
Registered User
Posts: 27
Joined: Sat Sep 21, 2002 3:53 am

Post by darktrunks » Sun Sep 29, 2002 7:03 pm

Ok I inserted that code and I got the Managment page back and when I go there I get my Catagories and Forums and can create more Catagories and Forums. But when I go to create a new forum or edit a Forum. I get a list of options including "contains Sub-Categories" but it is grey and won't let me click on it.

I probably left something out again.

retroworld
Registered User
Posts: 144
Joined: Sun Apr 07, 2002 1:19 pm
Location: Die Niederlande!
Contact:

Post by retroworld » Tue Oct 01, 2002 6:13 pm

does anybody know whether this mod is compatible with the Stop Post Count From Increasing mod? which disabled the users post count to increase in some categories...

and is it safe to replace such large amounts of code as i read in the install file of hierarchies?? i've also got the Last Visit mod and the Default Avatar mod installed, will this be a problem??

ThaGangsta
Registered User
Posts: 12
Joined: Sun Sep 29, 2002 3:02 pm
Location: The Netherlands

Post by ThaGangsta » Tue Oct 01, 2002 7:58 pm

I became a little confused by reading all this :?
Which one do I really need for version 2.0.2??

Locked

Return to “[2.0.x] MODs in Development”