CI_Trackback Class Reference

List of all members.

Public Member Functions

 CI_Trackback ()
 send ($tb_data)
 receive ()
 send_error ($message= 'Incomplete Information')
 send_success ()
 data ($item)
 process ($url, $data)
 extract_urls ($urls)
 validate_url ($url)
 get_id ($url)
 convert_xml ($str)
 limit_characters ($str, $n=500, $end_char= '…')
 convert_ascii ($str)
 set_error ($msg)
 display_errors ($open= '< p >', $close= '</p >')

Public Attributes

 $time_format = 'local'
 $charset = 'UTF-8'
 $data = array('url' => '', 'title' => '', 'excerpt' => '', 'blog_name' => '', 'charset' => '')
 $convert_ascii = TRUE
 $response = ''
 $error_msg = array()


Member Function Documentation

CI_Trackback::CI_Trackback (  ) 

Constructor

public

CI_Trackback::convert_ascii ( str  ) 

High ASCII to Entities

Converts Hight ascii text and MS Word special chars to character entities

public

Parameters:
string 
Returns:
string

CI_Trackback::convert_xml ( str  ) 

Convert Reserved XML characters to Entities

public

Parameters:
string 
Returns:
string

CI_Trackback::data ( item  ) 

Fetch a particular item

public

Parameters:
string 
Returns:
string

CI_Trackback::display_errors ( open = '<p>',
close = '</p>' 
)

Show error messages

public

Parameters:
string 
string 
Returns:
string

CI_Trackback::extract_urls ( urls  ) 

Extract Trackback URLs

This function lets multiple trackbacks be sent. It takes a string of URLs (separated by comma or space) and puts each URL into an array

public

Parameters:
string 
Returns:
string

CI_Trackback::get_id ( url  ) 

Find the Trackback URL's ID

public

Parameters:
string 
Returns:
string

CI_Trackback::limit_characters ( str,
n = 500,
end_char = '&#8230;' 
)

Character limiter

Limits the string based on the character count. Will preserve complete words.

public

Parameters:
string 
integer 
string 
Returns:
string

CI_Trackback::process ( url,
data 
)

Process Trackback

Opens a socket connection and passes the data to the server. Returns true on success, false on failure

public

Parameters:
string 
string 
Returns:
bool

CI_Trackback::receive (  ) 

Receive Trackback Data

This function simply validates the incoming TB data. It returns false on failure and true on success. If the data is valid it is set to the $this->data array so that it can be inserted into a database.

public

Returns:
bool

CI_Trackback::send ( tb_data  ) 

Send Trackback

public

Parameters:
array 
Returns:
bool

CI_Trackback::send_error ( message = 'Incomplete Information'  ) 

Send Trackback Error Message

Allows custom errors to be set. By default it sends the "incomplete information" error, as that's the most common one.

public

Parameters:
string 
Returns:
void

CI_Trackback::send_success (  ) 

Send Trackback Success Message

This should be called when a trackback has been successfully received and inserted.

public

Returns:
void

CI_Trackback::set_error ( msg  ) 

Set error message

public

Parameters:
string 
Returns:
void

CI_Trackback::validate_url ( url  ) 

Validate URL

Simply adds "http://" if missing

public

Parameters:
string 
Returns:
string


Member Data Documentation

CI_Trackback::$charset = 'UTF-8'

CI_Trackback::$convert_ascii = TRUE

CI_Trackback::$data = array('url' => '', 'title' => '', 'excerpt' => '', 'blog_name' => '', 'charset' => '')

CI_Trackback::$error_msg = array()

CI_Trackback::$response = ''

CI_Trackback::$time_format = 'local'


The documentation for this class was generated from the following file:

Generated on Sun Nov 16 16:09:17 2008 for CodeIgniter by  doxygen 1.5.7.1