]>
git.wh0rd.org - tt-rss.git/blob - plugins/googleplus/googleplus.php
9505b409612f50da19af4316c64649f582ade155
2 class GooglePlus
extends Plugin
{
6 function __construct($host) {
7 $this->link
= $host->get_link();
10 $host->add_hook($host::HOOK_ARTICLE_BUTTON
, $this);
14 return file_get_contents(dirname(__FILE__
) . "/googleplus.js");
17 function hook_article_button($line) {
18 $article_id = $line["id"];
20 $rv = "<img src=\"".theme_image($this->link
, 'plugins/googleplus/googleplus.png')."\"
21 class='tagsPic' style=\"cursor : pointer\"
22 onclick=\"shareArticleToGooglePlus($article_id)\"
23 title='".__('Share on Google+')."'>";
29 $id = db_escape_string($_REQUEST['id']);
31 $result = db_query($this->link
, "SELECT title, link
32 FROM ttrss_entries, ttrss_user_entries
33 WHERE id = '$id' AND ref_id = id AND owner_uid = " .$_SESSION['uid']);
35 if (db_num_rows($result) != 0) {
36 $title = truncate_string(strip_tags(db_fetch_result($result, 0, 'title')),
38 $article_link = db_fetch_result($result, 0, 'link');
41 print json_encode(array("title" => $title, "link" => $article_link,