1

Topic: Sub Forum Mod 1.0

Some people requested it and i had some time over.

##
##
##        Mod title:  Sub Forum Mod
##
##      Mod version:  1.0
##   Works on PunBB:  1.2.6
##     Release date:  2005-08-11
##           Author:  pabb
##
##      Description:  This mod lets Administrators add subforums to forums.
##
##   Affected files:  index.php
##                    viewtopic.php
##                    viewforum.php
##                    admin_forums.php
##
##       Affects DB:  Yes
##
##            Notes:  Um.. none.
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##

Download: http://punres.org/viewtopic.php?id=594
Demo: http://stfu.frac.dk/mods/subforum/

Re: Sub Forum Mod 1.0

The "Last Post" column doesn't take into account the subforums, (there's one post in a subforum at 15:53, but the one posted in the 'forum' is what's shown and posted at 15:47)

At least in the demo forum wink

Other than that it looks nice smile

3

Re: Sub Forum Mod 1.0

nice mod.
weldone smile

4

Re: Sub Forum Mod 1.0

Frank H wrote:

The "Last Post" column doesn't take into account the subforums, (there's one post in a subforum at 15:53, but the one posted in the 'forum' is what's shown and posted at 15:47)

At least in the demo forum wink

Other than that it looks nice smile

Tnx, I might fix that if I make a new release smile

5 (edited by vibien 2005-08-17 22:19)

Re: Sub Forum Mod 1.0

Installation Help (readme.txt)
I can't find this Line in my forum.php (I changed index.php to forum.php before)

#
#---------[ 14. FIND (line: 191) ]---------------------------------------------
#


<?php echo $post_link ?>
        <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a> </li><li>» <?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></li></ul>


#
#---------[ 15. REPLACE WITH ]---------------------------------------------
#

Can you help me out?

Re: Sub Forum Mod 1.0

can see that only two times in "viewforum.php" (line 87 and line 246)

Re: Sub Forum Mod 1.0

hey the forum is sub forum comes on main page as well as asub forum what do i do

8

Re: Sub Forum Mod 1.0

Yeah The Same problem here
I made a 'Harry Potter' as a Sub Forum of 'Gossips'...But it Comes on the main Page too and as a Sub Forum under Gossips too!

Can any1 Help me ?

I start thinking from where you stop thinking!!!

9

Re: Sub Forum Mod 1.0

Anyone ?

I start thinking from where you stop thinking!!!

10

Re: Sub Forum Mod 1.0

There is one thing I miss in this modification, and it is to have the subforums sorted in alphabetical order.

Otherwise, this mod rox! smile

11 (edited by af3 2005-10-20 01:20)

Re: Sub Forum Mod 1.0

pabb wrote:
Frank H wrote:

The "Last Post" column doesn't take into account the subforums, (there's one post in a subforum at 15:53, but the one posted in the 'forum' is what's shown and posted at 15:47)

At least in the demo forum wink

Other than that it looks nice smile

Tnx, I might fix that if I make a new release smile

pabb -- do you have the fix for this?
In addition to the above (last post in the parent forum), the last post link in the subforum is showing this: ...viewtopic.php?pid=#p i.e. the post id (pid) is not fetched resulting in bad link.

These really cripple the forums links..

12 (edited by skoruppa 2005-10-20 17:52)

Re: Sub Forum Mod 1.0

very nice, but i need fix for last post and a fix for search (in search subforum is a forum).... PLS pabb HELP



sry for bad engilsh

Re: Sub Forum Mod 1.0

skoruppa wrote:

very nice, but i need fix for last post and a fix for search (in search subforum is a forum).... PLS pabb HELP

sry for bad engilsh

Hi for All...

You can download the newest version Sub Forum Mod 1.0.1. Fixed by NeoTall. All CopyRight by pabb.

Respects, NeoTall

Re: Sub Forum Mod 1.0

Is there a change file if we have the old one installed already?

Re: Sub Forum Mod 1.0

GameSource wrote:

Is there a change file if we have the old one installed already?

It is a changed file... I'm fiexed: "Last Post Link for SubForum" and "Displaing the word "Topics" on SubForum Header"...

Respects, NeoTall

Re: Sub Forum Mod 1.0

skoruppa wrote:

very nice, but i need fix for last post and a fix for search (in search subforum is a forum).... PLS pabb HELP

sry for bad engilsh

My forum have version 1.2.9 and Sub Forum Mod 1.0.1... The search is working fine...

Respects, NeoTall

Re: Sub Forum Mod 1.0

GameSource wrote:

Is there a change file if we have the old one installed already?

I'm so sorry for my previous answer... I'm bad speak English...

The changes between 1.0 and 1.0.1:

FIND IN viewforum.php LINES:
$subforum_result = $db->query('SELECT forum_desc, forum_name, id, last_post, last_post_id, last_poster, moderators, num_posts, num_topics, redirect_url FROM '.$db->prefix.'forums WHERE parent_forum_id='.$id) or error('Unable to fetch sub forum info',__FILE__,__LINE__,$db->error()); #ADD BOLD TEXT
if($db->num_rows($subforum_result))
{
?>
<div class="linkst">
    <div class="inbox">
        <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a> </li><li>» <?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></li></ul>
        <div class="clearer"></div>
    </div>
</div>

<div id="vf" class="blocktable">
    <h2><span>Sub forums</span></h2>
    <div class="box">
        <div class="inbox">
            <table cellspacing="0">
            <thead>
                <tr>
                    <th class="tcl" scope="col"><?php echo $lang_common['Forum'] ?></th>
                    <th class="tc2" scope="col"><?php echo $lang_common['Topics'] ?></th> # REPLACE $lang_common -> $lang_index
                    <th class="tc3" scope="col"><?php echo $lang_common['Posts'] ?></th>
                    <th class="tcr" scope="col"><?php echo $lang_common['Last post'] ?></th>
                </tr>
            </thead>
            <tbody>
<?php

Thats ALL...

Respects, NeoTall

18

Re: Sub Forum Mod 1.0

how abt fix for the last post in the parent forum?

Re: Sub Forum Mod 1.0

Thank you very much NeoTall for the update!

Re: Sub Forum Mod 1.0

Hi for ALL...

You can download the newest version Sub Forum Mod 1.0.2. Fixed by NeoTall. All CopyRight by pabb.

History:
                      in version 1.0.2
                       - Correctly displaying Last Post, Last Poster and Last Posted Time
                       - Correctly displaying Total Topics and Total Posts
                      in version 1.0.1
                       - Correctly creating Last Post link
                       - Correctly displaying word "Topics" on SubForum header

Respects, NeoTall

21

Re: Sub Forum Mod 1.0

Thanks neotall.. this fixes the last forum on parent id!

Re: Sub Forum Mod 1.0

Hi for ALL...

You can download the newest version Sub Forum Mod 1.0.3. Fixed by NeoTall. All CopyRight by pabb.

History:
                      in version 1.0.3
                       - Fixed search in SubForum when using "Non-MultiByted" language
                      in version 1.0.2
                       - Correctly displaying Last Post, Last Poster and Last Posted Time
                       - Correctly displaying Total Topics and Total Posts
                      in version 1.0.1
                       - Correctly creating Last Post link
                       - Correctly displaying word "Topics" on SubForum header

Respects, NeoTall

23 (edited by NeoTall 2005-10-25 18:06)

Re: Sub Forum Mod 1.0

Hi for ALL...

Update Sub Forum MOD links:
      Sub Forum Mod v.1.0.4 (without Addon "Last Post Link")
      Sub Forum Mod v.1.0.4 (with Addon "Last Post Link")
      Sub Forum Mod v.1.0.3 (without Addon "Last Post Link")
      Sub Forum Mod v.1.0.3 (with Addon "Last Post Link")

History:
      in version 1.0.4
         - Fixed items in combobox "Select where to search"
      in version 1.0.3
         - Fixed search in SubForum when using "Non-MultiByted" language
      in version 1.0.2
         - Correctly displaying Last Post, Last Poster and Last Posted Time
         - Correctly displaying Total Topics and Total Posts
      in version 1.0.1
         - Correctly creating Last Post link
         - Correctly displaying word "Topics" on SubForum header

Fixed by NeoTall. All CopyRight by pabb.

Respects, NeoTall

Re: Sub Forum Mod 1.0

Would it be possible for you to give a small txt document with changes between each version, so I don't have to go back and look at all the files to see what has changed?

25

Re: Sub Forum Mod 1.0

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