Constructor
categories
categories
([bool $buildarray = false], [string $cattype = 'service'], [string $slng = 'eng'], [integer $categorymode = 0], [boolean $propersort = true])
-
bool
$buildarray: build the array on load? default = false
-
string
$cattype: category type (service, product, experts, portfolio, serviceprovider)
-
string
$slng: short language identifier? default = user session lang.
-
integer
$categorymode: category mode (0 = all, 1 = portfolio, 2 = rss, 3 = newsletters)
-
boolean
$propersort: enable proper category sorting (builds $this->cat & $this->fetch internally) (default true)
Function to provide add-on products with a useable API bridge allowing the generation of multi-select fields such as categories.
string
api_multicategory_select
([string $cattype = ''], [string $selected = ''], [bool $singlepulldown = false], [bool $hideallcats = false], [string $selectname = 'cid'], [bool $pleaseselect = false], [integer $level = 0])
-
string
$cattype: category type
-
string
$selected: selected category
-
bool
$singlepulldown: single pulldown mode?
-
bool
$hideallcats: hide all categories? (default false)
-
string
$selectname: select field name
-
bool
$pleaseselect: show "Please Select: " option in the pulldown (default false)
-
integer
$level: category level (used for pulldown option spacing) (default 1)
Function to fetch the auction count for a category.
integer
auctioncount
([string $cattype = ''], [integer $cid = 0])
-
string
$cattype: category type (service/product)
-
integer
$cid: category id
Function to fetch a category count based on a set of search options per specific category.
For example, say Web Design normally by itself has 300 auctions. If a user enters a search for keyword "template" and 35 results were found, "35" would be that category's counter: Web Design (35) even though the current category selected is "Programming". This can be considered a mini-internal search engine for category listing counts.
integer
bestmatch_auction_count
([string $cid = 0], [string $cattype = 'service'], [integer $sqlquery = array()])
-
string
$cid: category id
-
string
$cattype: category type (service/product/serviceprovider)
-
integer
$sqlquery: search sql query (array)
Function to fetch the bid amount types for a category
string
bidamounttypes
([integer $cid = 0])
-
integer
$cid: category id
Function to fetch the category bid group display logic for a category
string
bidgroupdisplay
([integer $cid = 0])
-
integer
$cid: category id
Function to determine if a category bid grouping logic is enabled or disabled
string
bidgrouping
([integer $cid = 0])
-
integer
$cid: category id
Function to generate the main header breadcrumb category trail.
array
breadcrumb
([integer $cid = 0], [string $cattype = 'service'], [string $slng = 'eng'])
-
integer
$cid: category id
-
string
$cattype: category type (service/product)
-
string
$slng: short language identifier (default eng)
void
budgetgroup
([ $cid = 0])
Function to fetch and build the array of the category structure. This will internally build our $ilance->categories->fetch[] array.
Additionally this function can sort the array using an internal sorting method if required.
array
build_array
([string $cattype = 'service'], [string $slng = 'eng'], [string $categorymode = 0], [bool $propersort = true], [string $extra = ''], [string $extra2 = ''], [integer $counter = 0], [integer $limit = -1], [integer $level = 10], [integer $cid = 0], [string $title = ''], [integer $visible = 1])
-
string
$cattype: category type (service/product)
-
string
$slng: short language identifier (default eng)
-
string
$categorymode: category mode (0 = all, 1 = portfolio, 2 = rss, 3 = newsletters)
-
bool
$propersort: enable proper category/parent/child sorting on the fly? (default yes)
-
string
$extra: extra 1
-
string
$extra2: extra 2
-
integer
$counter: page counter (default 0)
-
integer
$limit: per page limit (default 10)
-
integer
$level: category id level depth selector (default 10)
-
integer
$cid: category id selector (extra logic)
-
string
$title: category title we're searching for (extra logic)
-
integer
$visible: category visibility (admincp usage mainly) (default 1)
Function to determine if a category is a postable auction category.
string
can_post
([string $slng = 'eng'], [string $cattype = ''], [integer $cid = 0])
-
string
$slng: short language identifier (default eng)
-
string
$cattype: category type (service/product)
-
integer
$cid: category id
Function to fetch the category type of a category.
string
cattype
([string $slng = 'eng'], [integer $cid = 0])
-
string
$slng: short language identifier (default eng)
-
integer
$cid: category id
Function to bridge the category system for usage with Want Ads and other add on products like Stores
string
construct_categories
([string $mode = ''], [integer $columns = 3], [integer $cid = 0], [integer $storeid = ''])
-
string
$mode: category mode
-
integer
$columns: columns (default 3)
-
integer
$cid: category id
-
integer
$storeid: store id (optional)
Function to fetch the description text of a category.
mixed
description
([string $slng = 'eng'], [integer $cid = 0])
-
string
$slng: short language identifier (default eng)
-
integer
$cid: category id
Function to
string
display_children
([integer $parentid = 0], [integer $level = 0], [string $cattype = ''], [string $optgroups = ''], [string $addspaces = ''])
-
integer
$parentid: parent category id
-
integer
$level: current level
-
string
$cattype: category type (service/product)
-
string
$optgroups: option groupns
-
string
$addspaces: add spaces (optional)
Function to fetch all children category id numbers returns in comma separated values.
string
fetch_children
([integer $cid = 0], [string $cattype = 'service'])
-
integer
$cid: category id number (or all)
-
string
$cattype: category type (service/product)
Function to fetch all children category id numbers recursivly in comma separated values based on a parent category id number.
This function is useful because it reads from the cache and does not hit the database.
string
fetch_children_ids
([string $cid = 'all'], [string $cattype = 'service'], [ $extraquery = ''])
-
string
$cid: category id number (or all)
-
string
$cattype: category type (service or product)
-
$extraquery
Function to fetch the padding based on a particular category level we're currently viewing
string
fetch_level_padding
([integer $level = 0])
Function to fetch all parent category id numbers recursivly in comma separated values based on a child category id number.
This function is useful because it reads from the cache and does not hit the database.
string
fetch_parent_ids
([string $cid = 0], [string $extraquery = ''])
-
string
$cid: category id number (or all)
-
string
$extraquery: category type (service or product)
Function to fetch the number of portfolio items within a particular category
integer
fetch_portfolio_count
([integer $cid = 0])
-
integer
$cid: category id
Function to fetch the answer count for the profile question within a category for a particular user.
integer
fetch_profile_answer_count
([integer $cid = 0], [integer $userid = 0])
-
integer
$cid: category id
-
integer
$userid: user id
Function to fetch the entire profile count within any category.
integer
fetch_profile_question_count
([integer $cid = 0])
-
integer
$cid: category id
Function to fetch the profile verification count for a user within a particular category.
integer
fetch_profile_verification_count
([integer $cid = 0], [integer $userid = 0])
-
integer
$cid: category id
-
integer
$userid: user id
void
finalvaluegroup
([ $cid = 0])
Function to fetch the fixed fee amount of a particular category
string
fixedfeeamount
([integer $cid = 0])
-
integer
$cid: category id
Function to process and fetch categories
nothing
get_cats
(array $result, [integer $parentid = 0], [integer $level = 1], [ $counter = 0])
-
array
$result: category results array
-
integer
$parentid: parent id
-
integer
$level: category level
-
$counter
Redefined in descendants as:
Function to process and fetch categories recusively
nothing
get_cats_recursive
(array $result, [integer $parentid = 0], [integer $level = 1], [integer $counter = 0])
-
array
$result: category results array
-
integer
$parentid: category parent id
-
integer
$level: category level
-
integer
$counter: counter (default 0)
Redefined in descendants as:
Function to fetch the category increment group for a category.
string
incrementgroup
([integer $cid = 0])
-
integer
$cid: category id
void
insertiongroup
([ $cid = 0])
Function to fetch the meta tag keywords text of a category.
mixed
keywords
([string $slng = 'eng'], [integer $cid = 0], [boolean $commaafter = false], [boolean $showinputkeywords = false])
-
string
$slng: short language identifier (default eng)
-
integer
$cid: category id
-
boolean
$commaafter: add comma after? (default false)
-
boolean
$showinputkeywords: show input keywords? (default false)
Redefined in descendants as:
Function to fetch the true level of a category within the category structure.
mixed
level
([string $slng = 'eng'], [string $cattype = ''], [integer $cid = 0])
-
string
$slng: short language identifier (default eng)
-
string
$cattype: category type (service/product)
-
integer
$cid: category id
void
nondisclosefeeamount
([ $cid = 0])
Function to fetch the parentid of a category.
integer
parentid
([integer $cid = 0])
-
integer
$cid: category id
Redefined in descendants as:
Function to print the category jump edit/delete/actions menu from within the AdminCP > Category Manager
string
print_category_jump_js
([string $formid1 = 'ilform'], [string $formid2 = 'ilform2'], [string $cidid = 'cid'], [ $page = 1], [ $page2 = 1])
-
string
$formid1: form 1 id
-
string
$formid2: form 2 id
-
string
$cidid: category id field
-
$page
-
$page2
Function to print a category's "new" icon representing any new auctions posted within that category
string
print_category_newicon
([integer $cid = 0], [bool $cattype = ''], [bool $recursive = true])
-
integer
$cid: category id
-
bool
$cattype: category type (service/product)
-
bool
$recursive: decide if we will show icon on parents (that have children with new items posted) (default true)
Function to print an html formatted representation of the searchable question category genres under a specific category when viewing the search results
string
print_searchable_questions
([integer $cid = 0], [bool $showcount = 1], [integer $level = 0], [integer $viewlevel = -1], [boolean $forcelinks = false], [string $cattype = ''], [string $title = ''])
-
integer
$cid: category id
-
bool
$showcount: show category counters
-
integer
$level: current level
-
integer
$viewlevel: current show view level
-
boolean
$forcelinks: force showing of links for category maps (default false)
-
string
$cattype: category type (optional if forcing links)
-
string
$title: category title (optional if forcing links)
Function to fetch the entire category cache and make it a proper formatted result set for various areas within ILance
void
propersort
([string $slng = 'eng'], [string $cattype = 'service'], [integer $categorymode = 0], [ $counter = 0])
-
string
$slng: short language identifier
-
string
$cattype: category type (service or product)
-
integer
$categorymode: category mode (0 = all, 1 = portfolio, 2 = rss, 3 = newsletters)
-
$counter
Function to determine if a category is proxy bid ready (if proxy bidding is enabled)
string
proxy_bid_ready
([string $slng = 'eng'], [string $cattype = ''], [integer $cid = 0])
-
string
$slng: short language identifier (default eng)
-
string
$cattype: category type (service/product)
-
integer
$cid: category id
Function to rebuild the category structure geometry for ultra fast database queries
void
rebuild_category_geometry
()
void
rebuild_category_geometry_install
()
Function to rebuild a nested category structure in the database
void
rebuild_category_tree
([integer $parentid = 0], [integer $left = 1], [ $cattype = 'product'], [ $slng = 'eng'])
-
integer
$parentid: parent category id number (default 0)
-
integer
$left: lft node (default 1)
-
$cattype
-
$slng
Function to print a recursive category breadcrumb trail.
string
recursive
([integer $cid = 0], [string $cattype = 'service'], [string $slng = 'eng'], [boolean $nourls = 0], [string $customurl = ''], [boolean $seourls = 0])
-
integer
$cid: category id
-
string
$cattype: category type (service/product)
-
string
$slng: short language identifier (default eng)
-
boolean
$nourls: no urls flag (default off)
-
string
$customurl: custom url (optional)
-
boolean
$seourls: enable seo urls (default off)
Function to print the searchable category questions auction count sum.
For example, if a seller posted an item under DVD and answered "Horror" as the question, Horror (1) would be shown. Additionally, this counter would be affected if and when the searcher enters existing search patterns such as selecting another category question at the same time or keywords being used.
integer
searchable_question_count
([integer $qid = 0], [string $choice = ''], [string $cattype = ''], [array $sqlquery = array()])
-
integer
$qid: question id
-
string
$choice: choice
-
string
$cattype: category type (service/product)
-
array
$sqlquery: current search sql info (optional)
Function to set all the levels in proper format for the main category system
void
set_levels
()
Function to set all levels and to handle the updating
nothing
set_levels_update
(integer $cid, integer $parentid, integer $level, [integer $cid_save = ''])
-
integer
$cid: category id
-
integer
$parentid: parent id
-
integer
$level: level
-
integer
$cid_save: category id to save
Function to fetch the title of a category.
mixed
title
([string $slng = 'eng'], [integer $cid = 0])
-
string
$slng: short language identifier (default eng)
-
integer
$cid: category id
Function to determine if a category uses fixed fees
string
usefixedfees
([integer $cid = 0])
-
integer
$cid: category id
Function to determine if a specific product category has proxy bidding enabled.
mixed
useproxybid
([string $slng = 'eng'], [integer $cid = 0])
-
string
$slng: short language identifier (default eng)
-
integer
$cid: category id
void
usereserveprice
([ $cid = 0])
Function to fetch the visibility of a category.
mixed
visible
([string $cid = 0], string 1, integer 2)
-
string
1: category type (service/product)
-
integer
2: category id
-
string
$cid: short language identifier (default eng)
Function to count the number of ads within a Want Ads category
string
wantads_in_category
([integer $cid = 0])
-
integer
$cid: category id