From 369dbc19d6ae35c97a2306ae4821c7812e2f24b2 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 17 Aug 2012 14:20:55 +0400 Subject: rework class system to use subdirectories add placeholder plugin/hook system --- classes/button/tweet.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 classes/button/tweet.php (limited to 'classes/button/tweet.php') diff --git a/classes/button/tweet.php b/classes/button/tweet.php new file mode 100644 index 000000000..3157fb779 --- /dev/null +++ b/classes/button/tweet.php @@ -0,0 +1,31 @@ +link, 'images/art-tweet.png')."\" + class='tagsPic' style=\"cursor : pointer\" + onclick=\"tweetArticle($article_id)\" + title='".__('Share on Twitter')."'>"; + + return $rv; + } + + function getTweetInfo() { + $id = db_escape_string($_REQUEST['id']); + + $result = db_query($this->link, "SELECT title, link + FROM ttrss_entries, ttrss_user_entries + WHERE id = '$id' AND ref_id = id AND owner_uid = " .$_SESSION['uid']); + + if (db_num_rows($result) != 0) { + $title = truncate_string(strip_tags(db_fetch_result($result, 0, 'title')), + 100, '...'); + $article_link = db_fetch_result($result, 0, 'link'); + } + + print json_encode(array("title" => $title, "link" => $article_link, + "id" => $id)); + } + + +} +?> -- cgit v1.2.3