Author Topic: Categories Description Help Needed  (Read 8969 times)

0 Members and 1 Guest are viewing this topic.

Offline khansahib

  • Full Member
  • ***
  • Posts: 100
    • View Profile
Categories Description Help Needed
« on: May 22, 2010, 04:59:51 PM »
Hello,

I am using the categories description thing on my website gallery, I mean I add description to every category of my gallery. Now the issue is that on some categories I don't want its description to appear under the category where is I want its description to be there when we check the html code of page. Please help me how should I add description under some of the categories?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Categories Description Help Needed
« Reply #1 on: May 22, 2010, 06:11:04 PM »
You can use HTML in the description, something like this for example:
Code: [Select]
<span style="display:none">hidden text</span>
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline khansahib

  • Full Member
  • ***
  • Posts: 100
    • View Profile
Re: Categories Description Help Needed
« Reply #2 on: May 23, 2010, 07:52:29 AM »
i got a problem, the description is not shown under the category, which is okay, but when i enter that category i get the hidden text at the top of the page... :(
« Last Edit: May 23, 2010, 09:15:45 AM by khansahib »

Offline JetLee626

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: Categories Description Help Needed
« Reply #3 on: December 15, 2011, 07:34:45 AM »
Hi,

Is anyway the description not show on the root of website, but is show when the categories is open.

ex: At HOME is not show description, but when they click on catelogies, the link will go to: categories.php?cat_id=27 - in this they will show the description.

Thanks for help

Rembrandt

  • Guest
Re: Categories Description Help Needed
« Reply #4 on: December 15, 2011, 07:13:37 PM »
Welcome to the Forum!
..Is anyway the description not show on the root of website, but is show when the categories is open.
..

search in index.php:

$categories 
get_categories(0);

insert above:

$site_template
->register_vars("index_page"1);


search in your Template/category_bit.html:
Code: [Select]
{if cat_description}<span class="smalltext">{cat_description}</span><br />{endif cat_description}
and replace:
Code: [Select]
{ifnot index_page}
{if cat_description}<span class="smalltext">{cat_description}</span><br />{endif cat_description}
{endifnot index_page}

mfg Andi

Offline JetLee626

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: Categories Description Help Needed
« Reply #5 on: December 15, 2011, 07:50:34 PM »
First thing Thank Rembrandt

I have other question:

The Main page i have 3 Categories - each Cat, i have Sub-Cat (in this they have Description) Same like hidden on main, how can i hidden from sub, unstill is open.

Thank for you help again.


Rembrandt

  • Guest
Re: Categories Description Help Needed
« Reply #6 on: December 15, 2011, 08:05:10 PM »
do you want remove the subcats from the main page?

Edit: I think I knows what you want:
search in your Template/category_bit.html and remove:
Code: [Select]
{ifnot index_page}
{if cat_description}<span class="smalltext">{cat_description}</span><br />{endif cat_description}
{endifnot index_page}

mfg Andi
« Last Edit: December 15, 2011, 08:21:38 PM by Rembrandt »

Offline JetLee626

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: Categories Description Help Needed
« Reply #7 on: December 15, 2011, 08:16:53 PM »
do you want remove the subcats from the main page?

Edit: I think I knows what you want:
search in includes/functions.php:

"cat_description" => format_text($cat_cache[$category_id]['cat_description'], 1),

and replace:

//"cat_description" => format_text($cat_cache[$category_id]['cat_description'], 1),


mfg Andi


No, i just want remove Description from Second Sub Categories.

EDIT: thanks verymuch
« Last Edit: December 15, 2011, 08:46:37 PM by JetLee626 »