Author Topic: Display Category ID  (Read 3438 times)

0 Members and 1 Guest are viewing this topic.

Offline albertpr9

  • Newbie
  • *
  • Posts: 34
    • View Profile
Display Category ID
« on: November 12, 2007, 12:27:33 PM »
I'm trying to use {cat_id} tag to display the gategory ID on the Category Page along with the Category Description... 

What I need is to have the same ID that's on the Address bar, displaying on the page. ex (../4images/categories.php?cat_id=12) from this I would only like to display the number "12".  I know it uses cat_id on the functions.php, but it's not working on templates...

anyone know why?




Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Display Category ID
« Reply #1 on: November 12, 2007, 01:35:30 PM »
In categories.php file,

find:

Quote
"cat_name" => format_text($cat_cache[$cat_id]['cat_name'], 2),

add before:

Code: [Select]
"cat_id" => $cat_cache[$cat_id]['cat_id'],

Use {cat_id} in categories.html file.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline albertpr9

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: Display Category ID
« Reply #2 on: November 12, 2007, 03:46:44 PM »
PERFECT!!!!!!! : )

Thanks again thunderstrike!