jDownloads Support Forum

Older Versions => jDownloads 3.2 (Support ended) => Bugs => Topic started by: schmatzler on 15.12.2014 09:23:27

Title: Show subcat description - [Fixed in 3.2.19!!!]
Post by: schmatzler on 15.12.2014 09:23:27
Maybe I am just too dumb to find the option for that or it is missing:

I want to show the description of subcategories. Not just of the main categories.

When I open up views/category/tmpl/default.php I see this code:

if ($this->params->get('show_subcat_desc')){

I can comment this out and the description is there! :) But where's the option in the admin panel for this?
Title: Re: Show subcat description
Post by: Arno on 15.12.2014 13:33:22
Please check the settings from the jD frontend menu item.
Title: Re: Show subcat description
Post by: ColinM on 15.12.2014 18:54:47
Hi
The problem is a layout one!  Note that in the following I am using what I call my 'debug' layouts.  These are the same as the standard ones but with (V2) added to name and additional text output showing which laout was being used.

The first pic below ShowSubCats00.png  confirms that the List All Categories Menu type has Show Categories enabled.
Pic ShowSubCats01.png shows the description from the Main Category.
Pic ShowSubCats02.png fails to show the sub category description.
Pic ShowSubCats03.png shows the download description.
After changing the Layout then Pic ShowSubCats04.png shows that the sub cat description is now shown.

The sub categories are shown with the special layout Standard Categories Layout for paginated Subcategories.  This is never activated but is used automatically for paged  subcats.

The relevant part of that layout is
{cat_info_begin}
 <tr valign="top" border="0px">
   <td width="65%" style="padding:5px;"><i> Std Cats pag Subcats.[Main]{cat_pic}<b>{cat_title}</b></td>
   <td width="20%" style="padding:5px; text-align:right">{sum_subcats}</td>
   <td width="15%" style="padding:5px; text-align:right">{sum_files_cat}</td>
 </tr>
{cat_info_end}

This was modified by including an extra row as shown below.  Basically the placeholder {cat_description} is missing
{cat_info_begin}
 <tr valign="top" border="0px">
   <td width="65%" style="padding:5px;"><i> Std Cats pag Subcats.[Main]{cat_pic}<b>{cat_title}</b></td>
   <td width="20%" style="padding:5px; text-align:right">{sum_subcats}</td>
   <td width="15%" style="padding:5px; text-align:right">{sum_files_cat}</td>
 </tr>
 <tr>
  <td colspan = "3"><i>cat desc: </i>{cat_description}</td>
 </tr>
{cat_info_end}

The part cat desc: is just for my diagnostic and would be omitted
No PHP code was changed.

[gelöscht durch Administrator]
Title: Re: Show subcat description
Post by: Arno on 16.12.2014 02:01:17
@Colin:
i will check your results more tomorrow.

@schmatzler:
please see the pic and check your menu items.

When in your settings is all correct, maybe have you found a bug.  ::)


[gelöscht durch Administrator]
Title: Re: Show subcat description
Post by: schmatzler on 16.12.2014 06:24:42
Thank your for your answers.

So it is by design that this option is missing in the default view? (The "Show all categories" one)

I want to use it, it's perfect. I don't want to specify a single categorie, but the root of them all and go down from there. With descriptions to all of them ;)

[gelöscht durch Administrator]
Title: Re: Show subcat description
Post by: ColinM on 16.12.2014 09:09:17
@schmatzler
I would not say it was by design but rather a simple oversight! ::)  Until you pointed it out no one had noticed ;D The huge number of options and their combinations makes jDownloads very 'rich' in features, but correspondingly challenging to get it perfect! ;)
Title: Re: Show subcat description
Post by: Arno on 16.12.2014 12:33:53
QuoteThe huge number of options and their combinations makes jDownloads very 'rich' in features, but correspondingly challenging to get it perfect!
Exactly  ;)

QuoteI want to use it, it's perfect.
Sure, please wait a few hours then i will post here a fixed php file.
Title: Re: Show subcat description - [Fixed in 3.2.19!!!]
Post by: Arno on 20.12.2014 13:06:18
@ schmatzler:
Sorry for the delay.
Please try the unzipped file below and post here your result.

Edit:
I am not sure that this is the right way... hm... little bit tricky  ::)

Edit 2:
Forget it. I have it solved now so that we have this option ('show_subcat_desc') also in the categories menu settings. ;)
Is fixed in 3.2.19.  ;)

@ Colin:
QuoteThis was modified by including an extra row as shown below.  Basically the placeholder {cat_description} is missing
You mean that the placeholder is missing in the default layouts?  :-\
Title: Re: Show subcat description - [Fixed in 3.2.19!!!]
Post by: ColinM on 21.12.2014 00:58:23
Yes, placeholder missing.  When included the info was shown
Title: Re: Show subcat description - [Fixed in 3.2.19!!!]
Post by: Arno on 26.12.2014 18:30:47
Hi Colin,
okay i will fix it in next version.  ;)