[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/includes/classes/ -> seo.class.php (summary)

Ultimate SEO URLs Contribution - osCommerce MS-2.2 Ultimate SEO URLs offers search engine optimized URLS for osCommerce based applications. Other features include optimized performance and automatic redirect script.

Author: Bobby Easland
Copyright: Copyright 2005, Bobby Easland
File Size: 1965 lines (107 kb)
Included or required: 2 times
Referenced: 0 times
Includes or requires: 0 files

Defines 3 classes

SEO_DataBase:: (10 methods):
  SEO_DataBase()
  ConnectDB()
  SelectDB()
  Query()
  FetchArray()
  NumRows()
  InsertID()
  Free()
  Slashes()
  DBPerform()

SEO_URL_INSTALLER:: (5 methods):
  SEO_URL_INSTALLER()
  init()
  eval_defaults()
  uninstall_settings()
  install_settings()

SEO_URL:: (48 methods):
  SEO_URL()
  href_link()
  stock_href_link()
  add_sid()
  parse_parameters()
  make_url()
  get_product_name()
  get_category_name()
  get_manufacturer_name()
  get_article_name()
  get_topic_name()
  get_information_name()
  get_full_cPath()
  GetParentCategories()
  not_null()
  is_attribute_string()
  is_product_string()
  is_cPath_string()
  profile()
  calculate_performance()
  strip()
  expand()
  short_name()
  implode_assoc()
  PrintArray()
  start()
  stop()
  parse_input_field_data()
  output_string()
  SessionID()
  SessionName()
  generate_products_cache()
  generate_manufacturers_cache()
  generate_categories_cache()
  generate_articles_cache()
  generate_topics_cache()
  generate_information_cache()
  save_cache()
  get_cache()
  get_cache_memory()
  cache_gc()
  convert_time()
  is_cached()
  check_redirect()
  need_redirect()
  check_seo_page()
  parse_path()
  do_redirect()


Class: SEO_DataBase  - X-Ref

Modified for MySQL5 in STRICT mode
by FWR Media
www.fwrmedia.co.uk

SEO_DataBase($host, $user, $db, $pass)   X-Ref
MySQL_DataBase class constructor

author: Bobby Easland
param: string $host
param: string $user
param: string $db
param: string $pass  

ConnectDB()   X-Ref
Function to connect to MySQL

author: Bobby Easland

SelectDB()   X-Ref
Function to select the database

author: Bobby Easland
return: resoource

Query($query)   X-Ref
Function to perform queries

author: Bobby Easland
param: string $query SQL statement
return: resource

FetchArray($resource_id, $type = MYSQL_BOTH)   X-Ref
Function to fetch array

author: Bobby Easland
param: resource $resource_id
param: string $type MYSQL_BOTH or MYSQL_ASSOC
return: array

NumRows($resource_id)   X-Ref
Function to fetch the number of rows

author: Bobby Easland
param: resource $resource_id
return: mixed  

InsertID()   X-Ref
Function to fetch the last insertID

author: Bobby Easland
return: integer  

Free($resource_id)   X-Ref
Function to free the resource

author: Bobby Easland
param: resource $resource_id
return: boolean

Slashes($data)   X-Ref
Function to add slashes

author: Bobby Easland
param: string $data
return: string

DBPerform($table, $data, $action = 'insert', $parameters = '')   X-Ref
Function to perform DB inserts and updates - abstracted from osCommerce-MS-2.2 project

author: Bobby Easland
param: string $table Database table
param: array $data Associative array of columns / values
param: string $action insert or update
param: string $parameters
return: resource

Class: SEO_URL_INSTALLER  - X-Ref

Ultimate SEO URLs Installer and Configuration Class

Ultimate SEO URLs installer and configuration class offers a modular
and easy to manage method of configuration.  The class enables the base
class to be configured and installed on the fly without the hassle of
calling additional scripts or executing SQL.
SEO_URL_INSTALLER()   X-Ref
SEO_URL_INSTALLER class constructor

author: Bobby Easland

init()   X-Ref
Initializer - if there are settings not defined the default config will be used and database settings installed.

author: Bobby Easland

eval_defaults()   X-Ref
This function evaluates the default serrings into defined constants

author: Bobby Easland

uninstall_settings()   X-Ref
This function removes the database settings (configuration and cache)

author: Bobby Easland

install_settings()   X-Ref
This function installs the database settings

author: Bobby Easland

Class: SEO_URL  - X-Ref

Ultimate SEO URLs Base Class

Ultimate SEO URLs offers search engine optimized URLS for osCommerce
based applications. Other features include optimized performance and
automatic redirect script.
SEO_URL($languages_id)   X-Ref
SEO_URL class constructor

author: Bobby Easland
param: integer $languages_id

href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true)   X-Ref
Function to return SEO URL link SEO'd with stock generattion for error fallback

author: Bobby Easland
param: string $page Base script for URL
param: string $parameters URL parameters
param: string $connection NONSSL/SSL
param: boolean $add_session_id Switch to add osCsid
return: string Formed href link

stock_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true)   X-Ref
Stock function, fallback use


add_sid( $link, $add_session_id, $connection, $separator )   X-Ref
Function to append session ID if needed

author: Bobby Easland
param: string $link
param: boolean $add_session_id
param: string $connection
param: string $separator
return: string

parse_parameters($page, $params, &$separator)   X-Ref
SFunction to parse the parameters into an SEO URL

author: Bobby Easland
param: string $page
param: string $params
param: string $separator NOTE: passed by reference
return: string

make_url($page, $string, $anchor_type, $id, $extension = '.html', &$separator)   X-Ref
Function to return the generated SEO URL

author: Bobby Easland
param: string $page
param: string $string Stripped, formed anchor
param: string $anchor_type Parameter type (products_id, cPath, etc.)
param: integer $id
param: string $extension Default = .html
param: string $separator NOTE: passed by reference
return: string

get_product_name($pID)   X-Ref
Function to get the product name. Use evaluated cache, per page cache, or database query in that order of precedent

author: Bobby Easland
param: integer $pID
return: string Stripped anchor text

get_category_name(&$cID)   X-Ref
Function to get the category name. Use evaluated cache, per page cache, or database query in that order of precedent

author: Bobby Easland
param: integer $cID NOTE: passed by reference
return: string Stripped anchor text

get_manufacturer_name($mID)   X-Ref
Function to get the manufacturer name. Use evaluated cache, per page cache, or database query in that order of precedent.

author: Bobby Easland
param: integer $mID
return: string

get_article_name($aID)   X-Ref
Function to get the article name. Use evaluated cache, per page cache, or database query in that order of precedent.

author: Bobby Easland
param: integer $aID
return: string

get_topic_name($tID)   X-Ref
Function to get the topic name. Use evaluated cache, per page cache, or database query in that order of precedent.

author: Bobby Easland
param: integer $tID
return: string

get_information_name($iID)   X-Ref
Function to get the informatin name. Use evaluated cache, per page cache, or database query in that order of precedent.

author: Bobby Easland
param: integer $iID
return: string

get_full_cPath($cID, &$original)   X-Ref
Function to retrieve full cPath from category ID

author: Bobby Easland
param: mixed $cID Could contain cPath or single category_id
param: integer $original Single category_id passed back by reference
return: string Full cPath string

GetParentCategories(&$categories, $categories_id)   X-Ref
Recursion function to retrieve parent categories from category ID

author: Bobby Easland
param: mixed $categories Passed by reference
param: integer $categories_id

not_null($value)   X-Ref
Function to check if a value is NULL

author: Bobby Easland as abstracted from osCommerce-MS2.2
param: mixed $value
return: boolean

is_attribute_string($pID)   X-Ref
Function to check if the products_id contains an attribute

author: Bobby Easland
param: integer $pID
return: boolean

is_product_string($params)   X-Ref
Function to check if the params contains a products_id

author: Bobby Easland
param: string $params
return: boolean

is_cPath_string($params)   X-Ref
Function to check if cPath is in the parameter string

author: Bobby Easland
param: string $params
return: boolean

profile()   X-Ref
Function used to output class profile

author: Bobby Easland

calculate_performance()   X-Ref
Function used to calculate and output the performance metrics of the class

author: Bobby Easland
return: mixed Output of performance data wrapped in HTML pre tags

strip($string)   X-Ref
Function to strip the string of punctuation and white space

author: Bobby Easland
param: string $string
return: string Stripped text. Removes all non-alphanumeric characters.

expand($set)   X-Ref
Function to expand the SEO_CONVERT_SET group

author: Bobby Easland
param: string $set
return: mixed

short_name($str, $limit=3)   X-Ref
Function to return the short word filtered string

author: Bobby Easland
param: string $str
param: integer $limit
return: string Short word filtered

implode_assoc($array, $inner_glue='=', $outer_glue='&')   X-Ref
Function to implode an associative array

author: Bobby Easland
param: array $array Associative data array
param: string $inner_glue
param: string $outer_glue
return: string

PrintArray($array, $heading = '')   X-Ref
Function to print an array within pre tags, debug use

author: Bobby Easland
param: mixed $array

start(&$start_time)   X-Ref
Function to start time for performance metric

author: Bobby Easland
param: float $start_time

stop($start, &$time)   X-Ref
Function to stop time for performance metric

author: Bobby Easland
param: float $start
param: float $time NOTE: passed by reference

parse_input_field_data($data, $parse)   X-Ref
Function to translate a string

author: Bobby Easland
param: string $data String to be translated
param: array $parse Array of tarnslation variables
return: string

output_string($string, $translate = false, $protected = false)   X-Ref
Function to output a translated or sanitized string

author: Bobby Easland
param: string $sting String to be output
param: mixed $translate Array of translation characters
param: boolean $protected Switch for htemlspecialchars processing
return: string

SessionID($sessid = '')   X-Ref
Function to return the session ID

author: Bobby Easland
param: string $sessid
return: string

SessionName($name = '')   X-Ref
Function to return the session name

author: Bobby Easland
param: string $name
return: string

generate_products_cache()   X-Ref
Function to generate products cache entries

author: Bobby Easland

generate_manufacturers_cache()   X-Ref
Function to generate manufacturers cache entries

author: Bobby Easland

generate_categories_cache()   X-Ref
Function to generate categories cache entries

author: Bobby Easland

generate_articles_cache()   X-Ref
Function to generate articles cache entries

author: Bobby Easland

generate_topics_cache()   X-Ref
Function to generate topics cache entries

author: Bobby Easland

generate_information_cache()   X-Ref
Function to generate information cache entries

author: Bobby Easland

save_cache($name, $value, $method='RETURN', $gzip=1, $global=0, $expires = '30/days')   X-Ref
Function to save the cache to database

author: Bobby Easland
param: string $name Cache name
param: mixed $value Can be array, string, PHP code, or just about anything
param: string $method RETURN, ARRAY, EVAL
param: integer $gzip Enables compression
param: integer $global Sets whether cache record is global is scope
param: string $expires Sets the expiration

get_cache($name = 'GLOBAL', $local_memory = false)   X-Ref
Function to get cache entry

author: Bobby Easland
param: string $name
param: boolean $local_memory
return: mixed

get_cache_memory($name, $method = 'RETURN')   X-Ref
Function to get cache from memory

author: Bobby Easland
param: string $name
param: string $method
return: mixed

cache_gc()   X-Ref
Function to perform basic garbage collection for database cache system

author: Bobby Easland

convert_time($expires)   X-Ref
Function to convert time for cache methods

author: Bobby Easland
param: string $expires
return: string

is_cached($name, &$is_cached, &$is_expired)   X-Ref
Function to check if the cache is in the database and expired

author: Bobby Easland
param: string $name
param: boolean $is_cached NOTE: passed by reference
param: boolean $is_expired NOTE: passed by reference

check_redirect()   X-Ref
Function to initialize the redirect logic

author: Bobby Easland

need_redirect()   X-Ref
Function to check if the URL needs to be redirected

author: Bobby Easland

check_seo_page()   X-Ref
Function to check if it's a valid redirect page

author: Bobby Easland

parse_path($path_info)   X-Ref
Function to parse the path for old SEF URLs

author: Bobby Easland
param: string $path_info
return: array

do_redirect()   X-Ref
Function to perform redirect

author: Bobby Easland



Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7