-
Notifications
You must be signed in to change notification settings - Fork 0
CI_Trackback
Trackback Class
Trackback Sending/Receiving Class
- Class name: CI_Trackback
- Namespace:
public string $charset = 'UTF-8'
Character set
- Visibility: public
public array $data = array('url' => '', 'title' => '', 'excerpt' => '', 'blog_name' => '', 'charset' => '')
Trackback data
- Visibility: public
public boolean $convert_ascii = TRUE
Convert ASCII flag
Whether to convert high-ASCII and MS Word characters to HTML entities.
- Visibility: public
public string $response = ''
Response
- Visibility: public
public array<mixed,string> $error_msg = array()
Error messages list
- Visibility: public
void CI_Trackback::__construct()
Constructor
- Visibility: public
boolean CI_Trackback::send($tb_data)
Send Trackback
- Visibility: public
- $tb_data mixed
boolean 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.
- Visibility: public
void CI_Trackback::send_error($message)
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.
- Visibility: public
- $message mixed
void CI_Trackback::send_success()
Send Trackback Success Message
This should be called when a trackback has been successfully received and inserted.
- Visibility: public
string CI_Trackback::data($item)
Fetch a particular item
- Visibility: public
- $item mixed
boolean 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
- Visibility: public
- $url mixed
- $data mixed
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
- Visibility: public
- $urls mixed
void CI_Trackback::validate_url($url)
Validate URL
Simply adds "http://" if missing
- Visibility: public
- $url mixed
string CI_Trackback::get_id($url)
Find the Trackback URL's ID
- Visibility: public
- $url mixed
string CI_Trackback::convert_xml($str)
Convert Reserved XML characters to Entities
- Visibility: public
- $str mixed
string CI_Trackback::limit_characters($str, $n, $end_char)
Character limiter
Limits the string based on the character count. Will preserve complete words.
- Visibility: public
- $str mixed
- $n mixed
- $end_char mixed
string CI_Trackback::convert_ascii($str)
High ASCII to Entities
Converts Hight ascii text and MS Word special chars to character entities
- Visibility: public
- $str mixed
void CI_Trackback::set_error($msg)
Set error message
- Visibility: public
- $msg mixed
string CI_Trackback::display_errors($open, $close)
Show error messages
- Visibility: public
- $open mixed
- $close mixed