Changeset 4749
- Timestamp:
- 12/13/07 15:52:48 (2 years ago)
- Location:
- branches/1.5/plugins/PN_Subscription_Default
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/1.5/plugins/PN_Subscription_Default/index.php
r4530 r4749 1 1 <?php 2 /* Subscription statistics plugin for Textcube 1. 12 /* Subscription statistics plugin for Textcube 1.6 3 3 ---------------------------------- 4 Version 1.54 Version 2.0 5 5 Needlworks development team. 6 6 … … 9 9 10 10 Created at : 2006.9.21 11 Last modified at : 2007. 5.511 Last modified at : 2007.11.22 12 12 13 13 This plugin shows RSS subscription statistics on administration menu. … … 32 32 $temp = getSubscriptionStatistics($blogid); 33 33 $aggregatorInfo = organizeAggregatorInfo($temp); 34 misc::setBlogSetting('SubscriberCount',$totalSubscribers); 35 34 36 ?> 35 37 <script type="text/javascript"> … … 123 125 'Google Desktop' => '구글 데스크탑', 124 126 'RSSOwl' => 'RSS Owl', 125 'Eolin' => '태터툴즈/텍스트큐브 리더', 127 'Eolin' => '태터툴즈 리더', 128 'Textcube' => '텍스트큐브 리더', 126 129 'Safari' => '사파리', 127 130 'NetNewsWire' => 'NetNewsWire', … … 175 178 'Bloglines' => 'subscribers', 176 179 'HanRSS' => 'subscribers', 180 'Feedfetcher-Google' => 'subscribers', 177 181 'Netvibes' => 'subscribers', 178 182 'NewsGatorOnline' => 'subscribers', … … 231 235 $startDate = $record['subscribed']; 232 236 $referred = $record['referred']; 233 if(time()- $referred > 259200) continue;237 if(time()- $referred > 604800) continue; 234 238 if(array_key_exists($aggregatorName,$aggregatorInfo)) { 235 239 if(($subscribers > $aggregatorInfo[$aggregatorName]['subscribers'])&&($subscribers!==1)) { … … 300 304 if (Filter::isFiltered('ip', $_SERVER['REMOTE_ADDR'])) 301 305 return; 302 $ip = mysql_tt_escape_string($_SERVER['REMOTE_ADDR']);303 $host = mysql_tt_escape_string(isset($_SERVER['REMOTE_HOST']) ? $_SERVER['REMOTE_HOST'] : '');304 $useragent = mysql_tt_escape_string(isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '');306 $ip = DBQuery::escapeString($_SERVER['REMOTE_ADDR']); 307 $host = DBQuery::escapeString(isset($_SERVER['REMOTE_HOST']) ? $_SERVER['REMOTE_HOST'] : ''); 308 $useragent = DBQuery::escapeString(isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''); 305 309 mysql_query("insert into {$database['prefix']}SubscriptionLogs values($blogid, '$ip', '$host', '$useragent', UNIX_TIMESTAMP())"); 306 310 mysql_query("delete from {$database['prefix']}SubscriptionLogs where referred < UNIX_TIMESTAMP() - 604800"); … … 311 315 312 316 function PN_Subscription_setTime($target) { 313 requireComponent( "Textcube.Function.misc");317 requireComponent("Textcube.Function.misc"); 314 318 misc::setBlogSetting('LatestRSSrefresh',time()); 315 319 return true; 316 320 } 321 322 function PN_Subscription_Sidebar($target) { 323 requireComponent("Textcube.Function.misc"); 324 $count = misc::getBlogSetting('SubscriberCount',null); 325 $text = '<div class="SubscriptionPanel" style="text-align:center">'; 326 if($count==null) $text .= '구독 정보 갱신이 필요합니다'; 327 else $text .= $count.'명이 RSS를 구독하고 있습니다.'; 328 $text .= '</div>'; 329 return $text; 330 } 317 331 ?> -
branches/1.5/plugins/PN_Subscription_Default/index.xml
r3984 r4749 4 4 <title xml:lang="ko">피드 구독 통계</title> 5 5 <link>http://needlworks.org/</link> 6 <version> 1.6</version>6 <version>2.0</version> 7 7 <description xml:lang="en">Shows Feed Subscription Log using Textcube Components.</description> 8 8 <description xml:lang="ko">텍스트큐브 컴포넌트를 이용하여 피드 구독 통계를 보여줍니다.</description> 9 9 <license>GPL</license> 10 <author xml:lang="en" link="http://needlworks.org"> Needlworks</author>11 <author xml:lang="ko" link="http://needlworks.org"> Needlworks</author>10 <author xml:lang="en" link="http://needlworks.org">inureyes (Needlworks)</author> 11 <author xml:lang="ko" link="http://needlworks.org">inureyes (Needlworks)</author> 12 12 <safety changeData="no" exposeData="no" accessLocal="no" accessRemote="no" accessRaw="yes" /> 13 13 <requirements> 14 <textcube>1.5 </textcube>14 <textcube>1.5.4</textcube> 15 15 </requirements> 16 16 <binding> 17 17 <listener event="refreshRSS">PN_Subscription_setTime</listener> 18 18 <listener event="ViewRSS">updateSubscriptionStatistics</listener> 19 <sidebar title="SubscriptionStatistics" handler="PN_Subscription_Sidebar" /> 19 20 <adminMenu> 20 21 <viewMethods>
