Author Topic: Question about Category Dropdown list  (Read 5978 times)

0 Members and 1 Guest are viewing this topic.

Offline Pedrocas

  • Newbie
  • *
  • Posts: 22
    • View Profile
Question about Category Dropdown list
« on: February 02, 2009, 07:34:58 PM »
Hi,

I wonder if there's a way of create dropdown lists for unique categories.
I mean I know I can use the {category_dropdown} that will show me all the categories I have, but I would like to create dropdown lists for specific categories (with only one).

Is this possible to be done?
Thanks in advance for the help...

P.S: I'm using 1.7.6 version
« Last Edit: February 02, 2009, 09:05:19 PM by pumizo »

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: Question about Category Dropdown list
« Reply #1 on: February 03, 2009, 02:06:13 AM »
but I would like to create dropdown lists for specific categories (with only one).
I didn't understand that part...exactly what do you want?
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 Pedrocas

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Question about Category Dropdown list
« Reply #2 on: February 03, 2009, 10:12:29 AM »
Thanks for your reply.
Instead of showing all Categories in the dropdown list I need to show only one category (choosen by me).

Offline Pedrocas

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Question about Category Dropdown list
« Reply #3 on: September 29, 2010, 09:02:20 PM »
Sorry to bump an old topic, but is it possible to use dropdown list in categories or not?
Thanks in advance for any help.

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: Question about Category Dropdown list
« Reply #4 on: September 30, 2010, 01:52:11 AM »
Wow, that is some patience you got there :D

In includes/page_header.php find:
$site_template->register_vars("category_dropdown_selfjump"$category_dropdown_selfjump);

Insert above :above::
$categories_list = array(1,18,14); //list of categories IDs

$cat_parent_cache_backup $cat_parent_cache;
$cat_parent_cache = array($categories_list);
$site_template->register_vars("category_dropdown_selfjump"get_category_dropdown(01));
$site_template->register_vars("category_dropdown_form_custom"str_replace("'jumpbox'""'jumpbox_custom'"str_replace('"jumpbox"''"jumpbox_custom"'$site_template->parse_template("category_dropdown_form"))));
$cat_parent_cache $cat_parent_cache_backup;
unset(
$categories_list$cat_parent_cache_backup);


replace 1,18,14 with your own list of category IDs

In templates use {category_dropdown_form_custom}
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)