Author Topic: [MOD] better presentation of the subcategories in the category listing  (Read 11042 times)

0 Members and 1 Guest are viewing this topic.

Offline webmaster73

  • Jr. Member
  • **
  • Posts: 75
    • View Profile
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.

Offline CanonInk

  • Newbie
  • *
  • Posts: 48
    • View Profile
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
« Last Edit: March 03, 2008, 10:44:47 AM by Nicky »

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
moved here :)

thx webmaster!

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

thx to you both!
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline CanonInk

  • Newbie
  • *
  • Posts: 48
    • View Profile
moved here :)

thx webmaster!

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

thx to you both!

Thanks :wink:

Offline kai

  • Administrator
  • Addicted member
  • *****
  • Posts: 1.421
    • View Profile
    • 4images - Image Gallery Management System
Thanks! Good work. :)
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
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

... ;) ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...