[DISC] Improved pseudo sub-forums MOD 1.0.6

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.
Locked
future assassin
Registered User
Posts: 34
Joined: Wed Apr 09, 2003 12:45 am

Post by future assassin » Sun Jul 24, 2005 11:32 pm

Took me about 30 min to do all the text changes. It worked fine on the stock 2.017. I tried the Simple Cats and although it was as easy to do as this one you have to change the forum listing template(after instalation) if you want your front page to look like the pseudo forums addon. At least this has been my experience.

Silke Buthmann
Registered User
Posts: 2
Joined: Mon Jul 25, 2005 7:59 am

Post by Silke Buthmann » Mon Jul 25, 2005 8:13 am

Hallo,
ich hoffe es gibt hier auch einige Deutschsprechende. Ich habe versucht mich mit meinem Schulenglisch hier durch zulesen, einiges konnte ich dann auch im Mod verändern.
Aber ich begreife nicht wie man das New Post Image auf dem Index bei den SubForen wegbekommt.
Ich finde es etwas störend das es auch bei eigenen Postings den Beitrag als neu kennzeichnet. Kann man das ändern? Oder kann man das Zeichen ganz aus den SubForen entfernen?
Wäre für eure Hilfe auf Deutsch sehr dankbar. :P

The Mod is very great!! :D

kc5hwb
Registered User
Posts: 258
Joined: Tue Apr 12, 2005 2:46 pm

Post by kc5hwb » Mon Jul 25, 2005 11:25 pm

This is a stupid question, but I am still learning PHP. :?

On the install instructions, what file is it talking about when it lists "SQL"?

Code: Select all

##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ SQL ]-------------------------------------------------
#
#       If your phpbb table prefix is different, then change it to
#      reflect the correct one.
#
#


	ALTER TABLE `phpbb_forums` ADD attached_forum_id MEDIUMINT(8) DEFAULT '-1' NOT NULL;
	
#
#-----[ OPEN ]------------------------------------------------
#
   /includes/functions.php


#
#-----[ FIND ]------------------------------------------------
#

function get_db_stat($mode)
{
The first section is a change in the SQL file. Where is this located?

User avatar
YellowGirls
Registered User
Posts: 168
Joined: Mon Apr 15, 2002 10:08 am

Post by YellowGirls » Tue Jul 26, 2005 8:31 am

Hi,

i installed this mod but i became the following error on index.php:

Code: Select all

Parse error: parse error, unexpected '}' in index.php on line 513
Any solution?

Yellow

User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3480
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Post by bonelifer » Tue Jul 26, 2005 11:06 am

SQL is the DATABASE lanaguage. In most cases it's going to be mySQL. You enter that stuff after:
#
#-----[ SQL ]-------------------------------------------------
#


In a database client such as phpmyadmin.
Knowledge Base | phpBB Board Rules | Search Customisation Database
Image
Please don't contact me via PM or email for phpBB support .

User avatar
Orphée
Registered User
Posts: 86
Joined: Sun Nov 10, 2002 9:31 pm
Location: France
Contact:

Post by Orphée » Wed Jul 27, 2005 9:39 am

hello all,


someone can try to move down or move up a forum in Forum Admin > Management ?

when I did it, it didn't work :cry:


EDIT => it's OK ;)
thanks

ActualFreebies
Registered User
Posts: 1
Joined: Wed Jul 27, 2005 8:35 pm

Post by ActualFreebies » Wed Jul 27, 2005 8:47 pm

Where do you create the subforums? In my Admin section, I don't see any additional functions after installing this mod. :| I followed the directions correctly and installed it with EasyMod. No errors or unprocessed commands showed up. I also ran the SQL query as directed by the readme file. I don't know what's wrong :[

Homeskillet
Registered User
Posts: 231
Joined: Thu Oct 07, 2004 5:00 am
Contact:

Post by Homeskillet » Wed Jul 27, 2005 10:38 pm

ActualFreebies wrote: Where do you create the subforums? In my Admin section, I don't see any additional functions after installing this mod. :| I followed the directions correctly and installed it with EasyMod. No errors or unprocessed commands showed up. I also ran the SQL query as directed by the readme file. I don't know what's wrong :


Are you creating a new forum to be a subforum? If so,
Go to admin control panel>forum management>create new forum
You should see the option to "attach" it to another forum.

If you are making an already existing forum a subforum just click on it to make changes and you should see the option to attach it.
...

KamilJ
Registered User
Posts: 5
Joined: Wed Jul 27, 2005 11:55 pm

Post by KamilJ » Thu Jul 28, 2005 12:01 am

I think that's wrong:


Code: Select all

IN INDEX.PHP


#-----[ FIND ]------------------------------------------------
#
			$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";
#
#-----[ REPLACE WITH ]----------------------------------------
#
   // Modified by Attached Forums MOD

			$sql = "SELECT f.*, p.post_time, p.post_username,  u.username, u.user_id, t.topic_id, t.topic_title
				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 )
				LEFT JOIN " . TOPICS_TABLE . " t ON t.topic_last_post_id = f.forum_last_post_id)
				GROUP BY f.forum_id ORDER BY f.cat_id, f.forum_order";
   // END Modified by Attached Forums MOD
It adds to SELECT: t.topic_id, t.topic_title.

t.topic_title you can use for display title of the last post (it's not necessary too but is used in mod), but t.topic_id is useless. I don't see any place in index.php where it's used. Am I wrong? It only makes additional MySQL work...

KamilJ
Registered User
Posts: 5
Joined: Wed Jul 27, 2005 11:55 pm

Post by KamilJ » Thu Jul 28, 2005 12:04 am

-deleted-

KamilJ
Registered User
Posts: 5
Joined: Wed Jul 27, 2005 11:55 pm

Post by KamilJ » Sat Jul 30, 2005 1:04 am

I discovered how to make jumpox working correctly...

Code: Select all

=OPEN=

functions.php


=FIND=

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


=AFTER ADD=

						if ($parent_lookup==$forum_rows[$j]['forum_id'])
						{
							$template->assign_block_vars('switch_parent_link', array() );

							$template->assign_vars(array(
								'PARENT_NAME' => $forum_rows[$j]['forum_name'],
								'PARENT_URL'=>append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$j]['forum_id'])
								));
						}


=FIND=

						$boxstring_forums .=  '<option value="' . $forum_rows[$j]['forum_id'] . '"' . $selected . '>' . $forum_rows[$j]['forum_name'] . '</option>';


=REPLACE WITH=

						$box_forum_name = ( $forum_rows[$j]['attached_forum_id'] != -1 ) ? '|------' . $forum_rows[$j]['forum_name'] : '|---' . $forum_rows[$j]['forum_name'];
						$boxstring_forums .=  '<option value="' . $forum_rows[$j]['forum_id'] . '"' . $selected . '>' . $box_forum_name . '</option>';


=FIND=

					$boxstring .= '<option value="-1">&nbsp;</option>';
					$boxstring .= '<option value="-1">' . $category_rows[$i]['cat_title'] . '</option>';
					$boxstring .= '<option value="-1">----------------</option>';


=REPLACE WITH=

					$boxstring .= '<option value="-1">|</option>';
					$boxstring .= '<option value="-1">|-' . $category_rows[$i]['cat_title'] . '</option>';
					$boxstring .= '<option value="-1">|----------------</option>';
Based on SubDog premodded version of PhpBB.

Enjoy :)



PS: If you want to turn off displaying last post title in index.php and viewforum.php (in which are subforums), PM me. It decrease MySQL work and makes forum faster.

User avatar
Orphée
Registered User
Posts: 86
Joined: Sun Nov 10, 2002 9:31 pm
Location: France
Contact:

Post by Orphée » Sat Jul 30, 2005 9:11 am

it's work to my board :)

but i already have

Code: Select all

=FIND=

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


=AFTER ADD=

                  if ($parent_lookup==$forum_rows[$j]['forum_id'])
                  {
                     $template->assign_block_vars('switch_parent_link', array() );

                     $template->assign_vars(array(
                        'PARENT_NAME' => $forum_rows[$j]['forum_name'],
                        'PARENT_URL'=>append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$j]['forum_id'])
                        ));
                  } 
(i skipped this part of installation)



i hope that niekas will include it in 1.0.7 :D
thanks

reddog
Registered User
Posts: 32
Joined: Wed Jul 21, 2004 3:51 pm
Location: France ^^
Contact:

Post by reddog » Sat Jul 30, 2005 9:47 am

reddog wrote: Another idea. I did it for my board, but the idea can interest you niekas. You can modify the jumpbox to have:

|-Category
|
|---Parent Forum
|------Subforum 1
|---Forum

etc... ;)


Yes, it's work. I have coded this function for my premodded SubDog, to display subforums in the JumpBox.

kc5hwb
Registered User
Posts: 258
Joined: Tue Apr 12, 2005 2:46 pm

Post by kc5hwb » Sat Jul 30, 2005 3:17 pm

Ok, I got mine installed and all seems to work fine except that the sub-forums just don't show up on the main index page. (so I guess it is not working fine, but I don't get any errors)

I go into the Admin Panel, into Forum admin, and I see the area where I can attach a new forum, or I have change an existing forum to attach to another, but when I do this, nothing happens. I got back to the index page and it looks the same as ever. Again, no errors and everything else seems to work fine, but they aren't attaching like the should.

Ideas?

jerryT
Registered User
Posts: 278
Joined: Fri Feb 25, 2005 12:04 pm

Post by jerryT » Sun Jul 31, 2005 7:01 pm

I like this MOD, but it doesn't seem to work with the Themes I have installed.

I installed in using Easymod, and it went well.. Just change to a different theme and NOWT !

Any Advice ! ??

Thanks

Locked

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