[Beta] Subforums Plus

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.
User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: [Beta] Subforums Plus

Post by D¡cky » Tue Mar 20, 2007 3:49 am

ewelin wrote: Dicky,

Any update on getting this to work with the keep unread flags mod as mentioned perviously?

No, there is no update yet.
Have you hugged someone today?

e-mo
Registered User
Posts: 90
Joined: Tue Oct 01, 2002 2:54 pm

Re: [Beta] Subforums Plus

Post by e-mo » Fri Mar 23, 2007 3:02 pm

Hi Dicky..

could you please give me some feedback regarding my issue? I already posted this issue on your forum which was unfortunately also not replied :S

would appreciate your feedback a lot,

e-mo
...with great power...comes great responsibilities...

Looking help for this Mod Problem: http://www.phpbb.com/community/viewtopi ... &start=165

User avatar
shaykana
Registered User
Posts: 108
Joined: Mon Sep 04, 2006 12:11 am
Location: Canada
Contact:

Re: [Beta] Subforums Plus

Post by shaykana » Sat Mar 24, 2007 2:12 am

I'm assuming that I need to add some code in template/viewforum_body.php in order to get the Subforum to view properly in Glass2. I know Simple Subforums worked, but it had a bunch of code that was removed for Subforums Plus. Is there an IF statement or something that could make it work?

I know you're busy with a lot of other things too Dicky. No rush on this, I'm in no hurry.

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: [Beta] Subforums Plus

Post by D¡cky » Sat Mar 24, 2007 4:01 am

e-mo wrote: Hi Dicky..

could you please give me some feedback regarding my issue? I already posted this issue on your forum which was unfortunately also not replied :S

would appreciate your feedback a lot,

e-mo
I don't have an answer to your question. It is going to take me some time to correct the issue.

shaykana wrote: I'm assuming that I need to add some code in template/viewforum_body.php in order to get the Subforum to view properly in Glass2. I know Simple Subforums worked, but it had a bunch of code that was removed for Subforums Plus. Is there an IF statement or something that could make it work?

I know you're busy with a lot of other things too Dicky. No rush on this, I'm in no hurry.

There is no code to be added to viewforum_body.tpl. Code has to be placed in index_body.tpl.

Since you had Simple Subforums, I assume that you are using eXtreme Styles? If that is the case, I will work on the X version of Glass2.
Have you hugged someone today?

e-mo
Registered User
Posts: 90
Joined: Tue Oct 01, 2002 2:54 pm

Re: [Beta] Subforums Plus

Post by e-mo » Sat Mar 24, 2007 2:32 pm

Hi Dicky,

oh please dont misunderstand me, your mod is working fine if it is installed on a clean phpbb 2.0.22 board. I tried and everything was working perfectly, so no worries about that, however, only if I want to install the forum icon mod (unread/read) I got some issues displaying the icons.
Currently your mod displays: Image and Image but with the forum icon mod, I can define and assign 2 icons to replace them. on the subforum level with the mini icon, it could stay the same on your mod.

When I looked into the sorce, I realized that both mods are replacing the same lines, which is:

Code: Select all

# 
#-----[ FIND ]------------------------------------------ 
# 
                        $folder_image = ( $unread_topics ) ? $images['forum_new'] : $images['forum']; 
                        $folder_alt = ( $unread_topics ) ? $lang['New_posts'] : $lang['No_new_posts']; 
                     }
in your mod, I should replace it with:

Code: Select all

for ( $j = intval($_sf_cat_first[$cat_id]); $j < $total_forums; $j++) 
            { 
               if ( $forum_data[$j]['cat_id'] != $cat_id ) 
               { 
                  break; 
               } 
               $forum_id = $forum_data[$j]['forum_id']; 

               // jump over a non-authorised branch 
               if ( !$is_auth_ary[$forum_id]['auth_view'] ) 
               { 
                  $j = $_sf_last_child_idx[$forum_id]; 
                  continue; 
               } 

               // attached to the main object (root, or in viewforum the selected forum) 
               if ( (!defined('IN_VIEWFORUM') && !intval($forum_data[$j]['forum_parent'])) || (defined('IN_VIEWFORUM') && (intval($forum_data[$j]['forum_parent']) == $_sf_root_forum_id)) ) 
               { 
                  $_sf_prev_forum_id = $forum_id; 
                  $_sf_is_sub = false; 
                  $_sf_first_sub = true; 
               } 
               // attached to a viewable forum, so displayed as sub 
               else if ( intval($forum_data[$j]['forum_parent']) == $_sf_prev_forum_id ) 
               { 
                  $_sf_is_sub = true; 
               } 
               // level not displayed: jump over 
               else 
               { 
                  if ( !defined('IN_VIEWFORUM') || ($forum_id != $_sf_root_forum_id) ) 
                  { 
                     $j = $_sf_last_child_idx[$forum_id]; 
                  } 
                  continue; 
               } 

               // prepare the display 
               if ( !$_sf_is_sub ) 
               { 
                  $_sf_rowcolor = !$_sf_rowcolor; 
               } 
               $row_color = $_sf_rowcolor ? $theme['td_color1'] : $theme['td_color2']; 
               $row_class = $_sf_rowcolor ? $theme['td_class1'] : $theme['td_class2']; 

               // recompute the front icons 
               $_sf_folder = _sf_get_folder($_sf_is_sub ? 'mini' : 'standard', ($_sf_last_sub_id[$forum_id] == $forum_id ? 'std' : 'has_sub') . ($forum_data[$j]['forum_status'] == FORUM_LOCKED ? '_locked' : '') . ($forum_data[$j]['unread'] ? '_new' : '') . (intval($forum_data[$j]['forum_posts']) ? '' : '_empty')); 
               $folder_image = $images[ $_sf_folder['img'] ]; 
               $folder_alt = $lang[ $_sf_folder['txt'] ]; 

               if ( $_sf_is_sub && $_sf_first_sub ) 
               { 
                  $template->assign_block_vars('catrow.forumrow.sub', array()); 
               } 
               {{
and in the forum icon mod, I should replace it with:

Code: Select all

#-----[ REPLACE WITH ]------------------------------------------ 
# 
                                $folder_alt = ( $unread_topics ) ? $lang['New_posts'] : $lang['No_new_posts']; 
                                if($forum_data[$j]['forum_icon_new_post']) { 
                                    $folder_image = ( $unread_topics ) ? '<img src="' . $forum_data[$j]['forum_icon_new_post'] . '" alt="'.$forum_data[$j]['forum_name'].' - '.$folder_alt.'" title="'.$forum_data[$j]['forum_name'].' - '.$folder_alt.'">' : '<img src="' . $forum_data[$j]['forum_icon_no_post'] . '" alt="'.$forum_data[$j]['forum_name'].' - '.$folder_alt.'" title="'.$forum_data[$j]['forum_name'].' - '.$folder_alt.'">'; 
                                } else{ 
                                    $folder_image = ( $unread_topics ) ? '<img src="'.$images['forum_new'].'" alt="'.$folder_alt.'" title="'.$folder_alt.'" />' : '<img src="'.$images['forum'].'" alt="'.$folder_alt.'" title="'.$folder_alt.'" />'; 
                                }; 
                     }
could these 2 codes somehow be merged so it works together?
I also think it would be great in your next release, if users can assign individual icons for their forum, something like this:
Image

and

Image
...with great power...comes great responsibilities...

Looking help for this Mod Problem: http://www.phpbb.com/community/viewtopi ... &start=165

e-mo
Registered User
Posts: 90
Joined: Tue Oct 01, 2002 2:54 pm

Re: [Beta] Subforums Plus

Post by e-mo » Sat Mar 24, 2007 5:40 pm

Hi Dicky,

it's me again :S
I was testing your mod and realized, that subforums do not apply moderators from the parents forum automatically, is it intended or is it a bug? plus, is it possible to when creating subforums, it automatically apply the security / rights / access settings of the parent forum on default to the subforum first (or at least an option to choose).

e-mo
...with great power...comes great responsibilities...

Looking help for this Mod Problem: http://www.phpbb.com/community/viewtopi ... &start=165

User avatar
shaykana
Registered User
Posts: 108
Joined: Mon Sep 04, 2006 12:11 am
Location: Canada
Contact:

Re: [Beta] Subforums Plus

Post by shaykana » Mon Mar 26, 2007 2:36 pm

D¡cky wrote: Since you had Simple Subforums, I assume that you are using eXtreme Styles? If that is the case, I will work on the X version of Glass2.


I am using eXtreme Styles, but I'm not using the X version of Glass 2. I had my templete installed prior to the Simple Subforums Mod. Just in case you've already started with the X version, I'll install it now. Don't want that eXtreme Styles to go to waste now, do I.

Update: X version now loaded (comes with all four colours at once, nice!). Took some tweaking to get the new folders icon to display,

Code: Select all

#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/subSilver.cfg
#
#-----[ FIND ]------------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod: sf
$images['forums'] = "$current_template_images/{$row['body_background']}/folders_big.gif";
$images['forums_new'] = "$current_template_images/{$row['body_background']}/folders_new_big.gif";
$images['forums_locked'] = "$current_template_images/{$row['body_background']}/folders_locked_big.gif";
//-- mod: sf - end
#
not to mention reworking my other ten plus Mods in. Everything is working fine now except for the previous cosmetic issue of the Subforums displaying with borders and headings.

Update (got a little bored today): I actually figured out how to make it work by doing the following

Code: Select all

#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/viewforum_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
# this is a partial search: the full lines are longer
#
<table
<tr>
{L_TOPICS}
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
<!-- IF SUBFORUMS -->
<table width="90%" cellspacing="1" cellpadding="3" border="0" class="indextable" align="center">
 <tr>
  <td colspan="5" class="cellpic3" align="center"><span class="areatitle">Subforums</span></td>
 </tr>
<tr> 
  <td colspan="2" class="navbar" height="25" align="center" nowrap="nowrap"><span class="areatitle">&nbsp;{L_FORUM}&nbsp;</span></td>
  <td width="50" class="navbar" align="center" nowrap="nowrap"><span class="areatitle">&nbsp;{L_TOPICS}&nbsp;</span></td>
  <td width="50" class="navbar" align="center" nowrap="nowrap"><span class="areatitle">&nbsp;{L_POSTS}&nbsp;</span></td>
  <td width="250" class="navbar" align="center" nowrap="nowrap"><span class="areatitle">&nbsp;{L_LASTPOST}&nbsp;</span></td>
 </tr>
<!-- ENDIF -->
{SUBFORUMS}
#

Edit: Out of curiousity, will Subforums Plus work is the Forum Views Mod? I'm thinking of adding that Mod later on. In fact, I may just try it and find out.

User avatar
TezPatel
Registered User
Posts: 22
Joined: Wed Mar 07, 2007 7:04 pm

Re: [Beta] Subforums Plus

Post by TezPatel » Mon Mar 26, 2007 8:01 pm

how do i get this mod to work on my forums if i have to ftp it cause i dont have a cpanel

also myphpadmin for some reason is not working.....says my admin account password does not match

can i just put this into a folder in the ftp or what

please help

e-mo
Registered User
Posts: 90
Joined: Tue Oct 01, 2002 2:54 pm

Re: [Beta] Subforums Plus

Post by e-mo » Mon Mar 26, 2007 8:48 pm

hm...

for the future, I think it is necessary for you to have mphpadmin login data, since you sometimes needs to alter the mysql tables for specific mods.
As for subforum plus, I dont think you have to manually alter the table. there is an install_sf folder.
you need to type in your IE root/forum/install_sf/install.php and it should execute the changes. However, you need to login as admin first in order to do that.
Since you have access to FTP so you can replace the files you edited for that mod. But remember to backup your data!

e-mo
...with great power...comes great responsibilities...

Looking help for this Mod Problem: http://www.phpbb.com/community/viewtopi ... &start=165

User avatar
TezPatel
Registered User
Posts: 22
Joined: Wed Mar 07, 2007 7:04 pm

Re: [Beta] Subforums Plus

Post by TezPatel » Mon Mar 26, 2007 8:57 pm

e-mo wrote: hm...

for the future, I think it is necessary for you to have mphpadmin login data, since you sometimes needs to alter the mysql tables for specific mods.
As for subforum plus, I dont think you have to manually alter the table. there is an install_sf folder.
you need to type in your IE root/forum/install_sf/install.php and it should execute the changes. However, you need to login as admin first in order to do that.
Since you have access to FTP so you can replace the files you edited for that mod. But remember to backup your data!

e-mo

that all sounds easy for you but i am the worst php guy u prob ever met....everything i know is learned through testing...lol....ok i get that i need to go into admin panel and install the mod...but when i ftp it to the server what file or folder do i put it to or do i just move the whole folder to the content section in the ftp or do i extract the XML to a folder .... that is what i mean

User avatar
shaykana
Registered User
Posts: 108
Joined: Mon Sep 04, 2006 12:11 am
Location: Canada
Contact:

Re: [Beta] Subforums Plus

Post by shaykana » Tue Mar 27, 2007 10:11 pm

Here is a list of Mods I have installed on my Forum along with Subforums Plus:

Admin Userlist
Category Descriptions
Easy Registration
Forum Auth by Post Count
Forum Views
Multiple Ranks (with Staff View)
Pagination
Registration Photo-Captcha
Ribbons
eXtreme Styles

All are fully functioning, and only needed tweaking in alternate templates.

User avatar
TezPatel
Registered User
Posts: 22
Joined: Wed Mar 07, 2007 7:04 pm

Re: [Beta] Subforums Plus

Post by TezPatel » Tue Mar 27, 2007 10:25 pm

shaykana wrote: Here is a list of Mods I have installed on my Forum along with Subforums Plus:

Admin Userlist
Category Descriptions
Easy Registration
Forum Auth by Post Count
Forum Views
Multiple Ranks (with Staff View)
Pagination
Registration Photo-Captcha
Ribbons
eXtreme Styles

All are fully functioning, and only needed tweaking in alternate templates.


think u can help me with adding that stuff to my forums? if so my msn is tez@Pqlbank.com

User avatar
shaykana
Registered User
Posts: 108
Joined: Mon Sep 04, 2006 12:11 am
Location: Canada
Contact:

Re: [Beta] Subforums Plus

Post by shaykana » Sat Mar 31, 2007 12:25 am

TezPatel wrote:
shaykana wrote: Here is a list of Mods I have installed on my Forum along with Subforums Plus:

Admin Userlist
Category Descriptions
Easy Registration
Forum Auth by Post Count
Forum Views
Multiple Ranks (with Staff View)
Pagination
Registration Photo-Captcha
Ribbons
eXtreme Styles

All are fully functioning, and only needed tweaking in alternate templates.


think u can help me with adding that stuff to my forums? if so my msn is tez@Pqlbank.com


Most of what I have I've added using easymod, which only required manual modification of my other templates. I've only added mods to my forums that were either necessary, or made moderation easier. I still only added mods that weren't overly complex, as I'm not a pro. You may not want or need the same mods I do. I only started my forum six months ago, and I'm still learning.

Subforums Plus, and Ribbons are still both in BETA and should not be used on a live forum. Do so only at your own risk. Make sure you create backups of all files that are modified prior to changing them (easymod does this automatically).

If you are using templates other than subSilver, Modifying becomes more complex. The best advice I have is to look for similar variables (the ones in curly braces like {L_TOPICS} etc.) as the full lines in the FIND functions won't be the same. When replacing or moding other templates, be sure to keep the same style formats (class="classstylegoeshere" should be the same as other lines in the template). Cut and paste your code to ensure you don't make any typos, and then change the lines in alternate templates to match styles.

I usually just play around and test things until they work. Start with some simple MODs (ones with fewer lines and files that are edited) to get a feel for it, and you'll begin to learn as you go along, and start using more complex mods.

That's the best help/advice I can give.

ABDev
Registered User
Posts: 905
Joined: Sun Aug 21, 2005 9:29 pm
Location: France
Name: Adrien Bonnel

Re: [Beta] Subforums Plus

Post by ABDev » Mon Apr 02, 2007 11:46 am

Hi everybody ;).
That's a question from one of my friend :).
kraure wrote: Hello Dicky,
I installed Subforums Plus MOD on my board. I'd like to display on the index page and on the viewforum page the last topic title.
So, I tested three differents MODs, but every time I always have the same problem.

I explain :

Forum 1 => post test 1
Sous forum 1 => post test 2
Sous sous forum 1 => post test 3

I posted three messages in this order.
On the index page, we should see "post test 3" but we see "post test 1".

I searched in the topic but nobody seems to have asked for this.
How to do with Subforums Plus to display the last topic title on the right part, with the username and the hour, as weel on the index page as the viewforum page.
Thanks a lot ;).


Have a good day ;).

tednet
Registered User
Posts: 17
Joined: Mon Dec 04, 2006 4:38 pm

Re: [Beta] Subforums Plus

Post by tednet » Wed Apr 04, 2007 6:40 pm

Dear Dicky,
I have a major problem regarding your mod.
First the subforums show up not where they are supposed to (under the forums )

You last visited on 04 Apr 2007 05:16 pm
The time now is 04 Apr 2007 06:36 pm
Uber WoW Fansite Forum Forum Index
Subforums: No Posts cafasfa Subforums: No Posts dasfgasgasga


Ok this is visually how they show up. Also when u open the forum (parent of the subforum), the sub forum isnt anywhere to be seen. It doesnt even show up like i showed in the quotes.
Using phpbb since 2004 (don't view registration date :P )

http://kevan.org/brain.cgi?Teddy%20G%20a.k.a%20TeDNeT

Post Reply

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