You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
(4) |
Oct
(3) |
Nov
(32) |
Dec
(37) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(105) |
Feb
(91) |
Mar
(74) |
Apr
(166) |
May
(123) |
Jun
(70) |
Jul
(117) |
Aug
(540) |
Sep
(146) |
Oct
(260) |
Nov
(479) |
Dec
(154) |
2006 |
Jan
(227) |
Feb
(129) |
Mar
(141) |
Apr
(151) |
May
(72) |
Jun
(92) |
Jul
(173) |
Aug
(271) |
Sep
(52) |
Oct
(67) |
Nov
(199) |
Dec
(157) |
2007 |
Jan
(130) |
Feb
(40) |
Mar
(47) |
Apr
(87) |
May
(80) |
Jun
(75) |
Jul
(173) |
Aug
(137) |
Sep
(56) |
Oct
(45) |
Nov
(25) |
Dec
(78) |
2008 |
Jan
(31) |
Feb
(94) |
Mar
(56) |
Apr
(36) |
May
(25) |
Jun
(33) |
Jul
(17) |
Aug
(55) |
Sep
(12) |
Oct
(33) |
Nov
(31) |
Dec
(24) |
2009 |
Jan
(24) |
Feb
(137) |
Mar
(27) |
Apr
(28) |
May
(41) |
Jun
(64) |
Jul
(94) |
Aug
(499) |
Sep
(98) |
Oct
(12) |
Nov
(43) |
Dec
(40) |
2010 |
Jan
(10) |
Feb
(32) |
Mar
(27) |
Apr
(25) |
May
(37) |
Jun
(17) |
Jul
(10) |
Aug
(16) |
Sep
(27) |
Oct
(36) |
Nov
(18) |
Dec
(44) |
2011 |
Jan
(76) |
Feb
|
Mar
(24) |
Apr
(28) |
May
(28) |
Jun
(29) |
Jul
(14) |
Aug
(9) |
Sep
(10) |
Oct
(27) |
Nov
(12) |
Dec
(50) |
2012 |
Jan
(33) |
Feb
(45) |
Mar
(44) |
Apr
(16) |
May
(4) |
Jun
(27) |
Jul
(14) |
Aug
(15) |
Sep
(12) |
Oct
(24) |
Nov
(6) |
Dec
|
2013 |
Jan
(13) |
Feb
(10) |
Mar
(13) |
Apr
(17) |
May
(24) |
Jun
(12) |
Jul
(6) |
Aug
(179) |
Sep
(12) |
Oct
(9) |
Nov
(7) |
Dec
(89) |
2014 |
Jan
(9) |
Feb
(7) |
Mar
(13) |
Apr
(18) |
May
(18) |
Jun
(19) |
Jul
(19) |
Aug
(10) |
Sep
(9) |
Oct
(25) |
Nov
(97) |
Dec
(44) |
2015 |
Jan
(20) |
Feb
(7) |
Mar
(60) |
Apr
(1) |
May
(2) |
Jun
(3) |
Jul
(2) |
Aug
(12) |
Sep
(10) |
Oct
(3) |
Nov
(2) |
Dec
(15) |
2016 |
Jan
(6) |
Feb
(13) |
Mar
(9) |
Apr
(18) |
May
(28) |
Jun
(9) |
Jul
(4) |
Aug
(5) |
Sep
(52) |
Oct
(59) |
Nov
|
Dec
(2) |
2017 |
Jan
(4) |
Feb
(71) |
Mar
(17) |
Apr
(85) |
May
(25) |
Jun
|
Jul
(2) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Thomas N. <ne...@us...> - 2004-11-13 02:16:32
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_plugin_google_last_query In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10774/serendipity_plugin_google_last_query Modified Files: serendipity_plugin_google_last_query.php Log Message: Top Referers Plugin Index: serendipity_plugin_google_last_query.php =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_plugin_google_last_query/serendipity_plugin_google_last_query.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- serendipity_plugin_google_last_query.php 13 Nov 2004 01:54:48 -0000 1.1 +++ serendipity_plugin_google_last_query.php 13 Nov 2004 02:15:53 -0000 1.2 @@ -72,5 +72,5 @@ } } -/ vim: set sts=4 ts=4 expandtab : / +/* vim: set sts=4 ts=4 expandtab : */ ?> \ No newline at end of file |
From: Thomas N. <ne...@us...> - 2004-11-13 02:16:32
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_plugin_amazon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10774/serendipity_plugin_amazon Modified Files: serendipity_plugin_amazon.php Log Message: Top Referers Plugin Index: serendipity_plugin_amazon.php =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_plugin_amazon/serendipity_plugin_amazon.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- serendipity_plugin_amazon.php 13 Nov 2004 01:59:52 -0000 1.1 +++ serendipity_plugin_amazon.php 13 Nov 2004 02:15:52 -0000 1.2 @@ -187,5 +187,5 @@ } } -/ vim: set sts=4 ts=4 expandtab : / +/* vim: set sts=4 ts=4 expandtab : */ ?> \ No newline at end of file |
From: Thomas N. <ne...@us...> - 2004-11-13 02:16:32
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_plugin_hitmaps In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10774/serendipity_plugin_hitmaps Modified Files: serendipity_plugin_hitmaps.php Log Message: Top Referers Plugin Index: serendipity_plugin_hitmaps.php =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_plugin_hitmaps/serendipity_plugin_hitmaps.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- serendipity_plugin_hitmaps.php 13 Nov 2004 01:41:45 -0000 1.1 +++ serendipity_plugin_hitmaps.php 13 Nov 2004 02:15:53 -0000 1.2 @@ -36,5 +36,5 @@ } } -/ vim: set sts=4 ts=4 expandtab : / +/* vim: set sts=4 ts=4 expandtab : */ ?> \ No newline at end of file |
From: Thomas N. <ne...@us...> - 2004-11-13 02:16:17
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_plugin_wikipedia_finder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10774/serendipity_plugin_wikipedia_finder Modified Files: serendipity_plugin_wikipedia_finder.php Log Message: Top Referers Plugin Index: serendipity_plugin_wikipedia_finder.php =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_plugin_wikipedia_finder/serendipity_plugin_wikipedia_finder.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- serendipity_plugin_wikipedia_finder.php 13 Nov 2004 01:50:13 -0000 1.1 +++ serendipity_plugin_wikipedia_finder.php 13 Nov 2004 02:16:08 -0000 1.2 @@ -149,5 +149,5 @@ } -/ vim: set sts=4 ts=4 expandtab : / +/* vim: set sts=4 ts=4 expandtab : */ ?> \ No newline at end of file |
From: Thomas N. <ne...@us...> - 2004-11-13 02:16:17
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_plugin_topreferers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10774/serendipity_plugin_topreferers Added Files: serendipity_plugin_topreferers.php Log Message: Top Referers Plugin --- NEW FILE: serendipity_plugin_topreferers.php --- <?php switch ($serendipity['lang']) { case 'de': @define('PLUGIN_TOPREFERERS_TITLE', "Top Referers"); @define('PLUGIN_TOPREFERERS_PROP_FILTER', "Hostfilter"); @define('PLUGIN_TOPREFERERS_PROP_FILTER_DESC', "Welche Hosts sollen ausgefiltert werden? zB 'www.google.de' oder '*google*'"); break; default: case 'en': @define('PLUGIN_TOPREFERERS_TITLE', "Top Referers"); @define('PLUGIN_TOPREFERERS_PROP_FILTER', "Hostfilter"); @define('PLUGIN_TOPREFERERS_PROP_FILTER_DESC', "Which hosts should be filtered out? eg 'www.google.de' or '*google*'"); break; } class serendipity_plugin_topreferers extends serendipity_plugin { function introspect(&$propbag) { $propbag->add('name', PLUGIN_TOPREFERERS_TITLE); $propbag->add('description', SHOWS_TOP_SITES); $propbag->add('configuration', array('title', 'limit', 'use_links', 'filter_out')); } function introspect_config_item($name, &$propbag) { switch($name) { case 'title': $propbag->add('type', 'string'); $propbag->add('name', TITLE); $propbag->add('description', TITLE); $propbag->add('default', PLUGIN_TOPREFERERS_TITLE); break; case 'limit': $propbag->add('type', 'string'); $propbag->add('name', LIMIT_TO_NUMBER); $propbag->add('description', LIMIT_TO_NUMBER); $propbag->add('default', 10); break; case 'use_links': $propbag->add('type', 'tristate'); $propbag->add('name', INSTALL_TOP_AS_LINKS); $propbag->add('description', INSTALL_TOP_AS_LINKS_DESC); $propbag->add('default', false); break; case 'filter_out': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_TOPREFERERS_PROP_FILTER); $propbag->add('description', PLUGIN_TOPREFERERS_PROP_FILTER_DESC); $propbag->add('default', ''); break; default: return false; } return true; } function generate_content(&$title) { global $serendipity; $title = $this->get_config('title'); // get local configuration (default, true, false) $use_links = $this->get_config('use_links', 'default'); // get global configuration (true, false) $global_use_link = serendipity_get_config_var('top_as_links', false, true); // if local configuration say to use global default, do so if ($use_links == 'default') { $use_links = serendipity_db_bool($global_use_link); } else { $use_links = serendipity_db_bool($use_links); } echo displayTopReferers($this->get_config('limit', 10), $use_links, $this->get_config('filter_out')); } } function displayTopReferers($limit = 10, $use_links = true, $filter_out = "") { displayTopUrlList('referrers', $limit, $use_links, $filter_out); } function displayTopUrlList($list, $limit, $use_links = true, $filter_out = "") { global $serendipity; if ($limit){ $limit = serendipity_db_limit_sql($limit); } $filter_out_sql = !$filter_out?"":"host NOT LIKE '".join("' AND host NOT LIKE '", explode(";", preg_replace('@^;|;$@', '', str_replace("*", "%", $filter_out))))."'"; /* HACK */ if (preg_match('/^mysqli?/', $serendipity['dbType'])) { if($filter_out) { $filter_out_sql = "AND ".$filter_out_sql; } /* Nonportable SQL due to MySQL date functions, * but produces rolling 7 day totals, which is more * interesting */ $query = "SELECT scheme, host, SUM(count) AS total FROM {$serendipity['dbPrefix']}$list WHERE day > date_sub(current_date, interval 7 day) $filter_out_sql GROUP BY host ORDER BY total DESC, host $limit"; } else { if($filter_out) { $filter_out_sql = "WHERE ".$filter_out_sql; } /* Portable version of the same query */ $query = "SELECT scheme, host, SUM(count) AS total FROM {$serendipity['dbPrefix']}$list $filter_out_sql GROUP BY scheme, host ORDER BY total DESC, host $limit"; } $rows = serendipity_db_query($query); echo "<span class='serendipityReferer'>"; if (is_array($rows)) { foreach ($rows as $row) { if ($use_links) { printf( '<a href="%1$s://%2$s" title="%2$s" >%2$s</a> (%3$s)<br />', $row['scheme'], $row['host'], $row['total'] ); } else { printf( '%1$s (%2$s)<br />', $row['host'], $row['total'] ); } } } echo "</span>"; } /* vim: set sts=4 ts=4 expandtab : */ ?> |
From: Thomas N. <ne...@us...> - 2004-11-13 02:15:12
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_plugin_topreferers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10684/serendipity_plugin_topreferers Log Message: Directory /cvsroot/php-blog/additional_plugins/serendipity_plugin_topreferers added to the repository |
From: Thomas N. <ne...@us...> - 2004-11-13 02:00:01
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_plugin_amazon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7481/serendipity_plugin_amazon Added Files: serendipity_plugin_amazon.php Log Message: Amazon Affiliates Plugin --- NEW FILE: serendipity_plugin_amazon.php --- <?php switch ($serendipity['lang']) { default: case 'en': @define('PLUGIN_AMAZON_TITLE', "Amazon Recommendations"); @define('PLUGIN_AMAZON_DESC', "Recommend Products at Amazon within the Amazon-Partnerprogram"); @define('PLUGIN_AMAZON_PROP_TITLE', "Title"); @define('PLUGIN_AMAZON_PROP_TITLE_DESC', "Title of this Recommendationsblock"); @define('PLUGIN_AMAZON_SITE', "Amazon-Site"); @define('PLUGIN_AMAZON_SITE_DESC', "Amazon-Site frmo which Descriptions are taken and to which Links are generated"); @define('PLUGIN_AMAZON_AMAZONID', "Partner-ID"); @define('PLUGIN_AMAZON_AMAZONID_DESC', "Your Partner-ID in the Amazon-Partnerprogram"); @define('PLUGIN_AMAZON_ASIN', "ASIN-List"); @define('PLUGIN_AMAZON_ASIN_DESC', "Commaseparated List of ASIN you'd like to recommend"); break; case 'de': @define('PLUGIN_AMAZON_TITLE', "Amazon Empfehlungen"); @define('PLUGIN_AMAZON_DESC', "Empfehlungsblock für Produkte innerhalb des Amazon-Partnerprogramms"); @define('PLUGIN_AMAZON_PROP_TITLE', "Titel"); @define('PLUGIN_AMAZON_PROP_TITLE_DESC', "Titel des Empfehlungsblocks"); @define('PLUGIN_AMAZON_SITE', "Amazon-Site"); @define('PLUGIN_AMAZON_SITE_DESC', "Amazon-Site von der Beschreibungen geladen und zu der Links generiert werden"); @define('PLUGIN_AMAZON_AMAZONID', "Partner-ID"); @define('PLUGIN_AMAZON_AMAZONID_DESC', "Deine Partner-ID im Amazon-Partnerprogramm"); @define('PLUGIN_AMAZON_ASIN', "ASIN-Liste"); @define('PLUGIN_AMAZON_ASIN_DESC', "Kommaseparierte Liste von ASIN die vorgestellt werden sollen"); break; } class serendipity_plugin_amazon extends serendipity_plugin { function introspect(&$propbag) { $propbag->add('name', PLUGIN_AMAZON_TITLE); $propbag->add('description', PLUGIN_AMAZON_DESC); $propbag->add('configuration', array('title', 'site', 'amazonid', 'asin', 'articleinfo', 'info_asin')); } function introspect_config_item($name, &$propbag) { switch($name) { case 'title': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_AMAZON_PROP_TITLE); $propbag->add('description', PLUGIN_AMAZON_PROP_TITLE_DESC); $propbag->add('default', PLUGIN_AMAZON_TITLE); break; case 'site': $propbag->add('type', 'select'); $propbag->add('name', PLUGIN_AMAZON_SITE); $propbag->add('description', PLUGIN_AMAZON_SITE_DESC); $propbag->add('select_values', array('de' => 'Amazon.de', 'com' => 'Amazon.com')); $propbag->add('default', $serendipity['lang']=="en"?"com":$serendipity['lang']); break; case 'amazonid': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_AMAZON_AMAZONID); $propbag->add('description', PLUGIN_AMAZON_AMAZONID_DESC); $propbag->add('default', ''); break; case 'asin': $propbag->add('type', 'text'); $propbag->add('name', PLUGIN_AMAZON_ASIN); $propbag->add('description', PLUGIN_AMAZON_ASIN_DESC); $propbag->add('default', ''); break; case 'articleinfo': case 'info_asin': $propbag->add('type', 'hidden'); $propbag->add('default', ''); break; default: return false; } return true; } function generate_content(&$title) { global $serendipity; $title = $this->get_config('title'); $site = $this->get_config('site'); $amazonid = $this->get_config('amazonid'); $articleinfo = unserialize($this->get_config('articleinfo')); $info_asin = $this->get_config('info_asin'); $config_asin = $this->get_config('asin'); $config_asins = explode(",", $config_asin); $changesmade = 0; if($info_asin != $config_asin) { $articleinfo = array(); $changesmade++; } foreach($config_asins as $asin) { $asin = preg_replace('/\s+/', '', $asin); $found = 0; foreach($articleinfo as $article) { if($article['asin'] == $asin && file_exists($article['imgpath'])) { $found++; break; } } if(! $found) { $articleinfo[] = $this->amazon_fetch($asin, $site); $changesmade++; } } if($changesmade) { $this->set_config('info_asin', $config_asin); $this->set_config('articleinfo', serialize($articleinfo)); } $show = rand(0, sizeof($articleinfo)-1); echo "<div align='center'><a href='".$articleinfo[$show][url]."/".$amazonid."' target='_SELF'><img src='".$articleinfo[$show][imgpath]."' alt='".$articleinfo[$show][desc]."' border='0'></a></div>"; } function amazon_fetch($asin, $site="de") { $local_path = "uploads/amazon/$asin.jpg"; $amazon_url = "http://www.amazon.".$site."/exec/obidos/ASIN/$asin"; $ret = array(); if(! file_exists($local_path)) { echo "<div style='font-size:xx-small'>"; echo "getting $asin<br>"; $content = join('', file($amazon_url)); if(! $content) { echo "no content for $asin<br>"; } if(preg_match('@<\s*meta\s+name\s*=\s*([\'"])description\1\s+content\s*=\s*([\'"])(.*?)\2@i', $content, $matches)) { $description = $matches[3]; if(preg_match('/^([^,]*?), ([^,]*)$/', $description, $matches)) { $description = $matches[2].": ".$matches[1]; } if($description) { echo "description: <i>$description</i><br>"; } } if(preg_match('@<\s*img.*?src=\s*([\'"])(http://images-eu\.amazon\.com/images/.+/'.$asin.'.+?\.(jpg|gif))\1\s+@i', $content, $matches)) { $image_url = $matches[2]; $file_type = strtolower($matches[3]); } if($image_url) { echo "getting image<br>"; @mkdir("uploads", 0755); @mkdir("uploads/amazon", 0755); switch($file_type) { case "jpg": $file = fopen($image_url, "rb"); if($file) { $save = fopen($local_path, "wb"); if($save) { while($line = fread($file, 1024)) { fwrite($save, $line); } } } break; case "gif": $img = imagecreatefromgif($image_url); imagejpeg($img, $local_path); break; case "png": $img = imagecreatefrompng($image_url); imagejpeg($img, $local_path); break; } } echo "ready. next!<br><br>"; $ret['desc'] = $description; } $ret['asin'] = $asin; $ret['imgpath'] = $local_path; $ret['url'] = $amazon_url; return $ret; } } / vim: set sts=4 ts=4 expandtab : / ?> |
From: Thomas N. <ne...@us...> - 2004-11-13 01:59:16
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_plugin_amazon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7372/serendipity_plugin_amazon Log Message: Directory /cvsroot/php-blog/additional_plugins/serendipity_plugin_amazon added to the repository |
From: Thomas N. <ne...@us...> - 2004-11-13 01:54:57
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_plugin_google_last_query In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6664/serendipity_plugin_google_last_query Added Files: serendipity_plugin_google_last_query.php Log Message: Google Queries Plugin --- NEW FILE: serendipity_plugin_google_last_query.php --- <?php // Google Last Query Plugin for Serendipity // 10/2004 by Thomas Nesges <th...@tn...> switch ($serendipity['lang']) { default: case 'en': @define('PLUGIN_GOOGLE_LAST_QUERY_TITLE', "Last Google Search"); @define('PLUGIN_GOOGLE_LAST_QUERY_DESC', "Shows the last Google Search which led to this Blog"); @define('PLUGIN_GOOGLE_LAST_QUERY_PROP_TITLE', "Title"); @define('PLUGIN_GOOGLE_LAST_QUERY_PROP_TITLE_DESC', "Title of Sidebarblock"); @define('PLUGIN_GOOGLE_LAST_QUERY_PROP_COUNT', "Count"); @define('PLUGIN_GOOGLE_LAST_QUERY_PROP_COUNT_DESC', "How many Searchwords should be shown?"); break; case 'de': @define('PLUGIN_GOOGLE_LAST_QUERY_TITLE', "Letzte Google Suche"); @define('PLUGIN_GOOGLE_LAST_QUERY_DESC', "Zeigt den Inhalt der letzten Google Suche(n), die zu diesem Blog geführt hat/haben, an"); @define('PLUGIN_GOOGLE_LAST_QUERY_PROP_TITLE', "Titel"); @define('PLUGIN_GOOGLE_LAST_QUERY_PROP_TITLE_DESC', "Titel des Sidebarblocks"); @define('PLUGIN_GOOGLE_LAST_QUERY_PROP_COUNT', "Anzahl"); @define('PLUGIN_GOOGLE_LAST_QUERY_PROP_COUNT_DESC', "Wieviele Suchworte anzeigen?"); break; } class serendipity_plugin_google_last_query extends serendipity_plugin { function introspect(&$propbag) { $propbag->add('name', PLUGIN_GOOGLE_LAST_QUERY_TITLE); $propbag->add('description', PLUGIN_GOOGLE_LAST_QUERY_DESC); $propbag->add('configuration', array('title', 'count')); } function introspect_config_item($name, &$propbag) { switch($name) { case 'title': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_GOOGLE_LAST_QUERY_PROP_TITLE); $propbag->add('description', PLUGIN_GOOGLE_LAST_QUERY_PROP_TITLE_DESC); $propbag->add('default', PLUGIN_GOOGLE_LAST_QUERY_TITLE); break; case 'count': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_GOOGLE_LAST_QUERY_PROP_COUNT); $propbag->add('description', PLUGIN_GOOGLE_LAST_QUERY_PROP_COUNT_DESC); $propbag->add('default', '1'); break; default: return false; } return true; } function generate_content(&$title) { global $serendipity; $title = $this->get_config('title'); $count = $this->get_config('count'); if($count<1) { $count = 1; } $rows = serendipity_db_query("select scheme, host, path, query from {$serendipity['dbPrefix']}referrers where host like '%.google.%' and path like '/search' order by day desc, count asc limit $count"); foreach($rows as $row) { if(preg_match("/(q|query)=(.*?)(&|$)/", $row[3], $matches)) { echo "<a href='".$row[0]."://".$row[1].$row[2]."?query=".$matches[2]."'>". utf8_decode(urldecode($matches[2]))."</a><br>"; } } } } / vim: set sts=4 ts=4 expandtab : / ?> |
From: Thomas N. <ne...@us...> - 2004-11-13 01:54:18
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_plugin_google_last_query In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6540/serendipity_plugin_google_last_query Log Message: Directory /cvsroot/php-blog/additional_plugins/serendipity_plugin_google_last_query added to the repository |
From: Thomas N. <ne...@us...> - 2004-11-13 01:50:22
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_plugin_wikipedia_finder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5832 Added Files: serendipity_plugin_wikipedia_finder.php wikipedia.png wikipedia_black.gif wikipedia_white.gif Log Message: Wikipedia Finder Plugin --- NEW FILE: wikipedia_white.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: serendipity_plugin_wikipedia_finder.php --- <?php // Wikipedia Finder Plugin for Serendipity // 10/2004 by Thomas Nesges <th...@tn...> // Mozilla-compatible Javascript by Garvin Hicking (http://www.supergarv.de) switch ($serendipity['lang']) { default: case 'en': case 'de': @define('PLUGIN_WIKIPEDIAFINDER_TITLE', "Wikipedia Finder"); @define('PLUGIN_WIKIPEDIAFINDER_DESC', "Ein Markiertes Wort in Wikipedia suchen"); @define('PLUGIN_WIKIPEDIAFINDER_PROP_TITLE', "Titel"); @define('PLUGIN_WIKIPEDIAFINDER_PROP_TITLE_DESC', "Titel des Sidebarblocks"); @define('PLUGIN_WIKIPEDIAFINDER_PROP_SITE', "Wikipedia Site"); @define('PLUGIN_WIKIPEDIAFINDER_PROP_SITE_DESC' , "Auf welcher Wikipedia Site soll gesucht werden?"); @define('PLUGIN_WIKIPEDIAFINDER_SITE' , "http://de.wikipedia.org"); @define('PLUGIN_WIKIPEDIAFINDER_PROP_SITE', "Wikipedia Site"); @define('PLUGIN_WIKIPEDIAFINDER_PROP_SITE_DESC' , "Auf welcher Wikipedia Site soll gesucht werden?"); @define('PLUGIN_WIKIPEDIAFINDER_PROP_COLOR', "Farbe"); @define('PLUGIN_WIKIPEDIAFINDER_PROP_COLOR_DESC' , "Ist der Hintergrund eher hell oder dunkel? Wird benötigt zur Grafikauswahl"); @define('PLUGIN_WIKIPEDIAFINDER_PROP_COLOR_DARK' , "Dunkler Hintergrund"); @define('PLUGIN_WIKIPEDIAFINDER_PROP_COLOR_LIGHT' , "Heller Hintergrund"); @define('PLUGIN_WIKIPEDIAFINDER_PROP_TARGET', "Zielfenster"); @define('PLUGIN_WIKIPEDIAFINDER_PROP_JSWINDOW', "Zielfenster mit Javascript öffnen"); @define('PLUGIN_WIKIPEDIAFINDER_PROP_TARGET_DESC' , "Wenn die Wikipediasuche in einem neuen Fenster durchgeführt werden soll, kann hier ein Fenstername angegeben werden (zB \"wikipedia\"). Diese Einstellung wird von \"".PLUGIN_WIKIPEDIAFINDER_PROP_JSWINDOW."\" überschrieben."); @define('PLUGIN_WIKIPEDIAFINDER_PROP_JSWINDOW_DESC', "Ein neues Ausgabefenster kann per Javascript in Höhe und Breite beeinflusst werden. Soll davon Gebrauch gemacht werden? Wird hier \"Ja\" gewählt, wird die Einstellung ".PLUGIN_WIKIPEDIAFINDER_PROP_TARGET." überschrieben."); @define('PLUGIN_WIKIPEDIAFINDER_PROP_JSWINDOW_HEIGHT', "Javascript-Fenster: Höhe"); @define('PLUGIN_WIKIPEDIAFINDER_PROP_JSWINDOW_HEIGHT_DESC', "Höhe des Zielfensters. Nur wirksam bei aktiviertem \".PLUGIN_WIKIPEDIAFINDER_PROP_JSWINDOW.\""); @define('PLUGIN_WIKIPEDIAFINDER_PROP_JSWINDOW_WIDTH', "Javascript-Fenster: Breite"); @define('PLUGIN_WIKIPEDIAFINDER_PROP_JSWINDOW_WIDTH_DESC', "Breite des Zielfensters. Nur wirksam bei aktiviertem \".PLUGIN_WIKIPEDIAFINDER_PROP_JSWINDOW.\""); break; } class serendipity_plugin_wikipedia_finder extends serendipity_plugin { function introspect(&$propbag) { $propbag->add('name', PLUGIN_WIKIPEDIAFINDER_TITLE); $propbag->add('description', PLUGIN_WIKIPEDIAFINDER_DESC); $propbag->add('configuration', array('title', 'site', 'color', 'target', 'jswindow', 'jswindow_height', 'jswindow_width')); } function introspect_config_item($name, &$propbag) { switch($name) { case 'title': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_WIKIPEDIAFINDER_PROP_TITLE); $propbag->add('description', PLUGIN_WIKIPEDIAFINDER_PROP_TITLE_DESC); $propbag->add('default', PLUGIN_WIKIPEDIAFINDER_TITLE); break; case 'site': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_WIKIPEDIAFINDER_PROP_SITE); $propbag->add('description', PLUGIN_WIKIPEDIAFINDER_PROP_SITE_DESC); $propbag->add('default', PLUGIN_WIKIPEDIAFINDER_SITE); break; case 'color': $propbag->add('type', 'select'); $propbag->add('name', PLUGIN_WIKIPEDIAFINDER_PROP_COLOR); $propbag->add('description', PLUGIN_WIKIPEDIAFINDER_PROP_COLOR_DESC); $propbag->add('select_values', array('black' => PLUGIN_WIKIPEDIAFINDER_PROP_COLOR_DARK, 'white' => PLUGIN_WIKIPEDIAFINDER_PROP_COLOR_LIGHT)); $propbag->add('default', 'black'); break; case 'target': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_WIKIPEDIAFINDER_PROP_TARGET); $propbag->add('description', PLUGIN_WIKIPEDIAFINDER_PROP_TARGET_DESC); $propbag->add('default', ""); break; case 'jswindow': $propbag->add('type', 'boolean'); $propbag->add('name', PLUGIN_WIKIPEDIAFINDER_PROP_JSWINDOW); $propbag->add('description', PLUGIN_WIKIPEDIAFINDER_PROP_JSWINDOW_DESC); $propbag->add('default', "false"); break; case 'jswindow_height': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_WIKIPEDIAFINDER_PROP_JSWINDOW_HEIGHT); $propbag->add('description', PLUGIN_WIKIPEDIAFINDER_PROP_JSWINDOW_HEIGHT_DESC); $propbag->add('default', "600"); break; case 'jswindow_width': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_WIKIPEDIAFINDER_PROP_JSWINDOW_WIDTH); $propbag->add('description', PLUGIN_WIKIPEDIAFINDER_PROP_JSWINDOW_WIDTH_DESC); $propbag->add('default', "600"); break; default: return false; } return true; } function generate_content(&$title) { global $serendipity; $title = $this->get_config('title', PLUGIN_WIKIPEDIAFINDER_TITLE); $site = $this->get_config('site', PLUGIN_WIKIPEDIAFINDER_SITE); $color = $this->get_config('color', 'black'); $target = $this->get_config('target', ''); $jswindow = $this->get_config('jswindow', 'false'); $jswindow_height = $this->get_config('jswindow_height', '600'); $jswindow_width = $this->get_config('jswindow_width', '600'); echo '<script type="text/javascript"> function getSelectedText() { Qr = (document.selection && document.selection.type && document.selection.type == \'Text\' ? document.selection.createRange().text : window.getSelection()); if (!Qr || Qr == "") { Qr = prompt("' . PLUGIN_WIKIPEDIAFINDER_DESC . '", ""); } word = Qr.toString(); document.getElementById("wikipediafinder").value = word.replace(/\s+$/, ""); document.getElementById("wikipediafinderform").submit(); } </script>'; $plugin_dir = basename(dirname(_FILE_)); echo "<div align='center'><form id='wikipediafinderform' action='$site/wiki/Spezial:Search' method='GET' style='margin-bottom:0px;'"; if($target!="" || $jswindow) { if($jswindow && $target != "s9y_wikipediafinder") { $target = "s9y_wikipediafinder"; $this->set_config("target", "s9y_wikipediafinder"); } echo " target='$target'>"; } echo " <input type='hidden' name='search' value='' id='wikipediafinder' /> <input onmousedown='"; if($jswindow==TRUE) { echo "window.open(\"/plugins/".$plugin_dir."/wikipedia.png\", \"s9y_wikipediafinder\", \"height=".$jswindow_height.", width=".$jswindow_width.", resizable=yes, scrollbars=yes, toolbar=no, status=no, menubar=no, location=no\");"; } echo " getSelectedText(); return false;' onclick='return false;' type='image' style='height:30px; width:31px;' src='/plugins/".$plugin_dir."/wikipedia_".$color.".gif' /><br /> ".PLUGIN_WIKIPEDIAFINDER_DESC." </form></div>"; } } / vim: set sts=4 ts=4 expandtab : / ?> --- NEW FILE: wikipedia_black.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: wikipedia.png --- (This appears to be a binary file; contents omitted.) |
From: Thomas N. <ne...@us...> - 2004-11-13 01:48:53
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_plugin_wikipedia_finder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5614/serendipity_plugin_wikipedia_finder Log Message: Directory /cvsroot/php-blog/additional_plugins/serendipity_plugin_wikipedia_finder added to the repository |
From: Thomas N. <ne...@us...> - 2004-11-13 01:41:56
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_plugin_hitmaps In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4374/serendipity_plugin_hitmaps Added Files: serendipity_plugin_hitmaps.php Log Message: New Hitmaps Plugin --- NEW FILE: serendipity_plugin_hitmaps.php --- <?php // Hitmaps Block for Serendipity // see http://kmi.open.ac.uk/projects/hitmaps/ // 11/2004 by Thomas Nesges <th...@tn...> switch ($serendipity['lang']) { default: case 'en': @define('PLUGIN_HITMAPS_TITLE', "Hitmaps"); @define('PLUGIN_HITMAPS_DESC', "Shows where the blogs visitors are coming from"); @define('PLUGIN_HITMAPS_MAPALTTEXT', "Where are visitors to this blog?"); break; case 'de': @define('PLUGIN_HITMAPS_TITLE', "Hitmaps"); @define('PLUGIN_HITMAPS_DESC', "Zeigt an woher die Besucher des Blogs kommen"); @define('PLUGIN_HITMAPS_MAPALTTEXT', "Woher kommen die Besucher dieses Blogs?"); break; } class serendipity_plugin_hitmaps extends serendipity_plugin { function introspect(&$propbag) { $propbag->add('name', PLUGIN_HITMAPS_TITLE); $propbag->add('description', PLUGIN_HITMAPS_DESC); } function generate_content(&$title) { global $serendipity; $title = PLUGIN_HITMAPS_TITLE; $siteurl = preg_replace("@http://(.*?)/?$@", "\\1", $serendipity['baseURL']); echo "<a href='http://valepark.open.ac.uk/cpdn/stats/".$siteurl."-/map-world.html' id='hitMapsLink'> <img src='http://jabber-dev.open.ac.uk/stats/index2.php?url=http://".$siteurl."/' border=0 alt='".PLUGIN_HITMAPS_MAPALTTEXT."' onError=\"this.onError=null; this.src='http://kmi.open.ac.uk/projects/hitmaps/imgs/begins-tomorrow.jpg'; document.getElementById('hitMapsLink').href='http://kmi.open.ac.uk/projects/hitmaps/'\"></a>"; } } / vim: set sts=4 ts=4 expandtab : / ?> |
From: Thomas N. <ne...@us...> - 2004-11-13 01:40:31
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_plugin_hitmaps In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4073/serendipity_plugin_hitmaps Log Message: Directory /cvsroot/php-blog/additional_plugins/serendipity_plugin_hitmaps added to the repository |
From: Garvin H. <gar...@us...> - 2004-11-12 15:46:20
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_entrypaging In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27551 Modified Files: serendipity_event_entrypaging.php Log Message: that's the right syntax to use to keep in synch with current smarty branch Index: serendipity_event_entrypaging.php =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_event_entrypaging/serendipity_event_entrypaging.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- serendipity_event_entrypaging.php 11 Nov 2004 15:57:12 -0000 1.2 +++ serendipity_event_entrypaging.php 12 Nov 2004 15:46:08 -0000 1.3 @@ -54,7 +54,7 @@ function timeOffset($timestamp) { if (function_exists('serendipity_serverOffsetHour')) { - return serendipity_serverOffsetHour($timestamp); + return serendipity_serverOffsetHour($timestamp, true); } return $timestamp; @@ -162,4 +162,4 @@ } /* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file +?> |
From: Garvin H. <gar...@us...> - 2004-11-11 15:57:29
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_entrypaging In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7954 Modified Files: serendipity_event_entrypaging.php Log Message: server timezone offset support (coming soon to a smarty-branch near you...) Index: serendipity_event_entrypaging.php =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_event_entrypaging/serendipity_event_entrypaging.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- serendipity_event_entrypaging.php 11 Nov 2004 12:40:53 -0000 1.1 +++ serendipity_event_entrypaging.php 11 Nov 2004 15:57:12 -0000 1.2 @@ -52,6 +52,14 @@ $title = PLUGIN_ENTRYPAGING_NAME; } + function timeOffset($timestamp) { + if (function_exists('serendipity_serverOffsetHour')) { + return serendipity_serverOffsetHour($timestamp); + } + + return $timestamp; + } + function makeLink($resultset) { if (is_array($resultset) && is_numeric($resultset[0]['id'])) { $link = '<a href="' . serendipity_archiveURL($resultset[0]['id'], $resultset[0]['title']) . '">' . htmlspecialchars($resultset[0]['title']) . '</a>'; @@ -70,7 +78,7 @@ $links = array(); $cond = array(); - $cond['and'] = " AND e.isdraft = 'false' AND e.timestamp <= " . time(); + $cond['and'] = " AND e.isdraft = 'false' AND e.timestamp <= " . $this->timeOffset(time()); serendipity_plugin_api::hook_event('frontend_fetchentry', $cond); $querystring = "SELECT |
From: Garvin H. <gar...@us...> - 2004-11-11 12:41:05
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_entrypaging In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27117/serendipity_event_entrypaging Added Files: serendipity_event_entrypaging.php Log Message: Added previous/next entry paging plugin feature. Plugin works with both 0.7 and 0.8 (though with different implementations) --- NEW FILE: serendipity_event_entrypaging.php --- (This appears to be a binary file; contents omitted.) |
From: Garvin H. <gar...@us...> - 2004-11-11 12:39:59
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_entrypaging In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26833/serendipity_event_entrypaging Log Message: Directory /cvsroot/php-blog/additional_plugins/serendipity_event_entrypaging added to the repository |
From: Garvin H. <gar...@us...> - 2004-11-08 12:57:10
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_plugin_loginform In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv835/serendipity_plugin_loginform Added Files: serendipity_plugin_loginform.php Log Message: Show Login form in sidebar. Useful if you want your authors to login to your frontend to see "member" entries, without having them to go to admin panel first and then going back to the page. --- NEW FILE: serendipity_plugin_loginform.php --- <?php # $Id: serendipity_plugin_loginform.php,v 1.1 2004/11/08 12:56:58 garvinhicking Exp $ switch ($serendipity['lang']) { case 'de': @define('PLUGIN_LOGINFORM_NAME', 'Autoren-Login'); @define('PLUGIN_LOGINFORM_DESC', 'Zeigt ein Login-Formular für Autoren'); break; case 'en': default: @define('PLUGIN_LOGINFORM_NAME', 'Authors login'); @define('PLUGIN_LOGINFORM_DESC', 'Show a login form for authors'); break; } class serendipity_plugin_loginform extends serendipity_plugin { function introspect(&$propbag) { $propbag->add('name', PLUGIN_LOGINFORM_NAME); $propbag->add('description', PLUGIN_LOGINFORM_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Garvin Hicking'); $propbag->add('version', '1.0'); $propbag->add('configuration', array('title')); // Register (multiple) dependencies. KEY is the name of the depending plugin. VALUE is a mode of either 'remove' or 'keep'. // If the mode 'remove' is set, removing the plugin results in a removal of the depending plugin. 'Keep' meens to // not touch the depending plugin. $this->dependencies = array('serendipity_event_loginform' => 'remove'); } function introspect_config_item($name, &$propbag) { switch($name) { case 'title': $propbag->add('type', 'string'); $propbag->add('name', TITLE); $propbag->add('description', TITLE); $propbag->add('default', ''); break; default: return false; } return true; } function generate_content(&$title) { global $serendipity; $title = $this->get_config('title', $title); // All that URL getting humpty-dumpty is necessary to allow a user to change the template in the // articles view. POSTing data to that page only works with mod_rewrite and not the ErrorDocument // redirection, so we need to generate the ErrorDocument-URI here. $uri = parse_url($_SERVER['REQUEST_URI']); $qst = ''; if (!empty($uri['query'])) { $qst = '&' . str_replace('&', '&', $uri['query']); } $uri['path'] = str_replace($serendipity['serendipityHTTPPath'], '', $uri['path']); $url = $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] . '?' . $uri['path'] . $qst; $url = str_replace($serendipity['indexFile'] . '&', '', $url); // Kill possible looped repitions which could occur if (isset($serendipity['POST']['action']) && !isset($serendipity['POST']['logout']) && !serendipity_userLoggedIn()) { echo '<div class="serendipity_center serendipity_msg_important">' . WRONG_USERNAME_OR_PASSWORD . '</div>'; } elseif (serendipity_userLoggedIn()) { echo '<div class="serendipity_center">' . WELCOME_BACK . ' ' . $_SESSION['serendipityUser'] . '</div>'; echo '<form id="loginform" action="' . $url . '" method="post">'; echo '<input type="hidden" name="serendipity[logout]" value="true" />'; echo '<input type="submit" name="serendipity[action]" value="' . LOGOUT . ' >" />'; return true; } echo '<form id="loginform" action="' . $url . '" method="post">'; echo '<div>'; echo USERNAME . ' <input type="text" name="serendipity[user]" value="" /><br />'; echo PASSWORD . ' <input type="password" name="serendipity[pass]" value="" /><br />'; echo '<input id="autologin" type="checkbox" name="serendipity[auto]" style="float: left; display: inline; width: 20px" /><label for="autologin"> ' . AUTOMATIC_LOGIN . '</label><br />'; echo '<input type="submit" name="serendipity[action]" value="' . LOGIN . ' >" />'; echo '</div>'; echo '</form>'; return true; } } /* vim: set sts=4 ts=4 expandtab : */ ?> |
From: Garvin H. <gar...@us...> - 2004-11-08 12:57:10
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_loginform In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv835/serendipity_event_loginform Added Files: serendipity_event_loginform.php Log Message: Show Login form in sidebar. Useful if you want your authors to login to your frontend to see "member" entries, without having them to go to admin panel first and then going back to the page. --- NEW FILE: serendipity_event_loginform.php --- (This appears to be a binary file; contents omitted.) |
From: Garvin H. <gar...@us...> - 2004-11-08 12:55:41
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_plugin_loginform In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv663/serendipity_plugin_loginform Log Message: Directory /cvsroot/php-blog/additional_plugins/serendipity_plugin_loginform added to the repository |
From: Garvin H. <gar...@us...> - 2004-11-08 12:55:27
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_loginform In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv609/serendipity_event_loginform Log Message: Directory /cvsroot/php-blog/additional_plugins/serendipity_event_loginform added to the repository |
From: Garvin H. <gar...@us...> - 2004-11-05 10:49:42
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_authorpic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19494/serendipity_event_authorpic Added Files: serendipity_event_authorpic.php Log Message: Added plugin for displaying an image of the author. Useful for multi-author blogs. --- NEW FILE: serendipity_event_authorpic.php --- <?php # $Id: serendipity_event_authorpic.php,v 1.1 2004/11/05 10:49:31 garvinhicking Exp $ switch ($serendipity['lang']) { case 'de': @define('PLUGIN_AUTHORPIC_NAME', 'Bild des Autoren'); @define('PLUGIN_AUTHORPIC_BLAHBLAH', 'Zeigt ein Bild des Autoren zu jedem Eintrag. Das Bild muss im Ordner "img" vom jeweiligen Templateordner liegen und so heißen, wie der Autorname. Alle Sonderzeichen (Umlaute, Leerzeichen, ...) müssen dabei durch ein "_" im Dateinamen ersetzt werden.'); @define('PLUGIN_AUTHORPIC_EXTENSION', 'Dateiendung'); @define('PLUGIN_AUTHORPIC_EXTENSION_BLAHBLAH', 'Welche Dateiendung haben die Bilder der Autoren?'); break; case 'en': default: @define('PLUGIN_AUTHORPIC_NAME', 'Picture of the author'); @define('PLUGIN_AUTHORPIC_BLAHBLAH', 'Shows a picture of the author to each entry. The image file must be placed in the "img" Subfolder of your selected template and be called like the authorname. All special characters (quotes, spaces, ...) must be replaced by an "_" inside the filename.'); @define('PLUGIN_AUTHORPIC_EXTENSION', 'File extension'); @define('PLUGIN_AUTHORPIC_EXTENSION_BLAHBLAH', 'Which file extension do the images of the authors have?'); break; } class serendipity_event_authorpic extends serendipity_event { var $found_images = array(); function introspect(&$propbag) { global $serendipity; $propbag->add('name', PLUGIN_AUTHORPIC_NAME); $propbag->add('description', PLUGIN_AUTHORPIC_BLAHBLAH); $propbag->add('stackable', false); $propbag->add('author', 'Garvin Hicking'); $propbag->add('version', '1.0'); $propbag->add('event_hooks', array('frontend_display' => true, 'css' => true)); $propbag->add('scrambles_true_content', true); $propbag->add('configuration', array('extension')); } function introspect_config_item($name, &$propbag) { switch($name) { case 'extension': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_AUTHORPIC_EXTENSION); $propbag->add('description', PLUGIN_AUTHORPIC_EXTENSION_BLAHBLAH); $propbag->add('default', 'jpg'); break; default: return false; } return true; } function generate_content(&$title) { $title = PLUGIN_AUTHORPIC_NAME; } function event_hook($event, &$bag, &$eventData, $addData = null) { global $serendipity; $hooks = &$bag->get('event_hooks'); if (isset($hooks[$event])) { switch($event) { case 'css': if (stristr('.serendipity_authorpic', $addData)) { // class exists in CSS, so a user has customized it and we don't need default return true; } ?> .serendipity_authorpic { float: right; margin: 5px; border: 0px; display: block; } <?php return true; break; case 'frontend_display': if ($bag->get('scrambles_true_content') && is_array($addData) && isset($addData['no_scramble'])) { return true; } if (isset($this->found_images[$eventData['username']])) { // Author image was already found previously. Display it. $eventData['body'] = $this->found_images[$eventData['username']] . $eventData['body']; } elseif ($img = serendipity_getTemplateFile('img/' . preg_replace('@[^a-z0-9]@i', '_', $eventData['username']) . '.' . $this->get_config('extension'))) { // Author image exists, save it in cache and display it. $this->found_images[$eventData['username']] = '<img class="serendipity_authorpic" src="' . $img . '" alt="' . AUTHOR . '" title="' . htmlspecialchars($eventData['username']) . '" />'; $eventData['body'] = $this->found_images[$eventData['username']] . $eventData['body']; } else { // No image found, do not try again in next article. $this->found_images[$eventData['username']] = ''; } return true; break; default: return false; } } else { return false; } } } /* vim: set sts=4 ts=4 expandtab : */ ?> |
From: Garvin H. <gar...@us...> - 2004-11-05 10:49:03
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_authorpic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19355/serendipity_event_authorpic Log Message: Directory /cvsroot/php-blog/additional_plugins/serendipity_event_authorpic added to the repository |
From: Sebastian N. <no...@us...> - 2004-10-17 15:21:22
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_staticpage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15761/serendipity_event_staticpage Added Files: serendipity_event_staticpage.php Log Message: Initial commit. Merged work of Marco Rink and Allesandro Pellizzari --- NEW FILE: serendipity_event_staticpage.php --- <?php # $Id: serendipity_event_staticpage.php,v 1.1 2004/10/17 15:21:12 nohn Exp $ # (c) by Marco Rinck aka romulus, http://www.romulus23.de, licensed under BSD license, see http://www.fsf.org/licenses/info/BSD_3Clause.html switch ($serendipity['lang']) { case 'de': @define('STATICPAGE_HEADLINE', 'Kopfzeile'); @define('STATICPAGE_HEADLINE_BLAHBLAH', 'zeigt eine Kopfzeile als Titel der statischen Seite an'); @define('STATICPAGE_TITLE', 'Statische Seite'); @define('STATICPAGE_TITLE_BLAHBLAH', 'Zeigt eine statische Seite innerhalb des Blogs mit dem Blog-Design und allen Formatierungen'); @define('STATICPAGE_PAGETITLE', 'Titel der Seite für die URL'); @define('STATICPAGE_PAGETITLE_BLAHBLAH', 'definiert den Namen der Unterseite die in der URL aufgerufen werden muss, www.yourblog.com/s9y/index.php?serendipity[subpage]=pagetitle'); @define('CONTENT_BLAHBLAH', 'der Inhalt'); @define('STATICPAGE_ARTICLEFORMAT', 'Als Artikel formatieren?'); @define('STATICPAGE_ARTICLEFORMAT_BLAHBLAH', 'legt fest ob die Ausgabe automatisch wie ein Artikel formatiert werden soll (Farben, Ränder, etc.) (Standard: ja)'); break; case 'it': @define('STATICPAGE_HEADLINE', 'Intestazione'); @define('STATICPAGE_HEADLINE_BLAHBLAH', 'Mostra un\'intestazione sopra il contenuto, che viene mostrata come tutte le altre intestazioni all\'interno del blog'); @define('STATICPAGE_TITLE', 'Pagina statica'); @define('STATICPAGE_TITLE_BLAHBLAH', 'Visualizza una pagina statica nel tuo blog con la stessa grafica e formattazione del blog stesso'); @define('STATICPAGE_PAGETITLE', 'Titolo del link'); @define('STATICPAGE_PAGETITLE_BLAHBLAH', 'Definisce il titolo da usare nell\'URL, per esempio www.yourblog.com/s9y/index.php?serendipity[subpage]=pagetitle'); @define('CONTENT_BLAHBLAH', 'Il contenuto'); @define('STATICPAGE_ARTICLEFORMAT', 'Formatta come un articolo?'); @define('STATICPAGE_ARTICLEFORMAT_BLAHBLAH', 'Se impostato a sì, la pagina viene formattata automaticamente come un articolo (colori, bordi, ecc.) (default: sì)'); break; default: @define('STATICPAGE_HEADLINE', 'Headline'); @define('STATICPAGE_HEADLINE_BLAHBLAH', 'Shows a headline above the content which is rendered as every other headline in your blog'); @define('STATICPAGE_TITLE', 'Static Page'); @define('STATICPAGE_TITLE_BLAHBLAH', 'Shows an static page inside your blog with your blogs design and all formattings'); @define('CONTENT_BLAHBLAH', 'the Content'); @define('STATICPAGE_PAGETITLE', 'title of link'); @define('STATICPAGE_PAGETITLE_BLAHBLAH', 'defines link title to form the URL, e.g. www.yourblog.com/s9y/index.php?serendipity[subpage]=pagetitle'); @define('STATICPAGE_ARTICLEFORMAT', 'Format as article?'); @define('STATICPAGE_ARTICLEFORMAT_BLAHBLAH', 'if yes the output is automatically formatted as an article (colors, borders, etc.) (default: yes)'); break; } class serendipity_event_staticpage extends serendipity_event { function introspect(&$propbag) { global $serendipity; $propbag->add('name', STATICPAGE_TITLE . ': ' . $this->get_config('pagetitle')); $propbag->add('description', STATICPAGE_TITLE_BLAHBLAH); $propbag->add('event_hooks', array('entry_display' => true)); $propbag->add('configuration', array('headline', 'content', 'pagetitle', 'markup', 'articleformat') ); } function introspect_config_item($name, &$propbag) { switch($name) { case 'headline': $propbag->add('type', 'string'); $propbag->add('name', STATICPAGE_HEADLINE); $propbag->add('description', STATICPAGE_HEADLINE_BLAHBLAH); $propbag->add('default', ''); break; case 'content': $propbag->add('type', 'html'); $propbag->add('name', CONTENT); $propbag->add('description', CONTENT_BLAHBLAH); $propbag->add('default', ''); break; case 'pagetitle': $propbag->add('type', 'string'); $propbag->add('name', STATICPAGE_PAGETITLE); $propbag->add('description', STATICPAGE_PAGETITLE_BLAHBLAH); $propbag->add('default', 'pagetitle'); break; case 'markup': $propbag->add('type', 'boolean'); $propbag->add('name', DO_MARKUP); $propbag->add('description', DO_MARKUP_DESCRIPTION); $propbag->add('default', 'true'); break; case 'articleformat': $propbag->add('type', 'boolean'); $propbag->add('name', STATICPAGE_ARTICLEFORMAT); $propbag->add('description', STATICPAGE_ARTICLEFORMAT_BLAHBLAH); $propbag->add('default', 'true'); break; default: return false; } return true; } function generate_content(&$title) { $title = STATICPAGE_TITLE.' ('.$this->get_config('pagetitle').')'; if ($this->get_config('articleformat') == TRUE) { echo '<div class="serendipity_Entry_Date"><div class="serendipity_entry">'; } echo '<h4 class="serendipity_title">' . $this->get_config('headline') . '</h4>'; if ($this->get_config('markup') == TRUE) { $entry = array('body' => $this->get_config('content')); serendipity_plugin_api::hook_event('frontend_display', $entry); echo $entry['body']; } else { echo $this->get_config('content'); } if ($this->get_config('articleformat') == TRUE) { echo '</div></div>'; } } function event_hook($event, &$bag, &$eventData, $addData = null) { global $serendipity; $hooks = &$bag->get('event_hooks'); if (isset($hooks[$event])) { switch($event) { case 'entry_display': if ($serendipity['GET']['subpage'] == $this->get_config('pagetitle')) { $title = ''; $this->generate_content($title); $eventData['clean_page'] = true; // This is important to not display an entry list! } return true; break; default: return false; break; } } else { return false; } } } /* vim: set sts=4 ts=4 expandtab : */ ?> |