From 9d46d280b1f611904080ace89e48e0970b03be43 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 27 Mar 2013 15:18:38 +0400 Subject: [PATCH] split several social plugins from trunk to separate optional downloads (see forum) --- plugins/flattr/flattr.png | Bin 693 -> 0 bytes plugins/flattr/init.php | 46 -------------- plugins/googleplus/googleplus.js | 29 --------- plugins/googleplus/googleplus.png | Bin 3295 -> 0 bytes plugins/googleplus/init.php | 53 ----------------- plugins/identica/identica.js | 31 ---------- plugins/identica/identica.png | Bin 121 -> 0 bytes plugins/identica/init.php | 53 ----------------- plugins/owncloud/init.php | 96 ------------------------------ plugins/owncloud/owncloud.js | 27 --------- plugins/owncloud/owncloud.png | Bin 625 -> 0 bytes plugins/pinterest/init.php | 53 ----------------- plugins/pinterest/pinterest.js | 31 ---------- plugins/pinterest/pinterest.png | Bin 3829 -> 0 bytes plugins/pocket/init.php | 54 ----------------- plugins/pocket/pocket.js | 31 ---------- plugins/pocket/pocket.png | Bin 471 -> 0 bytes plugins/tweet/init.php | 53 ----------------- plugins/tweet/tweet.js | 31 ---------- plugins/tweet/tweet.png | Bin 159 -> 0 bytes 20 files changed, 588 deletions(-) delete mode 100644 plugins/flattr/flattr.png delete mode 100644 plugins/flattr/init.php delete mode 100644 plugins/googleplus/googleplus.js delete mode 100644 plugins/googleplus/googleplus.png delete mode 100644 plugins/googleplus/init.php delete mode 100644 plugins/identica/identica.js delete mode 100644 plugins/identica/identica.png delete mode 100644 plugins/identica/init.php delete mode 100644 plugins/owncloud/init.php delete mode 100644 plugins/owncloud/owncloud.js delete mode 100644 plugins/owncloud/owncloud.png delete mode 100644 plugins/pinterest/init.php delete mode 100644 plugins/pinterest/pinterest.js delete mode 100644 plugins/pinterest/pinterest.png delete mode 100644 plugins/pocket/init.php delete mode 100644 plugins/pocket/pocket.js delete mode 100644 plugins/pocket/pocket.png delete mode 100644 plugins/tweet/init.php delete mode 100644 plugins/tweet/tweet.js delete mode 100644 plugins/tweet/tweet.png diff --git a/plugins/flattr/flattr.png b/plugins/flattr/flattr.png deleted file mode 100644 index 4933ffc21187b212de7a52509806adb1bbad1d32..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 693 zcmV;m0!safP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyV> z5D^DbYG=p*00K2hL_t(I%Z-yyNR&|&#eesGpIXx&D_u;G?ILQ`G9jWC6`@&_U?2p! zh)7D495E~kO>`uSAZihjND;Y+(jp_sj3jG_HbD_Yty_p$;C%DmyDj`TV_2Qd<2~*@ z=W@<{LKc4XZLh*e8L$Z`0favxMtz1ljs=t`;eO-v72Ct>F%2UTA@DbrVuvw91qKY-r zwerw#)6F->I|CavIG704YFVz1zQ9N=!e>0-c@KU=p7&j`BO{6HqsLkU8ztP7kPp@R zby?lNB#@dFH7~yaj9uGOfanqfS7S#<61_u*!*moKv^wWgs8)-!2)<(V+svgPVs}!Q96;>E>q+4LYzEHad~QlP1PT)TB}H#D_<3)k+Ifs_ zs^r4cO0(EgZjB5kcJ`$KoU?Y`YDvhnoeG3r7yS&41IY9KiYj}IWBp8ZHj8=WDIlink = $host->get_link(); - $this->host = $host; - - $host->add_hook($host::HOOK_ARTICLE_BUTTON, $this); - } - - function about() { - return array(1.1, - "Share articles on Flattr (if they exist in their catalogue)", - "F. Eitel, N. Honing"); - } - - function hook_article_button($line) { - - $rv = ""; - $article_link = $line['link']; - - if ($article_link) { - $encoded = urlencode($article_link); - $r = file_get_contents("https://api.flattr.com/rest/v2/things/lookup/?url=$encoded"); - $response = json_decode($r, true); - $image = ""; - // if Flattr has it in the catalogue, we display the button - if ($response and array_key_exists('link', $response)) { - $rv = " . $image . "; - } else { - // We can't submit a thing to the catalogue without giving a Flattr user id (who would be the owner) - // see http://developers.flattr.net/auto-submit - //$rv = "" . $image . ""; - $rv = ''; - // Another useful thing would be any rel=payment link (which would have the user id as well), - // but tt-rss is not checking that (yet), I believe. See http://developers.flattr.net/feed - } - } - return $rv; - } -} -?> diff --git a/plugins/googleplus/googleplus.js b/plugins/googleplus/googleplus.js deleted file mode 100644 index 027d9b40..00000000 --- a/plugins/googleplus/googleplus.js +++ /dev/null @@ -1,29 +0,0 @@ - function shareArticleToGooglePlus(id) { - try { - var query = "?op=pluginhandler&plugin=googleplus&method=getInfo&id=" + param_escape(id); - - console.log(query); - - var d = new Date(); - var ts = d.getTime(); - - var w = window.open('backend.php?op=backend&method=loading', 'ttrss_tweet', - "status=0,toolbar=0,location=0,width=500,height=450,scrollbars=1,menubar=0"); - - new Ajax.Request("backend.php", { - parameters: query, - onComplete: function(transport) { - var ti = JSON.parse(transport.responseText); - - var share_url = "https://plus.google.com/share?url=" + param_escape(ti.link); - - w.location.href = share_url; - - } }); - - - } catch (e) { - exception_error("tweetArticle", e); - } - } - diff --git a/plugins/googleplus/googleplus.png b/plugins/googleplus/googleplus.png deleted file mode 100644 index ac46126d764dc472cff0168dbf0173c6a1f9bc62..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3295 zcmV<53?TD~P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l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(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}0005{Nkl|JMGL8g6n!j&C~MI!+qUm7NN5ugBveLHP?#p8g$2=~1}enF!SeO}xF4s5Ku57%W~8^aY<75E$a-bSNc?| zOMplIEF&Z1L?UE^XOO;g$o5XOql0314`%ueTTk{$0|O@k-aEX4Yi-ArCormb5t7Px zR=$2F{#n5$3GtV?W{75A4=&Gf&f&brCadJ}3f5Y}i5EoA9%A2)W0$K$qYs(|Z~Q3`walink = $host->get_link(); - $this->host = $host; - - $host->add_hook($host::HOOK_ARTICLE_BUTTON, $this); - } - - function about() { - return array(1.0, - "Share article on Google+", - "homolibere"); - } - - function get_js() { - return file_get_contents(dirname(__FILE__) . "/googleplus.js"); - } - - function hook_article_button($line) { - $article_id = $line["id"]; - - $rv = ""; - - return $rv; - } - - function getInfo() { - $id = db_escape_string($this->link, $_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)); - } - - -} -?> diff --git a/plugins/identica/identica.js b/plugins/identica/identica.js deleted file mode 100644 index d31fc55f..00000000 --- a/plugins/identica/identica.js +++ /dev/null @@ -1,31 +0,0 @@ - function shareArticleToIdentica(id) { - try { - var query = "?op=pluginhandler&plugin=identica&method=getInfo&id=" + param_escape(id); - - console.log(query); - - var d = new Date(); - var ts = d.getTime(); - - var w = window.open('backend.php?op=backend&method=loading', 'ttrss_tweet', - "status=0,toolbar=0,location=0,width=600,height=500,scrollbars=1,menubar=0"); - - new Ajax.Request("backend.php", { - parameters: query, - onComplete: function(transport) { - var ti = JSON.parse(transport.responseText); - - var share_url = "http://identi.ca/index.php?action=bookmarkpopup&_=" + ts + - "&title=" + param_escape(ti.title) + - "&url=" + param_escape(ti.link); - - w.location.href = share_url; - - } }); - - - } catch (e) { - exception_error("shareArticleIdentica", e); - } - } - diff --git a/plugins/identica/identica.png b/plugins/identica/identica.png deleted file mode 100644 index ee3cb61ea83e774986cf51e66984d80dc1deff4c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 121 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!D3?x-;bCrM;OS+@4BLl<6e(pbstUx|nfKP}k zkp7jxQorOuIgrIz666=m;PC858jvIC>Eal|aXmSKf%&(6i=YGpL!2Ss(Stpa>wuCB Mp00i_>zopr0FTrhAOHXW diff --git a/plugins/identica/init.php b/plugins/identica/init.php deleted file mode 100644 index 8e0ad4b9..00000000 --- a/plugins/identica/init.php +++ /dev/null @@ -1,53 +0,0 @@ -link = $host->get_link(); - $this->host = $host; - - $host->add_hook($host::HOOK_ARTICLE_BUTTON, $this); - } - - function about() { - return array(1.0, - "Share articles on Identi.ca", - "fox"); - } - - function get_js() { - return file_get_contents(dirname(__FILE__) . "/identica.js"); - } - - function hook_article_button($line) { - $article_id = $line["id"]; - - $rv = ""; - - return $rv; - } - - function getInfo() { - $id = db_escape_string($this->link, $_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)); - } - - -} -?> diff --git a/plugins/owncloud/init.php b/plugins/owncloud/init.php deleted file mode 100644 index 5d215b38..00000000 --- a/plugins/owncloud/init.php +++ /dev/null @@ -1,96 +0,0 @@ -link = $host->get_link(); - $this->host = $host; - - $host->add_hook($host::HOOK_ARTICLE_BUTTON, $this); - $host->add_hook($host::HOOK_PREFS_TAB, $this); - } - - function save() { - $owncloud_url = db_escape_string($this->link, $_POST["owncloud_url"]); - $this->host->set($this, "owncloud", $owncloud_url); - echo "Value set to $owncloud_url"; - } - - function get_js() { - return file_get_contents(dirname(__FILE__) . "/owncloud.js"); - } - - function hook_prefs_tab($args) { - if ($args != "prefPrefs") return; - - print "
"; - - print "
"; - - $value = $this->host->get($this, "owncloud"); - print "
"; - - print ""; - - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print "
".__("Owncloud url")."
"; - print "

"; - - print "

"; - - print "
"; #pane - - } - - function hook_article_button($line) { - return ""; - } - - function getOwnCloud() { - $id = db_escape_string($this->link, $_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'); - } - - $own_url = $this->host->get($this, "owncloud"); - - print json_encode(array("title" => $title, "link" => $article_link, - "id" => $id, "ownurl" => $own_url)); - } -} -?> diff --git a/plugins/owncloud/owncloud.js b/plugins/owncloud/owncloud.js deleted file mode 100644 index df929e01..00000000 --- a/plugins/owncloud/owncloud.js +++ /dev/null @@ -1,27 +0,0 @@ -function ownArticle(id) { - try { - var query = "?op=pluginhandler&plugin=owncloud&method=getOwnCloud&id=" + param_escape(id); - - console.log(query); - - var d = new Date(); - var ts = d.getTime(); - - var w = window.open('backend.php?op=backend&method=loading', 'ttrss_tweet', - "status=0,toolbar=0,location=0,width=600,height=500,scrollbars=1,menubar=0"); - - new Ajax.Request("backend.php", { - parameters: query, - onComplete: function(transport) { - var ti = JSON.parse(transport.responseText); - - var share_url = ti.ownurl + "/apps/bookmarks/addBm.php?output=popup&url=" + param_escape(ti.link) - + '&title=' + ti.title; - - w.location.href = share_url; - } }); - } catch (e) { - exception_error("ownArticle", e); - } -} - diff --git a/plugins/owncloud/owncloud.png b/plugins/owncloud/owncloud.png deleted file mode 100644 index d31ba924be958e7017a0ae5643a4700d93dc858b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 625 zcmV-%0*?KOP)+0d?sYYt6HqzRDpLfYo9``=u&F~2O_S6Hy^`=&Gb9{XM@|EQKQEoQ3QCCw* z%biYCs5~b82O7c7I4#)PU^+6*8%&2b#*P~?ZU1B<*hWm7F?RerEYQz3`t_W@00000 LNkvXXu0mjfK%X9( diff --git a/plugins/pinterest/init.php b/plugins/pinterest/init.php deleted file mode 100644 index 11fe64eb..00000000 --- a/plugins/pinterest/init.php +++ /dev/null @@ -1,53 +0,0 @@ -link = $host->get_link(); - $this->host = $host; - - $host->add_hook($host::HOOK_ARTICLE_BUTTON, $this); - } - - function get_js() { - return file_get_contents(dirname(__FILE__) . "/pinterest.js"); - } - - function hook_article_button($line) { - $article_id = $line["id"]; - - $rv = ""; - - return $rv; - } - - function getInfo() { - $id = db_escape_string($this->link, $_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)); - } - - -} -?> diff --git a/plugins/pinterest/pinterest.js b/plugins/pinterest/pinterest.js deleted file mode 100644 index 01c525f5..00000000 --- a/plugins/pinterest/pinterest.js +++ /dev/null @@ -1,31 +0,0 @@ - function pinterest(id) { - try { - var query = "?op=pluginhandler&plugin=pinterest&method=getInfo&id=" + param_escape(id); - - console.log(query); - - var d = new Date(); - var ts = d.getTime(); - - var w = window.open('backend.php?op=backend&method=loading', 'ttrss_tweet', - "status=0,toolbar=0,location=0,width=650,height=600,scrollbars=1,menubar=0"); - - new Ajax.Request("backend.php", { - parameters: query, - onComplete: function(transport) { - var ti = JSON.parse(transport.responseText); - - var share_url = "http://pinterest.com/pin/create/button/?" + - "url=" + param_escape(ti.link) + - "&description=" + param_escape(ti.title); - - w.location.href = share_url; - - } }); - - - } catch (e) { - exception_error("tweetArticle", e); - } - } - diff --git a/plugins/pinterest/pinterest.png b/plugins/pinterest/pinterest.png deleted file mode 100644 index b85aed3cd6be0c16eb3b4c3c83eb3f9f2ca5abd3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3829 zcmaJ^2{e^$*WSlD<}qVPnKBOL)2s+T155JhGcIXZ?yLWIaX zmU(!QsUsZcfAsz9{n!8h-}?4i_r0I>+}E}5YwvsCYdufY2@6AJ20jJ=U^X_=vqn7I z-k_sF=0j@~SH#i#8aZAAVC2{vC`d`$55Qn~0f#$r!qdmk=bERFub?pwC+K_C$K%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n+?Cg%WVY7augu=u^nN#e*kZO~%?d0ZEY57H~vv+IEXR-ffcHoqTT`jm$=$E%OG zJFmX;TP+=$;;?^bpYlrmtoOX%yvA8qOTPka0{)O>JEJDtT@v7uRvVLo9=5_xWyX z2@kh?&}PpFA z2*A7xfO--DkI$2{p9}yng2sBfwl`70hFRW5Q79CU=Ho;81_T&jFc?o16%`hV$AXN1 zXRDOm-S;~?J4uhj!z+8Hrzs%C%S)A(kPt;IFQ;s*uOspPv+ZH_uzQ?6E-LZyV`C99 zF@nC4(LXzOBqqc6*JZHO-Tmhsn}h@i+nfM}i=O{rs@}bWk-){#s(-FYJlBc=)ZFhev}jbV9aaY!5#Rd@M)+4D-{}MYwKZSZ4FQe3A3;Odz}9XfXKlhOJv0FN#jve zgpHL|SYKIz#nv{UL5j(xsPHe@2#XrQ{z(CO{zn0Wun+Dk)Hj9L8dh{H8u0n@-oQezkqK>=0GPc38d9k_(>qbuZqe)d9omdWS5ix$*eS( zMX)GD?e^AIJ!X?cdbPT;at1?94YNp<<*Nv=GCK#~-+us37G_{XQv)5+ft)5rz~gcn zCdbG3c7}o8URYjS%s>TQzpjbgg?c%p@@z=wk&)xsi%!qL06hDVe@Mi(e*cEmJw^Y$ z^FUu8j13JXCB?+tL?JhdQAJ%{NM1<^&&0xFPL07FKq8?3F#pelT;*SgHP6q^W)@{< fmm|v?$e~au)8E7ASoJ>r+`}8|Tj-TwUGDuC7tyqi diff --git a/plugins/pocket/init.php b/plugins/pocket/init.php deleted file mode 100644 index e96d0800..00000000 --- a/plugins/pocket/init.php +++ /dev/null @@ -1,54 +0,0 @@ -link = $host->get_link(); - $this->host = $host; - - $host->add_hook($host::HOOK_ARTICLE_BUTTON, $this); - } - - function get_js() { - return file_get_contents(dirname(__FILE__) . "/pocket.js"); - } - - function hook_article_button($line) { - $article_id = $line["id"]; - - $rv = ""; - - return $rv; - } - - function getInfo() { - $id = db_escape_string($this->link, $_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)); - } - - -} -?> diff --git a/plugins/pocket/pocket.js b/plugins/pocket/pocket.js deleted file mode 100644 index 021d5bb0..00000000 --- a/plugins/pocket/pocket.js +++ /dev/null @@ -1,31 +0,0 @@ - function shareArticleToPocket(id) { - try { - var query = "?op=pluginhandler&plugin=pocket&method=getInfo&id=" + param_escape(id); - - console.log(query); - - var d = new Date(); - var ts = d.getTime(); - - var w = window.open('backend.php?op=backend&method=loading', 'ttrss_tweet', - "status=0,toolbar=0,location=0,width=500,height=400,scrollbars=1,menubar=0"); - - new Ajax.Request("backend.php", { - parameters: query, - onComplete: function(transport) { - var ti = JSON.parse(transport.responseText); - - var share_url = "https://getpocket.com/save?" + - "&title=" + param_escape(ti.title) + - "&url=" + param_escape(ti.link); - - w.location.href = share_url; - - } }); - - - } catch (e) { - exception_error("tweetArticle", e); - } - } - diff --git a/plugins/pocket/pocket.png b/plugins/pocket/pocket.png deleted file mode 100644 index ff6bc85a450c35cc26fb912538bfc38ce88c0fe0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 471 zcmV;|0Vw{7P)daKEuIp3XgX5e3!T8pE4;||g-z&C2_liSNn-vDZt zHguZDE4fmHU6FWasHBy3M_{ruDme$`TA zUT*)|?6p0O+VpK1v{D@(UE6s9JI{ZNPVNEDSDNzxhxPm8SI=JnOtKtE4-V^%^;8s( z@|ETs!2ZaSd$owSNPWhZRa5}Rt3qRCkb_yoo9`nN4*{}>*Mhz>KpC%A0EuF%=J;Tp znUp<{MfS0@mAh=qCQ(dPLW~p}hDF&3uw+TOq}-Bq2DM=!QfyRyBEbIeR*8*B~P;YeGMSn&NmG<6A@wt0>>45*P{s5oJlkTTY`F{Wa N002ovPDHLkV1k&R%)$Tw diff --git a/plugins/tweet/init.php b/plugins/tweet/init.php deleted file mode 100644 index bbcf7836..00000000 --- a/plugins/tweet/init.php +++ /dev/null @@ -1,53 +0,0 @@ -link = $host->get_link(); - $this->host = $host; - - $host->add_hook($host::HOOK_ARTICLE_BUTTON, $this); - } - - function about() { - return array(1.0, - "Share article on Twitter", - "fox"); - } - - function get_js() { - return file_get_contents(dirname(__FILE__) . "/tweet.js"); - } - - function hook_article_button($line) { - $article_id = $line["id"]; - - $rv = ""; - - return $rv; - } - - function getInfo() { - $id = db_escape_string($this->link, $_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)); - } - - -} -?> diff --git a/plugins/tweet/tweet.js b/plugins/tweet/tweet.js deleted file mode 100644 index 07e89d5f..00000000 --- a/plugins/tweet/tweet.js +++ /dev/null @@ -1,31 +0,0 @@ - function tweetArticle(id) { - try { - var query = "?op=pluginhandler&plugin=tweet&method=getInfo&id=" + param_escape(id); - - console.log(query); - - var d = new Date(); - var ts = d.getTime(); - - var w = window.open('backend.php?op=backend&method=loading', 'ttrss_tweet', - "status=0,toolbar=0,location=0,width=500,height=400,scrollbars=1,menubar=0"); - - new Ajax.Request("backend.php", { - parameters: query, - onComplete: function(transport) { - var ti = JSON.parse(transport.responseText); - - var share_url = "http://twitter.com/share?_=" + ts + - "&text=" + param_escape(ti.title) + - "&url=" + param_escape(ti.link); - - w.location.href = share_url; - - } }); - - - } catch (e) { - exception_error("tweetArticle", e); - } - } - diff --git a/plugins/tweet/tweet.png b/plugins/tweet/tweet.png deleted file mode 100644 index ad3c177a2d9e0e17f9a456aeb4bb86fff9e7be97..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 159 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!93?!50ihlx9Ea{HEjtmSN`?>!lvI6-$0X`wF zKw5qNG2=7;f#BDY7A+v3u_VYZn8D%MjWi&~(9^{+gyVX0LId-)HB%XR-u(X`pO8?` ztFj~hfBk_2f3r+`7>XYzz1bfY-=M*k-OS7|ce3nuM-}EMpk@Y7S3j3^P6Z