CubeCart - FreeForums For All

CubeCart 5 => Developer's Kit => Topic started by: Chief! on February 21, 2012, 10:03:56 PM



Title: SEO Class
Post by: Chief! on February 21, 2012, 10:03:56 PM
CubeCart 5.0.7
SEO Class
- _cat_dirs = null; array of strings; Category directories
- _cat_path = null; array of strings; Category paths
- _dynamic_sections = array('prod', 'cat', 'doc'); array of strings; Dynamic URL sections
- _extension = '.html'; string; SEO url extension
- _ignored = array('account', 'addressbook', 'basket', 'checkout', 'complete', 'confirm','downloads', 'gateway', 'logout', 'openid', 'plugin', 'profile', 'recover','recovery', 'remote', 'vieworder'); array of strings; Ignored URL sections
- _meta_data = array();; array; Meta data
- _sitemap_xml = false; handle; Sitemap XML handle
- _static_sections = array('saleitems', 'certificates', 'trackback', 'contact', 'search','login', 'register'); array of strings; Static URL sections
# _instance (static); instance; Class instance
const TAGS_DEFAULT   = 0;
const TAGS_MERGE   = 1;
const TAGS_REPLACE   = 2;
const PCRE_REQUEST_URI = '(.*/)?[\w]+.[a-z]+\?_a\=([\w]+)\&(amp;)?([\w]+)\=([\w\-\_]+)([^"\']*)';
+ _a = '';
+ __construct();
   Build an array of ALL categories
   If SEO is enabled and If URL is an un-ignored SEO.
   Generate SEO URL. If the SEO URL != to the current URL, Push the user to that URL
+ static getInstance(); Setup the instance (singleton)
+ addIgnore($string); Add another element to the ignored url segments
+ buildURL($type, $item_id = false, $amp = '&'); Build SEO URL
+ delete($type, $item_id); Delete SEO URL
+ displayMetaData(); Put the META data to the GUI
+ enabled(); SEO enabled?
+ fullURL($url, $process = false); Create full URL
+ getItem($path, $url = false); Create item URL
+ getdbPath($type, $item_id); Get SEO URLs from the DB
+ generatePath($id = null, $type = null, $key = null, $absolute = false, $extension = false); Generate SEO path
+ getDirectory($cat_id, $link = false, $glue = '/', $append = false, $custom = true); Create meta description
+ getExtension(); Get the SEO extension
+ meta_description($glue = ' - '); Create meta description
+ meta_keywords($glue = ','); Make Meta keywords
+ meta_title($glue = ' - '); Make Meta title
+ queryString($query); Parse query string
+ rebuildCategoryList(); Rebuild category listings
+ rewriteUrls($page_html, $full_urls = false); Rewrite URL
+ SEOable($path); Can we use SEO
+ setdbPath($type, $item_id, $path, $bool = true, $show_error = true); Set a DB path
+ set_meta_data($meta_data); Set all meta data
+ setCache($enable); Enable/Disable cache
+ sitemap(); Create sitemap
- _getBaseUrl($full_urls = false); Get the base url
- _getCategoryList($rebuild = false); Get categories
- _getItemVars($type, $item_id); Get an SEO item
- _safeUrl($url); Is URL safe?
- _sitemap_link($input, $updated = false, $type = false); Create sitemap link
- _trackback($product_id = false, $data = false); Create talkback