4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: webmaster73 on March 03, 2008, 01:10:53 AM

Title: [MOD] better presentation of the subcategories in the category listing
Post by: webmaster73 on March 03, 2008, 01:10:53 AM
hello.

this is my 2-dime contribution to the community.

this is a very simple modification to break the line and add a point before each subcategory in the category listing. (as in the attached image).

this mod is for 4images 1.7.6

simply download the attached functions.php and throw it in your "includes" folder.

attached also image to show you how this new presentation of the subcategories works out for me. you can also check here http://forumislam.com/galerie/

the only changes are made in lines 1115 to 1117. the modified code is here:

Code: [Select]
      $sub_cat_list .= "<b>.</b> &nbsp; <a href=\"".$sub_url."\" class=\"subcat\">".format_text($cat_cache[$subcat_id]['cat_name'], 2)."</a>";
      if ($i != $config['num_subcats'] && $i < $config['num_subcats'] && $i < $num_subs) {
        $sub_cat_list .= "<br> ";

Remarks or thanks are welcome.
Title: Re: [MOD] better presentation of the subcategories in the category listing
Post by: CanonInk on March 03, 2008, 07:47:30 AM
This is a good idea! Ask moderator for move your MOD into Mods & Plugins (Requests & Discussions)

For modifications use this format:

Open /includes/functions.php

Find:
Code: [Select]
$sub_cat_list .= "<a href=\"".$sub_url."\" class=\"subcat\">".format_text($cat_cache[$subcat_id]['cat_name'], 2)."</a>";
      if ($i != $config['num_subcats'] && $i < $config['num_subcats'] && $i < $num_subs) {
        $sub_cat_list .= ", ";

Replace with:
Code: [Select]
$sub_cat_list .= "<b>.</b> &nbsp; <a href=\"".$sub_url."\" class=\"subcat\">".format_text($cat_cache[$subcat_id]['cat_name'], 2)."</a>";
      if ($i != $config['num_subcats'] && $i < $config['num_subcats'] && $i < $num_subs) {
        $sub_cat_list .= "<br> ";

Enjoy, CanonInk
Title: Re: [MOD] better presentation of the subcategories in the category listing
Post by: Nicky on March 03, 2008, 10:46:23 AM
moved here :)

thx webmaster!

CanonInk
i changed
Open /includes/funktion.php
to
Open /includes/functions.php

thx to you both!
Title: Re: [MOD] better presentation of the subcategories in the category listing
Post by: CanonInk on March 03, 2008, 12:02:57 PM
moved here :)

thx webmaster!

CanonInk
i changed
Open /includes/funktion.php
to
Open /includes/functions.php

thx to you both!

Thanks :wink:
Title: Re: [MOD] better presentation of the subcategories in the category listing
Post by: kai on March 03, 2008, 12:17:47 PM
Thanks! Good work. :)
Title: Re: [MOD] better presentation of the subcategories in the category listing
Post by: mawenzi on March 03, 2008, 12:55:31 PM
Thanks! Good work. :)

... it is not a MOD ... it is a old known solution ...
... and is to find in many posts ...
... e.g. ...

- http://www.4homepages.de/forum/index.php?topic=11329.msg58733#msg58733
- http://www.4homepages.de/forum/index.php?topic=17093.0

... ;) ...