/**
  * Trackback notify the specified trackback url
  * @param	boolean | true on success, otherwise false 
  */
 function trackbackNotify($url)
 {
     $content = new HTMLText('Content');
     $content->setValue($this->owner->Content);
     $excerpt = $content->FirstParagraph();
     if ($this->owner->Parent() && $this->owner->ParentID > 0) {
         $blogName = $this->owner->Parent()->Title;
     } else {
         $blogName = "";
     }
     $postData = array('url' => $this->owner->AbsoluteLink(), 'title' => $this->owner->Title, 'excerpt' => $excerpt, 'blog_name' => $blogName);
     $controller = Object::create(self::$trackback_server_class);
     $response = $controller->request($url, $postData);
     if ($response->getStatusCode() == '200' && stripos($response->getBody(), "<error>0</error>") !== false) {
         return true;
     }
     return false;
 }
Esempio n. 2
0
	/**
	 * Get a bbcode parsed summary of the blog entry
	 */
	function ParagraphSummary(){
		if(self::$allow_wysiwyg_editing) {
			return $this->obj('Content')->FirstParagraph('html');
		} else {
			$parser = new BBCodeParser($this->Content);
			$html = new HTMLText('Content');
			$html->setValue($parser->parse());
			return $html->FirstParagraph('html');
		}
	}
Esempio n. 3
0
 /**
  * Get a bbcode parsed summary of the blog entry
  * @deprecated
  */
 function ParagraphSummary()
 {
     user_error("BlogEntry::ParagraphSummary() is deprecated; use BlogEntry::Content()", E_USER_NOTICE);
     $val = $this->Content();
     $content = $val;
     if (!$content instanceof HTMLText) {
         $content = new HTMLText('Content');
         $content->value = $val;
     }
     return $content->FirstParagraph('html');
 }