Class categories_pulldown

Description

Category pulldown class to perform the majority of category pulldown menus and other related parsing functions within ILance.

  • author: ILance
  • version: $Revision: 1.0.0 $

Located in /api/class.categories_pulldown.inc.php (line 28)

categories
   |
   --categories_pulldown
Method Summary
string fetch_levelprofile_options ([integer $selected = ''], [array $result = array()], [string $type = ''], [string $cattype = ''], boolean $forcenocount, boolean $dojs, integer $uid)
string fetch_level_options ([integer $selected = ''], [array $result = array()], [string $type = ''], [string $cattype = ''], boolean $forcenocount, boolean $dojs, [integer $hidecid = 0])
string fetch_recursive_category_options ([string $cid = ''], [string $cattype = ''], [string $slng = 'eng'])
string print_cat_pulldown ([string $selected = ''], [string $cattype = 'service'], [string $type = ''], [string $fieldname = ''], [boolean $showpleaseselectoption = 0], [string $slng = 'eng'], [boolean $nooptgroups = 0], [string $prepopulate = 0], [integer $mode = 0], [boolean $showallcats = 1], [boolean $dojs = 0], [string $width = '540px'], [integer $uid = 0], [boolean $forcenocount = 0], [boolean $expertspulldown = 0], [boolean $canassigntoall = false], [boolean $showbestmatching = false], [array $categorycache = array()], [boolean $onclickajax = false], [integer $selectedcid = 0])
string print_root_category_pulldown ([string $selected = ''], [string $cattype = ''], [string $fieldname = 'cid'], [string $slng = 'eng'], [array $categorycache = array()], [boolean $showselectall = true], [boolean $showcanassigntoall = false])
Variables
Methods
fetch_levelprofile_options (line 117)

Function to fetch profile level options for a select menu

  • return: Returns HTML formatted pulldown menu
string fetch_levelprofile_options ([integer $selected = ''], [array $result = array()], [string $type = ''], [string $cattype = ''], boolean $forcenocount, boolean $dojs, integer $uid)
  • integer $selected: selected category id
  • array $result: category result array
  • string $type: type
  • string $cattype: category type
  • boolean $forcenocount: force no category count? (default false)
  • boolean $dojs: do javascript? (default false)
  • integer $uid: user id (optional)
fetch_level_options (line 43)

Function to fetch level options for a select menu

  • return: Returns HTML formatted pulldown menu
string fetch_level_options ([integer $selected = ''], [array $result = array()], [string $type = ''], [string $cattype = ''], boolean $forcenocount, boolean $dojs, [integer $hidecid = 0])
  • integer $selected: selected category id
  • array $result: category result array
  • string $type: type
  • string $cattype: category type
  • boolean $forcenocount: force no category count? (default false)
  • boolean $dojs: do javascript? (default false)
  • integer $hidecid: category id number to skip (if applicable) default 0
fetch_recursive_category_options (line 173)

Function for fetching the recursive category nodes for a single category pulldown menu.

This function is a call-back to the [print_root_category_pulldown()] function.

  • return: HTML representation of the single pulldown menu <option>'s
string fetch_recursive_category_options ([string $cid = ''], [string $cattype = ''], [string $slng = 'eng'])
  • string $cid: currently selected menu option
  • string $cattype: category type (service or product)
  • string $slng: language to parse output within (default eng)
print_cat_pulldown (line 308)

Function for printing a category pulldown or selection box. This function now uses a suitable method to call the category cache without reloading the db.

  • return: HTML representation of the pulldown or multi-selection menu
string print_cat_pulldown ([string $selected = ''], [string $cattype = 'service'], [string $type = ''], [string $fieldname = ''], [boolean $showpleaseselectoption = 0], [string $slng = 'eng'], [boolean $nooptgroups = 0], [string $prepopulate = 0], [integer $mode = 0], [boolean $showallcats = 1], [boolean $dojs = 0], [string $width = '540px'], [integer $uid = 0], [boolean $forcenocount = 0], [boolean $expertspulldown = 0], [boolean $canassigntoall = false], [boolean $showbestmatching = false], [array $categorycache = array()], [boolean $onclickajax = false], [integer $selectedcid = 0])
  • string $selected: parent category id
  • string $cattype: category type (service or product)
  • string $type: type of element (multi-select, single pulldown, etc)
  • string $fieldname: fieldname of selection output box
  • boolean $showpleaseselectoption: show "Please select" option (blank value)
  • string $slng: language to parse output within
  • boolean $nooptgroups: show option groups and labels
  • string $prepopulate: enable prepopulate mode? (used in areas like newsletter for retaining selected values)
  • integer $mode: mode switch for various category situations (0 = all, 1 = portfolio, 2 = xml, 3 = newsletter, 4 = skills)
  • boolean $showallcats: show all categories argument (yes/no)
  • boolean $dojs: enable javascript for certain pulldown options (yes/no)
  • string $width: width of the outputted selection box
  • integer $uid: custom user id to supply this function for various purposes
  • boolean $forcenocount: do we want to force-hide the total auction count in category display even if enabled?
  • boolean $expertspulldown: is expert pulldown menu (yes/no)
  • boolean $canassigntoall: can we display an option such as -1 for the category to allow "assign to all categories" option?
  • boolean $showbestmatching: show best matching text (vs "All Categories") (default true)
  • array $categorycache: category array cache to construct the pulldown menu (accepts build_array() format only)
  • boolean $onclickajax: determine if we need to use onclick when a category is selected to show content within a innerHTML div (default false) (this argument is valid only when $type == levelmultisearch
  • integer $selectedcid: the category id being selected (if applicable) if this value exists we'll prevent this category pulldown option from showing
print_root_category_pulldown (line 226)

Function for printing a single category pulldown menu only presenting main categories along with a recursive selected category node feature. This function will provide marketplaces with huge category lists a much faster display and response vs displaying all nodes for all categories.

This function requires a call back function [fetch_recursive_category_options()] to fetch and display the selected recursive nodes.

  • return: HTML representation of the single pulldown or multi-selection menu
string print_root_category_pulldown ([string $selected = ''], [string $cattype = ''], [string $fieldname = 'cid'], [string $slng = 'eng'], [array $categorycache = array()], [boolean $showselectall = true], [boolean $showcanassigntoall = false])
  • string $selected: currently selected menu option
  • string $cattype: category type (service or product)
  • string $fieldname: fieldname of selection output box
  • string $slng: language to parse output within (default eng)
  • array $categorycache: category array cache to construct the pulldown menu (accepts build_array() format only)
  • boolean $showselectall: show "All categories" option (blank value)
  • boolean $showcanassigntoall: can we display an option such as -1 for the category to allow "assign to all categories" option?

Inherited Methods

Inherited From categories

categories::categories()
categories::api_multicategory_select()
categories::auctioncount()
categories::bestmatch_auction_count()
categories::bidamounttypes()
categories::bidgroupdisplay()
categories::bidgrouping()
categories::breadcrumb()
categories::budgetgroup()
categories::build_array()
categories::can_post()
categories::cattype()
categories::construct_categories()
categories::description()
categories::display_children()
categories::fetch_children()
categories::fetch_children_ids()
categories::fetch_level_padding()
categories::fetch_parent_ids()
categories::fetch_portfolio_count()
categories::fetch_profile_answer_count()
categories::fetch_profile_question_count()
categories::fetch_profile_verification_count()
categories::finalvaluegroup()
categories::fixedfeeamount()
categories::get_cats()
categories::get_cats_recursive()
categories::incrementgroup()
categories::insertiongroup()
categories::keywords()
categories::level()
categories::nondisclosefeeamount()
categories::parentid()
categories::print_category_jump_js()
categories::print_category_newicon()
categories::print_searchable_questions()
categories::propersort()
categories::proxy_bid_ready()
categories::rebuild_category_geometry()
categories::rebuild_category_geometry_install()
categories::rebuild_category_tree()
categories::recursive()
categories::searchable_question_count()
categories::set_levels()
categories::set_levels_update()
categories::title()
categories::usefixedfees()
categories::useproxybid()
categories::usereserveprice()
categories::visible()
categories::wantads_in_category()

Documentation generated on Mon, 08 Aug 2011 17:40:52 +0200 by phpDocumentor 1.4.1