[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
Merri
Registered User
Posts: 255
Joined: Mon Nov 25, 2002 1:08 pm
Location: Riihimäki, Finland
Contact:

Post by Merri » Tue May 03, 2005 1:12 am

In the administration panel, where you normally add forums. When creating one, there is a new slot where you can set the mother forum for the new subforum. By default it says -1, meaning it won't be a subforum.

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

Post by niekas » Tue May 03, 2005 1:21 am

Merri wrote: Ah, didn't notice the $i there, thanks. Should have had more categories so I'd have noticed it myself.

At the moment I'm ironing out your code in viewforum.php, I've already fixed and optimized a few things, though not done with it. I'm also including a new feature: categories will be visible so that subforums of different categories sort out correctly. I have some new features in index.php as well. I'll post the code when I'm done so you can see what you might want to change :)

I'm not sure what is it this new feature. Are you refering how subforums are sorted on viewforum?

Merri wrote: In the administration panel, where you normally add forums. When creating one, there is a new slot where you can set the mother forum for the new subforum. By default it says -1, meaning it won't be a subforum.


in 1.0.5 you have drop down box that lists all attachable forums (meaning they are in the same category and are not attached to other forums).

It will not display drop down box If forum is a parent - instead it displays checkbox with an option to detach subforums.

There are a few more safeguards for common pitfalls.

I have an idea to combine category drop down select field and attach forum drop down select field so it would be less confusing. I'll see if it's more intuitive.

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

Post by chesster » Tue May 03, 2005 1:40 am

niekas wrote:
chesster wrote:Right now even though on paper the mod can only have 1 level of hierarchy ( you can't have sub-subforum). However, a forum CAN attach to another forum which is already a subforum of something else. The topic/thread count however isn't counted properly.

Another suggestion:

+ This should not be allowed. It isn't in the spec. And it may have consequences.


Overall, it's a good mod. THanks.


1.0.5v doesn't allow you to attach forum to subforum. It is impossible through ACP.

What is wrong with topic thread count?



I have version 1.0.4 I think, and it allows me to create a sub-forum (say A) of a sub-forum (say B). In other words, it's 2 levels deep. However, the thread/topic count of B does not include those of A.

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

Post by Merri » Tue May 03, 2005 3:28 am

Yup, a removed feature by now. If you want, I might release my own variation of this mod later on, which might allow to make subforums of subforums and they show up as espected. I don't promise anything though... that isn't high on my priority list as I'm mainly changing my own forum to fit what I need.


niekas: I think I found a bug: a category shows up on index even though it has no visible forums (because they're all acting as subforums). Or I guess you've fixed that in 1.0.5, leaving that to be my problem. The feature I have: http://konnun.vihrealohikaarme.com/viewforum.php?f=1 - as you can see, categories!

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

Post by reddog » Tue May 03, 2005 9:10 am

Little contribution, how to add a separator if a forum contains more than one subforum (comma here) ;) :

Code: Select all

#
#-----[ OPEN ]------------------------------------------------
#
index.php
#
#-----[ FIND ]------------------------------------------------
#
'L_FORUM_IMAGE' => $attached_forums[$k]['sub_alt'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_ATTACHED_SEP' => ($k == $attached_forum_count-1) ? '' : ', ',
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/index_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
{catrow.forumrow.switch_attached_forums.attached_forums.FORUM_NAME}</a>
#
#-----[ IN-LINE FIND ]----------------------------------------
#
{catrow.forumrow.switch_attached_forums.attached_forums.FORUM_NAME}</a>
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
{catrow.forumrow.switch_attached_forums.attached_forums.L_ATTACHED_SEP}
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM
I think that it's good with the original code by niekas, because I modified it on my board.

Small idea, to add the name of the parent forum in the navigation links (at the top of the page) when we are in a subforum (example):

phpBB Forum Index -> Parent Forum -> Subforum

loosh
Registered User
Posts: 14
Joined: Tue Apr 19, 2005 2:09 am

Post by loosh » Tue May 03, 2005 4:25 pm

THanks I just ocrrected the code problem and now I can view the tab.

soulcreeper
Registered User
Posts: 28
Joined: Wed Apr 06, 2005 8:08 am
Location: Breda, NL
Contact:

Post by soulcreeper » Tue May 03, 2005 9:28 pm

hi there,
how can i make the topic-subject names be gone again, just like it used to be?
now it shows like this > http://forum.soulcreeper.net
the subjects are above the last poster name and date. how can i get rid of the subject again? only the subject has to be gone, the date and user can remain
I'm just good at being the best ®

Trucido
Registered User
Posts: 22
Joined: Sun Apr 10, 2005 10:39 pm
Contact:

Post by Trucido » Wed May 04, 2005 12:51 am

Cool mod. I love it!

soulcreeper
Registered User
Posts: 28
Joined: Wed Apr 06, 2005 8:08 am
Location: Breda, NL
Contact:

Post by soulcreeper » Wed May 04, 2005 8:17 am

soulcreeper wrote: hi there,
how can i make the topic-subject names be gone again, just like it used to be?
now it shows like this > http://forum.soulcreeper.net
the subjects are above the last poster name and date. how can i get rid of the subject again? only the subject has to be gone, the date and user can remain
]
got it already :D
I'm just good at being the best ®

da_badtz_one
Registered User
Posts: 376
Joined: Thu Jan 29, 2004 8:25 pm

Post by da_badtz_one » Wed May 04, 2005 9:43 am

There seems to be considerably a huge amount of process with the index file. Before I installed version 1.0.3 the page generation and SQL generation was under .3 of a second and .08 for SQL time. Now it's over 1.4 for both generation time and SQL time.

I see that this could be caused by the querying of the topic title details.

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

Post by niekas » Wed May 04, 2005 10:45 am

da_badtz_one wrote: There seems to be considerably a huge amount of process with the index file. Before I installed version 1.0.3 the page generation and SQL generation was under .3 of a second and .08 for SQL time. Now it's over 1.4 for both generation time and SQL time.

I see that this could be caused by the querying of the topic title details.


This mod doesn't use any extra SQL queries on index page. It only joins topics table in already existing query in the same fashion phpbb joins posts & user tables to get last post info. The generation speed is pretty much the same.

Try loading modded and unmodded index side by side and see if you notice the difference in real time - generation time could be affected by server load (also such stats are especially unreliable on my windows server).

If it is really a mod that slowing down index you can try adding index to topic_last_post_id column in topics table.

[Edit]

You are right - it does slowdown, because topic_last_post_id is not indexed.

execute this query in your mysql db:

Code: Select all

ALTER TABLE `phpbb_topics` ADD INDEX ( `topic_last_post_id` ) 
My speed if not indexed ~ 1 seconds
If indexed ~ 0.05 - 0.07 seconds
Last edited by niekas on Wed May 04, 2005 11:40 am, edited 2 times in total.

Aldri
Registered User
Posts: 11
Joined: Sat Apr 23, 2005 10:24 pm

Post by Aldri » Wed May 04, 2005 11:29 am

yeah i find that my index page is slower with this mod (version 1.0.4 actually) but it doesn't bother me much lol

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

Post by niekas » Wed May 04, 2005 11:37 am

Aldri wrote: yeah i find that my index page is slower with this mod (version 1.0.4 actually) but it doesn't bother me much lol


Do this:

Code: Select all

ALTER TABLE `phpbb_topics` ADD INDEX ( `topic_last_post_id` ) 
I had this column indexed before for another mod so it didn't notice slowdown..

It should fix speed issue.

Aldri
Registered User
Posts: 11
Joined: Sat Apr 23, 2005 10:24 pm

Post by Aldri » Wed May 04, 2005 12:13 pm

doesn't seem to change anything to the speed :)

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

Post by niekas » Wed May 04, 2005 1:15 pm

Aldri wrote: doesn't seem to change anything to the speed :)


Do you have other mods installed? How big is your board? What is the rendering speed without mod and with mod?

Locked

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