[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
User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3492
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Post by bonelifer »

Would't it be better to use phpBB method of releasing such code. They suggest such code be put into a seperate mod in the "addon" directory.
niekas wrote:
B€RN@RD wrote:hello,

could it be possible to show in the sub_forums list the moderators of the sub_forums like in the index.

thks

regards
b€rn@rd


We alredy discussed this.

Maybe in the next version i'll add commented code to query moderators, so people could uncommented it to display moderators.

niekas
Registered User
Posts: 562
Joined: Sun Sep 23, 2001 7:34 am

Post by niekas »

ArkServer wrote: I got a problem with the index.php


http://arkserver.servehttp.com/forum/index.php

you see this:
0 Users active 0 Users active 0 Users active 0 Users active 0 Users active 0 Users active 0 Users active 0 Users active 0 Users active 0 Users active

at the top of the forums. :S any idea why?


Looks fine to me. Did you fix it already?
bonelifer wrote: Would't it be better to use phpBB method of releasing such code. They suggest such code be put into a seperate mod in the "addon" directory.


You're right. Basically it's not even a mod - just copying chunk of code from index.php.

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

Post by bonelifer »

Yeah, but there have been several "mods" either you or someone else has suggested. I thought it might be good to add these to the addon directory as mods for people who want to use them. It would be easier than saying go to page 3 of the topic.

ArkServer
Registered User
Posts: 40
Joined: Thu May 05, 2005 11:52 pm

Post by ArkServer »

niekas wrote:
ArkServer wrote:I got a problem with the index.php


http://arkserver.servehttp.com/forum/index.php

you see this:
0 Users active 0 Users active 0 Users active 0 Users active 0 Users active 0 Users active 0 Users active 0 Users active 0 Users active 0 Users active

at the top of the forums. :S any idea why?


Looks fine to me. Did you fix it already?
bonelifer wrote: Would't it be better to use phpBB method of releasing such code. They suggest such code be put into a seperate mod in the "addon" directory.


You're right. Basically it's not even a mod - just copying chunk of code from index.php.


yes fixed :D

btw, i cant add another forum into another little hard to explain

-->
Forum 1, sub forum1 , subforum2
i cant get another subforum attached into subforum1 :S

is this possible?

niekas
Registered User
Posts: 562
Joined: Sun Sep 23, 2001 7:34 am

Post by niekas »

ArkServer,

Not possible yet. The subforum tree goes only one level deep (that is why its called "pseudo").

Code: Select all

Parent forum
\______Child forum (subforum)
            \_____Child of a Child forum (subforum 2) --- Not implemented

chesster
Registered User
Posts: 37
Joined: Tue Apr 05, 2005 3:25 am

Post by chesster »

niekas wrote: ArkServer,

Not possible yet. The subforum tree goes only one level deep (that is why its called "pseudo").

Code: Select all

Parent forum
\______Child forum (subforum)
            \_____Child of a Child forum (subforum 2) --- Not implemented



From a 'philosophical' point of view (of mine), 2 or more levels deep should not be implemented. Why? Each phpbb's thread is only one level deep, unlike other designs in which each thread is abstractly a full-blown tree. This simplicity has many virtues. So in some way, designing a hierarchy which turns forums into full-blown trees defeats the simplicity of the design.

chesster
Registered User
Posts: 37
Joined: Tue Apr 05, 2005 3:25 am

Post by chesster »

This mod fixes the HIDDEN forum, BUT .... the in the non-HIDDEN forums the subforums don't show correctly. The parent's name appears *twice*; i.e.

Forum Index -> Parent forum -> Parent forum -> sub forum


niekas wrote:
chesster wrote:I just installed 1.06. Everything works fine except ....... The parent of a subforum doesn't show in the viewforum when the forum is PRIVATE and HIDDEN, or MODERATOR and HIDDEN.


Any quick fix ???? ?Thanks.


Fixed bug (this assumes that make_jumpbox() wasn't modified by the mod):

Code: Select all


#
#-----[ OPEN ]------------------------------------------------
#
   /includes/functions.php

#
#-----[ FIND ]------------------------------------------------
#
function make_jumpbox($action, $match_forum_id = 0)
{
	global $template, $userdata, $lang, $db, $nav_links, $phpEx, $SID;


#
#-----[ AFTER, ADD ]------------------------------------------
#
	global $parent_lookup;


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


#
#-----[BEFORE, ADD ]------------------------------------------
#
						if ($parent_lookup==$forum_rows[$j]['forum_id'] && !$assigned)
						{
							$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'])
								));
							$assigned=TRUE;
						}

chesster
Registered User
Posts: 37
Joined: Tue Apr 05, 2005 3:25 am

Post by chesster »

This is the code of the relevant part in functions.php . It's probably some if-then-else is needed to straighten up.

Code: Select all

                                       if ($parent_lookup==$forum_rows[$j]['forum_id'] && !$assigned)
                                        {
                                                $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'])
                                                        ));
                                                $assigned=TRUE;
                                        }
                                        if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$j]['auth_view'] <= AUTH_REG )
                                        {
                                                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'])
                                                                ));
                                                }
                                                
//                                              if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $is_auth[$forum_rows[$j]['forum_id']]['auth_view'] )
//                                              {
                                                $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>';

                                                //
                                                // 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[$j]['forum_id']] = array (
                                                        'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$j]['forum_id']),
                                                        'title' => $forum_rows[$j]['forum_name']
                                                );
                                                                
                                        }
                                }

niekas
Registered User
Posts: 562
Joined: Sun Sep 23, 2001 7:34 am

Post by niekas »

chesster,

remove this code from jumpbox function (you're assigning it twice):

Code: Select all

 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'])
                                                                ));
                                                } 

caspert_ghost
Registered User
Posts: 199
Joined: Thu Apr 21, 2005 1:58 pm
Location: China
Contact:

Post by caspert_ghost »

niekas wrote: You can check it here in action: http://www.freedomlist.com/forum


Did you change your boards?
Why?

I am considering downloading your mod but your linked site is NOT sub forums.... please advise.

niekas
Registered User
Posts: 562
Joined: Sun Sep 23, 2001 7:34 am

Post by niekas »

caspert_ghost wrote:
niekas wrote: You can check it here in action: http://www.freedomlist.com/forum


Did you change your boards?
Why?

I am considering downloading your mod but your linked site is NOT sub forums.... please advise.


It is subforums. What do you mean?

There are plenty of links in this threads to other websites that have installed this subforum mod.

caspert_ghost
Registered User
Posts: 199
Joined: Thu Apr 21, 2005 1:58 pm
Location: China
Contact:

that is sub?

Post by caspert_ghost »

I went to all of the sites and they look just like what came with phpbb...
creat forums on one page click on them and have topics there....
if that is the case then sub forums is not what I am in need of.

I need the ability to actully have different forums, in different languages.
was hoping Sub forums would do this.
Guess not. thank you anyways.

User avatar
Merri
Registered User
Posts: 255
Joined: Mon Nov 25, 2002 1:08 pm
Location: Riihimäki, Finland
Contact:

Post by Merri »

caspert_ghost: do you mean that the language changes based on the forum user is in? I don't know a MOD that does that, but I do have a forum myself with different language forums within it... just basically named them French and Spanish and that is basically what people talk there. Seems to be working like that. With subforums, you could just add subforums for certain languages under a certain forum. For example:

General Discussion
Subforums: Chinese, Finnish, French, German, Italian, Japanese, Portuguese, Spanish

The forum itself would be in English of course, unless you install a MOD that sniffs the language of the browser user is using... there is also a MOD that adds a dropdown box where you can choose the language to use as a guest. Can't remember the names of the MODs, sorry.

caspert_ghost
Registered User
Posts: 199
Joined: Thu Apr 21, 2005 1:58 pm
Location: China
Contact:

Post by caspert_ghost »

Yes I got the drop down box and am in the process is altercating it into flags and moving it to the righ (rather than the left)
If it works I would be happy to share it with you....


But what I wanted was like this:


Main index 2 forums going to the topic area:
English --->Sub Forum ---> Topics
Chinese--->Sub Forum --->Topics

clicking on one of them would take you to the sub forum area where the topics are (curently the forum and Sub forum are all on the main page...)ie here on phpbb.com there are:

General
topic
phpbb
topic
phpbb modifications
topic
etc

but all the topics are under them I actualy wanted these on another page.

Rajjz
Registered User
Posts: 64
Joined: Sun Mar 27, 2005 7:57 pm

Post by Rajjz »

##********IMPORTANT *****
## Execute this query from phpMyAdmin because Easy Mod can't handle it for some reason
##
## ALTER TABLE `phpbb_topics` ADD INDEX (topic_last_post_id);


what the hell is query? and whats phpMyadmin? dont understand how to install it at all.

Locked

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