]>
git.wh0rd.org - tt-rss.git/blob - plugins/identica/identica.php
2 class Identica
extends Plugin
{
6 function __construct($host) {
7 $this->link
= $host->get_link();
10 $host->add_hook($host::HOOK_ARTICLE_BUTTON
, $this);
20 return file_get_contents(dirname(__FILE__
) . "/identica.js");
23 function hook_article_button($line) {
24 $article_id = $line["id"];
26 $rv = "<img src=\"".theme_image($this->link
, 'plugins/identica/identica.png')."\"
27 class='tagsPic' style=\"cursor : pointer\"
28 onclick=\"shareArticleToIdentica($article_id)\"
29 title='".__('Share on identi.ca')."'>";
35 $id = db_escape_string($_REQUEST['id']);
37 $result = db_query($this->link
, "SELECT title, link
38 FROM ttrss_entries, ttrss_user_entries
39 WHERE id = '$id' AND ref_id = id AND owner_uid = " .$_SESSION['uid']);
41 if (db_num_rows($result) != 0) {
42 $title = truncate_string(strip_tags(db_fetch_result($result, 0, 'title')),
44 $article_link = db_fetch_result($result, 0, 'link');
47 print json_encode(array("title" => $title, "link" => $article_link,