Re: Sub Forum Mod 1.0

Becca wrote:

It looks great, thanks so much, but perhaps you could include an option to display the subforums on the main/index page.

You can do it yourself...
Go to: "Admin Panel -> Forums -> Edit (your forum with subforums) -> Description (HTML)"...
You can add links for SubForums in "Description (HTML)". Format: <b>Sub Forums: </b><a href=http://YOUR_FORUM_PATH/viewforum.php?id=SUBFORUM_ID>SUBFORUM NAME</a>

Respects, NeoTall

27

Re: Sub Forum Mod 1.0

is there a way where we can have the best of both worlds, and have this mod work with the mark as read forums mod? i had to "replace" an entire area where i previously modded my forums so the threads would be marked, indicating a user has read that post already, and no new posts were made...

Re: Sub Forum Mod 1.0

Having some trouble here:

well, i apply the mod according with the readme file. Before, the forum have a bunch of forums and categories, and after apply the mod, only one forum and one category:

Image:
http://img211.imageshack.us/img211/8577/forum7gm.jpg

Maybe a Mod Corruption?

Thanks in advance.

Re: Sub Forum Mod 1.0

Very nice work NeoTall, thanks for the effort!  One thing I would like to see would be the subforum parent to display when there is a new post in one of the subforums.

Re: Sub Forum Mod 1.0

If I would like to make all the 'subforums' topics to appear in the 'forum' itself instead of having to go under the 'subforums' section to see them, would that be possible with that mod ?  IF not, how could I ?

So it would be a way to sort my topics instead of really separating the topics from the general forum.

An example of what i want :
http://forumz.tomshardware.com/hardware/forum-c2.html
The 'General motherboard' forum is categorized in 'brand' subforums (or category), but when you open the 'General Motherboard' forum you can see all posts from different brands.

A new poker community is rising : see for yourselft at unbluffed.com

Re: Sub Forum Mod 1.0

Someone listening?

A new poker community is rising : see for yourselft at unbluffed.com

32 (edited by Stifler 2006-03-19 07:37)

Re: Sub Forum Mod 1.0

Could someone make this for the gallery as well?

33 (edited by nectere 2006-03-20 16:39)

Re: Sub Forum Mod 1.0

Hey freddykgb  -

oh I finally found it, you have to create new forum edit it and then assign it a parent. yay I am not blind!

Re: Sub Forum Mod 1.0

nectere wrote:

Hey freddykgb  -

oh I finally found it, you have to create new forum edit it and then assign it a parent. yay I am not blind!

New forum edit?  What do you mean ?
And how can I assign it tot the parent one?

Thanks for helping nectere!

A new poker community is rising : see for yourselft at unbluffed.com

Re: Sub Forum Mod 1.0

Edit your forums freddykgb, you will see a new field that says parent, that is how you assign it as a subforum, sadly though you wont get what you wanted to see in your pic you posted, even with the collapsable category mod, instead they will be kinda hidden until you click on the forum and then you will see all the subs.

Re: Sub Forum Mod 1.0

Woaaah...  could someone transcript this in easy tutorial for the php newbie of me!

A new poker community is rising : see for yourselft at unbluffed.com

Re: Sub Forum Mod 1.0

freddykgb, I dont think this mod does what you are looking for. I can not see my subforums under my forums until I click on them, only then can I see that there are subforums. So no one even knows they are there until they click on them. *sniff, not what I wanted*

What I mean above is that I could not find the place to even create a subforum, I finally found it by editing a forum and that is where I saw I could make it a subforum of something else.

Re: Sub Forum Mod 1.0

That is what i was explaining before.  Let's mod this mod!

A new poker community is rising : see for yourselft at unbluffed.com

Re: Sub Forum Mod 1.0

Does this SubForum Support on PunBB (1.2.11)? because I was try to install and get this error

You are running a version of PunBB (1.2.11) that this mod does not support. This mod supports PunBB versions: 1.2.6, 1.2.7, 1.2.8, 1.2.9

Please help, and Thanks

__________________
Fitria Rich - Let's Talk

40 (edited by nectere 2006-03-23 14:11)

Re: Sub Forum Mod 1.0

jauhari, just add your version number in the install mod.php, its really easy.

Freddygb adding the html code in the description gets them to show up, but there is still the issue of it not displaying the number of topics or replies. I tried to add nico_somb's sub forum mod on top of this one but so far I have had no luck at all, I dont read french and because my phps are already modded I having a difficult go at it, perhaps you will have more luck?

41

Re: Sub Forum Mod 1.0

I have it working. One question.. is it possible to show on the main page that a new topic was posted in the sub forum? I used your HTML idea so that you can see the subforum on the main page, but there is noway to tell from the main page that a new topic has been posted.

42 (edited by bozer 2006-03-28 20:33)

Re: Sub Forum Mod 1.0

EDIT: I figured it out. I missedited the search.php file. I am teh suck

Anyone else notice the search function doesnt work properly after installing this? It doesnt let me search the entire forum anymore, but I can search seperate forums. Sigh

Re: Sub Forum Mod 1.0

Firstly Hi, been playing with PunBB for the last few days and loving it so far.

Anyway, I've installed this mod 1.0.4 with Last Topic Link but it wasn't showing the subforum posts on the index page, the post counts went up correctly but Last Post details where incorrect. So in good fashion I hit the source code to figure out why, quite a simple fix so I'm not sure if I missed this somehow after trying the install twice.

Basically, in index.php the routine that checks for the last post still uses $cur_forum['last_post'] which based off the last query run does not include any sub forums, this needs to be changed to $l_post which is setup through some for loops previous.

So change the line...

if ($cur_forum['last_post'] != '')

to

if ($l_post != '')

It around about line 162 in index.php

This should now display the last post details correctly taking into account sub forums.

Again appologies if this is something I've overlooked while installing, but if it helps anyone else with the problem then thats the main thing I guess. Now to figure out why Modern BBCode doesn't paste the smilie code when you use the 'more...' popup window.

Re: Sub Forum Mod 1.0

nectere wrote:

Freddygb adding the html code in the description gets them to show up

What did u mean by 'adding the html code in the description' ?  Did you finally managed to get this work?

A new poker community is rising : see for yourselft at unbluffed.com

Re: Sub Forum Mod 1.0

Ajandurah wrote:

Firstly Hi, been playing with PunBB for the last few days and loving it so far.

Anyway, I've installed this mod 1.0.4 with Last Topic Link but it wasn't showing the subforum posts on the index page, the post counts went up correctly but Last Post details where incorrect. So in good fashion I hit the source code to figure out why, quite a simple fix so I'm not sure if I missed this somehow after trying the install twice.

Basically, in index.php the routine that checks for the last post still uses $cur_forum['last_post'] which based off the last query run does not include any sub forums, this needs to be changed to $l_post which is setup through some for loops previous.

So change the line...

if ($cur_forum['last_post'] != '')

to

if ($l_post != '')

It around about line 162 in index.php

This should now display the last post details correctly taking into account sub forums.

Again appologies if this is something I've overlooked while installing, but if it helps anyone else with the problem then thats the main thing I guess. Now to figure out why Modern BBCode doesn't paste the smilie code when you use the 'more...' popup window.

Good to see you are enjoying punBB. 

Does you mod on line 162 work ? What does it show exactly?
-

A new poker community is rising : see for yourselft at unbluffed.com

46 (edited by Ajandurah 2006-04-06 11:32)

Re: Sub Forum Mod 1.0

freddykgb wrote:

Good to see you are enjoying punBB.

It's fantastic actually, really easy to follow the code and alter it to do what I want rather than being stuck with what someone else thinks is the best way of doing things. Gotta love the speed too big_smile 

freddykgb wrote:

Does you mod on line 162 work ? What does it show exactly?

It displays the last post summary on the forums index page taking into account any sub forums that exist. ie:

http://img137.imageshack.us/img137/193/stirindexoff5kv.gif
Was the default look after I installed the mod originally. The forum Xennate has a sub forum with 2 topics posted, the post count is correct but there is no last post summary, it is left blank.

http://img88.imageshack.us/img88/4313/stirindexon6pz.gif
This is what it looks like after the tweak detailed in the last post. The post count is still correct but now you also have the last post summary like the rest of the forums that have no sub forum.

http://img137.imageshack.us/img137/5743/stirforum7hz.gif
Stir is the sub forum in Xennate as you can see from this shot.

Your's will no doubt look different asthetically since I've been hacking away at various elements to change the way the punbb looks to some extent, thats nothing special though mearly just css and some template/php changes.

Suppose I should add that these forums are for a mud hence the odd forum names tongue

Re: Sub Forum Mod 1.0

http://openwings.co.nr

My "Forums" won't show up on my portal :S

[img]http://img90.imageshack.us/img90/746/scripter8ko.png[/img]
http://openwings.co.cc

48 (edited by duffry 2006-09-14 09:42)

Re: Sub Forum Mod 1.0

Is it just me or is this download link broken (in OP)?

I'm interested in adding sub forums to my site but am having trouble finding an existing mod.
sad

Re: Sub Forum Mod 1.0

duffry, I am checking this out for the first time too. I found more here:
http://www.punres.org/viewtopic.php?id=594&p=3

I wish I could see an example of this running on someone's site.... anyone?
Cheers,
TwoHawks

TwoHawks
Love is the Function
No Form is the Tool

50 (edited by binjured 2006-10-10 00:35)

Re: Sub Forum Mod 1.0

There is a horribly coded loop in this mod that runs a separate query for every forum you have and is based on MAX(id) that in reality can quickly become meaningless.  In index.php (MODDED):

REPLACE

$sfdb = array($_parent_id_, $_topics_, $_posts_, $_last_post_id_, $_last_poster_, $_last_post_);
$subforum = $db->query('SELECT MAX(id) FROM '.$db->prefix.'forums') or error('Unable to fetch sub forum info',__FILE__,__LINE__,$db->error());
for ($i = 0; $i < $db->result($subforum)+1; $i++)
{
 $forums_info = $db->query('SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post FROM '.$db->prefix.'forums WHERE id='.$i) or error('Unable to fetch sub forum info',__FILE__,__LINE__,$db->error());
 $current = $db->fetch_assoc($forums_info);
 if ($current['parent_forum_id'] != 0)
  {
   $sfdb[$i][0] = $current['parent_forum_id'];
   $sfdb[$i][1] = $current['num_topics'];
   $sfdb[$i][2] = $current['num_posts'];
   $sfdb[$i][3] = $current['last_post_id'];
   $sfdb[$i][4] = $current['last_poster'];
   $sfdb[$i][5] = $current['last_post'];
  }
}

WITH

$i=0;
$sfdb = array($_parent_id_, $_topics_, $_posts_, $_last_post_id_, $_last_poster_, $_last_post_);
$forums_info = $db->query('SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post FROM '.$db->prefix.'forums') or error(implode($db->error(),''),__FILE__,__LINE__,$db->error());
while($current = $db->fetch_assoc($forums_info)) {
 if ($current['parent_forum_id'] != 0)
  {
   $sfdb[$i][0] = $current['parent_forum_id'];
   $sfdb[$i][1] = $current['num_topics'];
   $sfdb[$i][2] = $current['num_posts'];
   $sfdb[$i][3] = $current['last_post_id'];
   $sfdb[$i][4] = $current['last_poster'];
   $sfdb[$i][5] = $current['last_post'];
  }
$i++;
}

And this is a good time to note:  after installing mods CHECK YOUR QUERIES AND QUERY COUNT!  After fixing this code block I went from 61 queries on index.php to 12.;