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: Kaustubh S. <kau...@us...> - 2004-12-09 18:44:21
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_ljupdate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv484/serendipity_event_ljupdate Added Files: serendipity_event_ljupdate.php Log Message: LJ Update plugin by Rob Sayers. Crossposts an entry made in your s9y blog to your LiveJournal. --- NEW FILE: serendipity_event_ljupdate.php --- <?php switch ($serendipity['lang']) { case 'en': default: @define('PLUGIN_LJUPDATE_TITLE', 'LJ Update Plugin'); @define('PLUGIN_LJUPDATE_DESCRIPTION', 'Uses XMLRPC to post to your Livejournal'); break; } class serendipity_event_ljupdate extends serendipity_event { function introspect(&$propbag) { global $serendipity; $propbag->add('name', PLUGIN_LJUPDATE_TITLE); $propbag->add('description', PLUGIN_LJUPDATE_DESCRIPTION); $propbag->add('event_hooks', array( 'backend_display' => true, 'backend_publish' => true )); $propbag->add( 'configuration', array( 'ljserver', 'ljusername', 'ljpass', 'ljcuttext' ) ); } function introspect_config_item($name, &$propbag) { switch($name) { case 'ljserver': $propbag->add('type', 'string'); $propbag->add('name', 'LJ Server'); $propbag->add('description', 'The server you use (normally www.livejournal.com)'); break; case 'ljusername': $propbag->add('type', 'string'); $propbag->add('name', 'LJ Username'); $propbag->add('description', 'The username you use to login to LJ'); break; case 'ljpass': $propbag->add('type', 'string'); $propbag->add('name', 'LJ Password'); $propbag->add('description', 'The password you use to login to LJ'); break; case 'ljcuttext': $propbag->add('type', 'string'); $propbag->add('name', 'LJ Cut Text'); $propbag->add('description', 'This text will be inserted before a cut. Any extended entries will show up on livejournal with a cut.'); break; } return true; } function generate_content(&$title) { $title = PLUGIN_LJUPDATE_TITLE; } function event_hook($event, &$bag, &$eventData) { global $serendipity; $hooks = &$bag->get('event_hooks'); if (isset($hooks[$event])) { switch($event) { case 'backend_publish': if ($serendipity[POST][ljmirror]){ $event=$serendipity[POST][body]; if ($serendipity[POST][extended]){ $event=$event."\n<lj-cut text='".$this->get_config('ljcuttext')."'>\n".$serendipity[POST][extended]; } //Make LJ Entries not doublespaced $event = str_replace("\n","",$event); $params[username] = new XML_RPC_Value($this->get_config('ljusername'),'string'); $params[hpassword] = new XML_RPC_Value(md5($this->get_config('ljpass')),'string'); $params[event] = new XML_RPC_Value($event,'string'); $params[subject] = new XML_RPC_Value($serendipity[POST][title],'string'); $params[year] = new XML_RPC_Value(date('Y'),'string'); $params[mon] = new XML_RPC_Value(date('m'),'string'); $params[day] = new XML_RPC_Value(date('d'),'string'); $params[hour] = new XML_RPC_Value(date('H'),'string'); $params[min] = new XML_RPC_Value(date('i'),'string'); $params[security] = new XML_RPC_Value($serendipity[POST][ljsecurity],'string'); if ($serendipity[security]=='usemask'){ $params[allowmask] = new XML_RPC_Value(1,'string'); } $props[current_mood] = new XML_RPC_Value($serendipity[POST][ljmood],'string'); $props[current_music] = new XML_RPC_Value($serendipity[POST][ljmusic],'string'); $props[picture_keyword] = new XML_RPC_Value($serendipity[POST][ljuserpic],'string'); $params[props] = new XML_RPC_Value($props,'struct'); $client = new XML_RPC_Client( '/interface/xmlrpc', $this->get_config('ljserver') ); $data=new XML_RPC_Value($params,'struct'); $msg = new XML_RPC_Message('LJ.XMLRPC.postevent',array($data)); $res = $client->send($msg,10); } return true; break; case 'backend_display': $params['username'] = new XML_RPC_Value($this->get_config('ljusername'),'string'); $params['hpassword'] = new XML_RPC_Value(md5($this->get_config('ljpass')),'string'); $params['getpickws'] = new XML_RPC_Value(1,'string'); $client = new XML_RPC_Client( '/interface/xmlrpc', $this->get_config('ljserver') ); $data=new XML_RPC_Value($params,'struct'); $msg = new XML_RPC_Message('LJ.XMLRPC.login',array($data)); $res = $client->send($msg,10); $v = $res->value(); $tmp=$v->scalarval(); $pictmp=$tmp[pickws]->scalarval(); ?> <table border="0"> <tr> <td colspan="2"><b>LJ Update Options</b></td> <tr> <tr> <td colspan="2"> <input type="checkbox" name="serendipity[ljmirror]" value="1" checked> Mirror this entry in my Livejournal </td> </tr> <td> User Picture: <select name="serendipity[ljuserpic]"> <? for($i=0; $i<count($pictmp);$i++){ echo "<option value=\"".$pictmp[$i]->scalarval()."\">".$pictmp[$i]->scalarval()."</option>"; } ?> </td> <td> Security: <select name="serendipity[ljsecurity]"> <option value="public">Public</option> <option value="private">Private</option> <option value="usemask">Friends</option> </select> </tr> <td>Current Music: <input size="50" name="serendipity[ljmusic]"></td> <td>Current Mood: <input size="50" name="serendipity[ljmood]"></td> </tr> </table> <? default: return false; break; } } else { return false; } } } ?> |
From: Kaustubh S. <kau...@us...> - 2004-12-09 18:42:51
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_ljupdate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32431/serendipity_event_ljupdate Log Message: Directory /cvsroot/php-blog/additional_plugins/serendipity_event_ljupdate added to the repository |
From: Garvin H. <gar...@us...> - 2004-12-09 12:32:40
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_entrypaging In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10731 Modified Files: serendipity_event_entrypaging.php Log Message: fixed version compare logic Index: serendipity_event_entrypaging.php =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_event_entrypaging/serendipity_event_entrypaging.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- serendipity_event_entrypaging.php 12 Nov 2004 15:46:08 -0000 1.3 +++ serendipity_event_entrypaging.php 9 Dec 2004 12:32:30 -0000 1.4 @@ -136,7 +136,7 @@ return true; } - if (isset($serendipity['GET']['id']) && is_numeric($serendipity['GET']['id']) && version_compare($serendipity['version'], '0.7', '<=')) { + if (isset($serendipity['GET']['id']) && is_numeric($serendipity['GET']['id']) && version_compare($serendipity['version'], '0.8', '<')) { echo $this->showPaging($serendipity['GET']['id']); } |
From: Kaustubh S. <kau...@us...> - 2004-12-08 18:51:18
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_plugin_popularentries In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21524/serendipity_plugin_popularentries Added Files: serendipity_plugin_popularentries.php Log Message: This plugin lists a n number of entries(user-configurable) most popular entries calculated according to the entries most commented on. The list shows as a sidebar plugin with the titles of the entries and the number of comments each entry has received. Also, the user can choose to show only the most popular entries in a particular category or only to show those which do not appear on the front-page of the blog. --- NEW FILE: serendipity_plugin_popularentries.php --- <?php switch ($serendipity['lang']) { case 'en': case 'es': default: @define('PLUGIN_POPULARENTRIES_TITLE', 'Popular Entries'); @define('PLUGIN_POPULARENTRIES_BLAHBLAH', 'Shows the titles and number of comments of the most popular entries calculated according to the entries most commented on.'); @define('PLUGIN_POPULARENTRIES_NUMBER', 'Number of entries'); @define('PLUGIN_POPULARENTRIES_NUMBER_BLAHBLAH', 'How many entries should be displayed? (Default: 10)'); @define('PLUGIN_POPULARENTRIES_NUMBER_FROM', 'Skip front page entries'); @define('PLUGIN_POPULARENTRIES_NUMBER_FROM_DESC', 'Only recent entries that are not on the front page will be shown. (Default: latest ' . $serendipity['fetchLimit'] . ' will be skipped)'); @define('PLUGIN_POPULARENTRIES_NUMBER_FROM_RADIO_ALL', 'Show all'); @define('PLUGIN_POPULARENTRIES_NUMBER_FROM_RADIO_POPULAR', 'Skip front page items'); break; } class serendipity_plugin_POPULARENTRIES extends serendipity_plugin { var $title = PLUGIN_POPULARENTRIES_TITLE; function introspect(&$propbag) { $this->title = $this->get_config('title', $this->title); $propbag->add('name', PLUGIN_POPULARENTRIES_TITLE); $propbag->add('description', PLUGIN_POPULARENTRIES_BLAHBLAH); $propbag->add('stackable', true); $propbag->add('author', 'Kaustubh Srikanth'); $propbag->add('version', '1.0'); $propbag->add('configuration', array('title', 'number', 'number_from', 'category')); } function introspect_config_item($name, &$propbag) { switch($name) { case 'title': $propbag->add('type', 'string'); $propbag->add('name', TITLE); $propbag->add('description', TITLE_FOR_NUGGET); $propbag->add('default', PLUGIN_POPULARENTRIES_TITLE); break; case 'number': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_POPULARENTRIES_NUMBER); $propbag->add('description', PLUGIN_POPULARENTRIES_NUMBER_BLAHBLAH); $propbag->add('default', 10); break; case 'number_from': $propbag->add('type', 'radio'); $propbag->add('name', PLUGIN_POPULARENTRIES_NUMBER_FROM); $propbag->add('description', PLUGIN_POPULARENTRIES_NUMBER_FROM_DESC); $propbag->add('radio', array( 'value' => array('all', 'skip'), 'desc' => array(PLUGIN_POPULARENTRIES_NUMBER_FROM_RADIO_ALL, PLUGIN_POPULARENTRIES_NUMBER_FROM_RADIO_POPULAR) )); $propbag->add('default', 'all'); break; case 'category': $cats = serendipity_fetchCategories($serendipity['authorid']); if (!is_array($cats)) { return false; } $catlist = serendipity_generateCategoryList($cats, array(0), 4); $tmp_select_cats = explode('@@@', $catlist); if (!is_array($tmp_select_cats)) { return false; } $select_cats = array(); $select_cats['none'] = ALL_CATEGORIES; foreach($tmp_select_cats as $cidx => $tmp_select_cat) { $select_cat = explode('|||', $tmp_select_cat); if (!empty($select_cat[0]) && !empty($select_cat[1])) { $select_cats[$select_cat[0]] = $select_cat[1]; } } $propbag->add('type', 'select'); $propbag->add('select_values', $select_cats); $propbag->add('name', CATEGORY); $propbag->add('description', CATEGORIES_TO_FETCH); $propbag->add('default', 'none'); break; default: return false; } return true; } function generate_content(&$title) { global $serendipity; $number = $this->get_config('number'); $category = $this->get_config('category', 'none'); $title = $this->get_config('title', $this->title); $number_from_sw = $this->get_config('number_from'); $sql_join = ''; $sql_where = ''; if ($category != 'none' && is_numeric($category)) { $sql_join = 'LEFT OUTER JOIN ' . $serendipity['dbPrefix'] . 'entrycat AS ec ON id = ec.entryid LEFT OUTER JOIN ' . $serendipity['dbPrefix'] . 'category AS c ON ec.categoryid = c.categoryid'; $sql_where = ' AND (c.category_left BETWEEN ' . implode(' AND ', serendipity_fetchCategoryRange($category)) . ')'; } if (!$number || !is_numeric($number) || $number < 1) { $number = 10; } $sql_number = $number; switch($number_from_sw) { case 'skip': $sql_number = serendipity_db_limit_sql(serendipity_db_limit($serendipity['fetchLimit'], $sql_number)); break; } $entries_query = "SELECT id, title, comments FROM {$serendipity['dbPrefix']}entries $sql_join WHERE isdraft = 'false' AND timestamp <= " . time() . " $sql_where ORDER BY comments DESC LIMIT $sql_number"; $entries = serendipity_db_query($entries_query); if (isset($entries) && is_array($entries)) { foreach ($entries as $k => $entry) { $entryLink = serendipity_archiveURL( $entry['id'], $entry['title'], 'serendipityHTTPPath' ); echo '<a href="' . $entryLink . '" title="' . htmlspecialchars($entry['title']) . '">' . $entry['title'] . '</a><br />'; echo '<div class="serendipitySideBarDate">'. htmlspecialchars($entry['comments']) . ' comments</div>'; } } } } ?> |
From: Kaustubh S. <kau...@us...> - 2004-12-08 18:49:37
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_plugin_popularentries In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21107/serendipity_plugin_popularentries Log Message: Directory /cvsroot/php-blog/additional_plugins/serendipity_plugin_popularentries added to the repository |
From: Garvin H. <gar...@us...> - 2004-12-08 17:29:12
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_entrycheck In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2337 Added Files: serendipity_event_entrycheck.php Log Message: plugin for kris --- NEW FILE: serendipity_event_entrycheck.php --- (This appears to be a binary file; contents omitted.) |
From: Garvin H. <gar...@us...> - 2004-12-08 17:28:12
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_entrycheck In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2169/serendipity_event_entrycheck Log Message: Directory /cvsroot/php-blog/additional_plugins/serendipity_event_entrycheck added to the repository |
From: Garvin H. <gar...@us...> - 2004-12-08 17:24:37
|
Update of /cvsroot/php-blog/additional_plugins/mail2s9y In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1289 Modified Files: mail2s9y.php Log Message: sorry, need to test my karma - I get permission denied when creating a new directory ?! Index: mail2s9y.php =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/mail2s9y/mail2s9y.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mail2s9y.php 24 Nov 2004 13:20:13 -0000 1.1 +++ mail2s9y.php 8 Dec 2004 17:24:27 -0000 1.2 @@ -10,6 +10,7 @@ # Contributed by Sebastian Nohn <seb...@no...>, Gijs van Tulder <gvt...@gm...> # Implemented by the Garvin Hicking <me...@su...> of the s9y group (www.s9y.org) # +# # Changes: # -------- # |
From: Garvin H. <gar...@us...> - 2004-12-06 12:27:15
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_entrysplit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31783 Modified Files: serendipity_event_entrysplit.php Log Message: don'T show paging when not neccessary Index: serendipity_event_entrysplit.php =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_event_entrysplit/serendipity_event_entrysplit.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- serendipity_event_entrysplit.php 6 Dec 2004 12:19:16 -0000 1.1 +++ serendipity_event_entrysplit.php 6 Dec 2004 12:27:04 -0000 1.2 @@ -130,6 +130,10 @@ } $parts_count = count($parts) + 1; + if ($parts_count <= 2) { + return true; + } + $pagination = '<div style="width: 50%; margin-left: auto; margin-right: auto; text-align: center" id="entry_pagination">' . PLUGIN_ENTRYSPLIT_PAGES . ': '; for ($page = 1; $page < $parts_count; $page++) { $pagination .= '<a href="' . $url . $page . '">' |
From: Garvin H. <gar...@us...> - 2004-12-06 12:19:27
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_entrysplit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29747/serendipity_event_entrysplit Added Files: serendipity_event_entrysplit.php Log Message: allow multi-page entries --- NEW FILE: serendipity_event_entrysplit.php --- (This appears to be a binary file; contents omitted.) |
From: Garvin H. <gar...@us...> - 2004-12-06 12:17:53
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_entrysplit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29402/serendipity_event_entrysplit Log Message: Directory /cvsroot/php-blog/additional_plugins/serendipity_event_entrysplit added to the repository |
From: Nightly <ni...@us...> - 2004-12-02 18:01:59
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_babelfish In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16944 Modified Files: serendipity_event_babelfish.php Log Message: Fixed German characters, sorry about that. Will use ISO-8859-1 from now on. Index: serendipity_event_babelfish.php =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_event_babelfish/serendipity_event_babelfish.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- serendipity_event_babelfish.php 2 Dec 2004 16:41:30 -0000 1.5 +++ serendipity_event_babelfish.php 2 Dec 2004 18:01:50 -0000 1.6 @@ -3,11 +3,14 @@ case 'de': @define('PLUGIN_BABELFISH_VERSION', '1.1'); @define('PLUGIN_BABELFISH_NAME', 'Babelfisch'); - @define('PLUGIN_BABELFISH_DESCRIPTION', 'Ñbersetzt Blog-EintrÐge'); - @define('PLUGIN_BABELFISH_TRANSLATE', 'Ñbersetze nach '); + @define('PLUGIN_BABELFISH_DESCRIPTION', 'Übersetzt Blog-Einträge'); + @define('PLUGIN_BABELFISH_TRANSLATE', 'Übersetze nach '); @define('PLUGIN_BABELFISH_URL_DESC', 'URL to the website used for translation'); @define('PLUGIN_BABELFISH_PAIRS_DESC', 'Translation pairs to be used'); break; + case 'ru': + include_once S9Y_INCLUDE_PATH . 'plugins/serendipity_event_babelfish/lang_ru.php'; + break; case 'en': default: @define('PLUGIN_BABELFISH_VERSION', '1.1'); @@ -17,15 +20,6 @@ @define('PLUGIN_BABELFISH_URL_DESC', 'URL to the website used for translation'); @define('PLUGIN_BABELFISH_PAIRS_DESC', 'Translation pairs to be used'); break; - case 'ru': - default: - @define('PLUGIN_BABELFISH_VERSION', '1.1'); - @define('PLUGIN_BABELFISH_NAME', 'Babelfish'); - @define('PLUGIN_BABELFISH_DESCRIPTION', 'ÐвÑомаÑиÑеÑкий пеÑевод запиÑей блога на дÑÑгие ÑзÑки'); - @define('PLUGIN_BABELFISH_TRANSLATE', 'Translate to '); - @define('PLUGIN_BABELFISH_URL_DESC', 'URL ÑайÑа, коÑоÑÑй иÑполÑзÑеÑÑÑ Ð´Ð»Ñ Ð¿ÐµÑевода'); - @define('PLUGIN_BABELFISH_PAIRS_DESC', 'ÐоддеÑживаемÑе паÑÑ Ð¿ÐµÑеводов Ñ ÑазнÑÑ ÑзÑков'); - break; } class serendipity_event_babelfish extends serendipity_event @@ -155,4 +149,4 @@ } } } -?> \ No newline at end of file +?> |
From: Nightly <ni...@us...> - 2004-12-02 17:56:35
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_babelfish In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15783 Added Files: lang_ru.php Log Message: External file for Russian messages. --- NEW FILE: lang_ru.php --- (This appears to be a binary file; contents omitted.) |
From: Nightly <ni...@us...> - 2004-12-02 16:41:39
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_babelfish In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29979/additional_plugins/serendipity_event_babelfish Modified Files: serendipity_event_babelfish.php Log Message: Update to make it universal - user can now specify URL for the translation engine and select translation pairs. Index: serendipity_event_babelfish.php =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_event_babelfish/serendipity_event_babelfish.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- serendipity_event_babelfish.php 2 Dec 2004 08:20:57 -0000 1.4 +++ serendipity_event_babelfish.php 2 Dec 2004 16:41:30 -0000 1.5 @@ -1,30 +1,35 @@ <?php // $Id$ switch ($serendipity['lang']) { case 'de': - @define('PLUGIN_BABELFISH_VERSION', '1.0'); + @define('PLUGIN_BABELFISH_VERSION', '1.1'); @define('PLUGIN_BABELFISH_NAME', 'Babelfisch'); - @define('PLUGIN_BABELFISH_DESCRIPTION', 'Übersetzt Blog-Einträge'); - @define('PLUGIN_BABELFISH_TRANSLATE', 'Übersetze nach '); + @define('PLUGIN_BABELFISH_DESCRIPTION', 'Ñbersetzt Blog-EintrÐge'); + @define('PLUGIN_BABELFISH_TRANSLATE', 'Ñbersetze nach '); + @define('PLUGIN_BABELFISH_URL_DESC', 'URL to the website used for translation'); + @define('PLUGIN_BABELFISH_PAIRS_DESC', 'Translation pairs to be used'); break; case 'en': default: - @define('PLUGIN_BABELFISH_VERSION', '1.0'); + @define('PLUGIN_BABELFISH_VERSION', '1.1'); @define('PLUGIN_BABELFISH_NAME', 'Babelfish'); @define('PLUGIN_BABELFISH_DESCRIPTION', 'Translate blog entries (trash!)'); @define('PLUGIN_BABELFISH_TRANSLATE', 'Translate to '); + @define('PLUGIN_BABELFISH_URL_DESC', 'URL to the website used for translation'); + @define('PLUGIN_BABELFISH_PAIRS_DESC', 'Translation pairs to be used'); + break; + case 'ru': + default: + @define('PLUGIN_BABELFISH_VERSION', '1.1'); + @define('PLUGIN_BABELFISH_NAME', 'Babelfish'); + @define('PLUGIN_BABELFISH_DESCRIPTION', 'ÐвÑомаÑиÑеÑкий пеÑевод запиÑей блога на дÑÑгие ÑзÑки'); + @define('PLUGIN_BABELFISH_TRANSLATE', 'Translate to '); + @define('PLUGIN_BABELFISH_URL_DESC', 'URL ÑайÑа, коÑоÑÑй иÑполÑзÑеÑÑÑ Ð´Ð»Ñ Ð¿ÐµÑевода'); + @define('PLUGIN_BABELFISH_PAIRS_DESC', 'ÐоддеÑживаемÑе паÑÑ Ð¿ÐµÑеводов Ñ ÑазнÑÑ ÑзÑков'); break; } class serendipity_event_babelfish extends serendipity_event { - var $translation_table = array( - 'en' => array('de', 'es', 'fr', 'it', 'pt'), - 'de' => array('en', 'fr'), - 'es' => array('en'), - 'fr' => array('en', 'de'), - 'it' => array('en'), - 'pt' => array('en') - ); function introspect(&$propbag) { @@ -32,6 +37,12 @@ $propbag->add('name', PLUGIN_BABELFISH_NAME); $propbag->add('description', PLUGIN_BABELFISH_DESCRIPTION); + + $propbag->add('configuration',array( + 'EngineURL', + 'TranslationPairs' + )); + $propbag->add('event_hooks', array( 'frontend_display' => true, @@ -45,6 +56,26 @@ { $title = PLUGIN_BABELFISH_NAME; } + + function introspect_config_item($name, &$propbag) + { + switch ($name) { + + case 'EngineURL': + $propbag->add('type', 'string'); + $propbag->add('name', $name); + $propbag->add('description', PLUGIN_BABELFISH_URL_DESC); + $propbag->add('default', 'http://babelfish.altavista.com/babelfish/trurl_pagecontent?url=$bfURL&lp=$bfFromLang%5F$bfToLang'); + break; + case 'TranslationPairs': + $propbag->add('type', 'string'); + $propbag->add('name', $name); + $propbag->add('description', PLUGIN_BABELFISH_PAIRS_DESC); + $propbag->add('default', 'en->de,en->es,en->fr,en->it,en->pt,de->en,de->fr,es->en,fr->en,fr->de,it->en,pt->en,ru->en'); + break; + }; + return true; + } function event_hook($event, &$bag, &$eventData, $addData = null) { global $serendipity; @@ -86,32 +117,42 @@ if ($bag->get('scrambles_true_content') && is_array($addData) && isset($addData['no_scramble'])) { return true; } - $msg = '<div class="serendipity_babelfish">'.PLUGIN_BABELFISH_TRANSLATE; - foreach($this->translation_table[$serendipity['lang']] as $target_lang) { - $msg .= - ' <a href="http://translate.google.com/translate?u=' . - urlencode( - serendipity_archiveURL( - $eventData['id'], - $eventData['title'] - ) - ) . - '&langpair=' . - $serendipity[lang] . '%7C' . $target_lang . - '">' . - $target_lang . - '</a>'; + + $pairs = split(',', $this->get_config('TranslationPairs')); + + $msg = ''; + + foreach($pairs as $pair) { + list($src_lang, $dst_lang) = split('->', $pair); + + if ($src_lang == $serendipity[lang]) { + + if ($msg == '') { + $msg = '<div class="serendipity_babelfish">'.PLUGIN_BABELFISH_TRANSLATE; + } + + $bfURL=urlencode( + serendipity_archiveURL( + $eventData['id'], + $eventData['title'] + )); + $bfFromLang=$src_lang; + $bfToLang=$dst_lang; + + $line=$this->get_config('EngineURL'); + eval("\$line = \"$line\";"); + + $msg .= ' <a href="' . $line.'">'.$dst_lang.'</a>'; + } + } + $msg .= '</div>'; + $eventData['body'] .= $msg; + break; + + default: + return false; } - $msg .= '</div>'; - $eventData['body'] .= $msg; - break; - - default: - return false; - } - } else { - return false; } } } -?> +?> \ No newline at end of file |
From: Sebastian N. <no...@us...> - 2004-12-02 08:26:42
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_plugin_weather In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13265/serendipity_plugin_weather Modified Files: serendipity_plugin_weather.php Log Message: html validation Index: serendipity_plugin_weather.php =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_plugin_weather/serendipity_plugin_weather.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- serendipity_plugin_weather.php 8 Oct 2004 13:41:42 -0000 1.7 +++ serendipity_plugin_weather.php 2 Dec 2004 08:26:34 -0000 1.8 @@ -1,19 +1,6 @@ <?php -/** -* Title: Weather Sidebar-Plugin -* URL: .../plugins/serendipity_plugin_weather/serendipity_plugin_weather.php -* Version: $Id$ -* Author(s): Sebastian Nohn <seb...@no...>, Nikolai Lusan <ni...@lu...> -* Description: -* Plugin for Serendipity blog system (S9Y) that utilizes -* PEAR::Services_Weather to retrieve METAR weather information -* for a given location and display them. -* Todo: -* Translate weather condition, wind directon; do something with forecast -* and location data or erase it. -* -*/ +/* $Id$*/ switch ($serendipity['lang']) { case 'de': @@ -396,8 +383,8 @@ $content .= '<img src="' . $conditionIcon . '" alt="" /><br />'. $conditions . '<br />'; // FIXXME: Translate the Winddirection - $content .= '<dt>'.PLUGIN_SIDEBAR_WEATHER_DATA_WINDDIRECTION.'</dt><dd><img src="' . - $windDirIcon . '" alt=""><br />' . + $content .= '<dl><dt>'.PLUGIN_SIDEBAR_WEATHER_DATA_WINDDIRECTION.'</dt><dd><img src="' . + $windDirIcon . '" alt="" /><br />' . $weather_data["windDirection"] . ', ' . $weather_data["wind"] . $units['wind'] . ' <br />'; $content .= '<dt>'.PLUGIN_SIDEBAR_WEATHER_DATA_TEMPERATURE.'</dt><dd>'. @@ -411,7 +398,7 @@ $content .= '<dt>'.PLUGIN_SIDEBAR_WEATHER_DATA_VISIBILITY.'</dt><dd>' . $weather_data["visibility"] . $units['vis'] . '</dd>'; $content .= '<dt>'.PLUGIN_SIDEBAR_WEATHER_DATA_UPDATE.'</dt><dd>' . - $localTime . '</dd>'; + $localTime . '</dd></dl>'; echo $content; } // function |
From: Sebastian N. <no...@us...> - 2004-12-02 08:26:42
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_plugin_hitmaps In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13265/serendipity_plugin_hitmaps Modified Files: serendipity_plugin_hitmaps.php Log Message: html validation Index: serendipity_plugin_hitmaps.php =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_plugin_hitmaps/serendipity_plugin_hitmaps.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- serendipity_plugin_hitmaps.php 13 Nov 2004 02:15:53 -0000 1.2 +++ serendipity_plugin_hitmaps.php 2 Dec 2004 08:26:33 -0000 1.3 @@ -32,7 +32,7 @@ $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>"; + <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>"; } } |
From: Sebastian N. <no...@us...> - 2004-12-02 08:21:09
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_babelfish In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11970/serendipity_event_babelfish Modified Files: serendipity_event_babelfish.php Log Message: html validation Index: serendipity_event_babelfish.php =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_event_babelfish/serendipity_event_babelfish.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- serendipity_event_babelfish.php 15 Sep 2004 15:32:57 -0000 1.3 +++ serendipity_event_babelfish.php 2 Dec 2004 08:20:57 -0000 1.4 @@ -96,7 +96,7 @@ $eventData['title'] ) ) . - '&langpair=' . + '&langpair=' . $serendipity[lang] . '%7C' . $target_lang . '">' . $target_lang . |
From: Garvin H. <gar...@us...> - 2004-11-24 13:35:25
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_plugin_amazon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7489 Modified Files: serendipity_plugin_amazon.php Log Message: applied changes suggested by kevin polley for users without gdlib Index: serendipity_plugin_amazon.php =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_plugin_amazon/serendipity_plugin_amazon.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- serendipity_plugin_amazon.php 13 Nov 2004 02:15:52 -0000 1.2 +++ serendipity_plugin_amazon.php 24 Nov 2004 13:35:13 -0000 1.3 @@ -34,6 +34,9 @@ $propbag->add('name', PLUGIN_AMAZON_TITLE); $propbag->add('description', PLUGIN_AMAZON_DESC); $propbag->add('configuration', array('title', 'site', 'amazonid', 'asin', 'articleinfo', 'info_asin')); + $propbag->add('author', 'Thomas Nesges'); + $propbag->add('stackable', true); + $propbag->add('version', '1.1'); } function introspect_config_item($name, &$propbag) { @@ -44,13 +47,13 @@ $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']); + $propbag->add('default', ($serendipity['lang'] == 'en' ? 'com' : $serendipity['lang'])); break; case 'amazonid': @@ -66,13 +69,13 @@ $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; } @@ -95,7 +98,7 @@ $articleinfo = array(); $changesmade++; } - + foreach($config_asins as $asin) { $asin = preg_replace('/\s+/', '', $asin); $found = 0; @@ -110,52 +113,54 @@ $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>"; + echo "<div align='center'><a href='" . $articleinfo[$show]['url'] . "/" . $amazonid . "'><img src='" . $articleinfo[$show]['imgpath'] . "' alt='" . $articleinfo[$show]['desc'] . "' style='border: 0px'></a></div>"; } - + function amazon_fetch($asin, $site="de") { - $local_path = "uploads/amazon/$asin.jpg"; + $local_path = "uploads/amazon/$asin"; $amazon_url = "http://www.amazon.".$site."/exec/obidos/ASIN/$asin"; $ret = array(); - - if(! file_exists($local_path)) { + + if(!file_exists($local_path . '.jpg') && !file_exists($local_path . '.gif') && !file_exists($local_path . '.png')) { echo "<div style='font-size:xx-small'>"; - echo "getting $asin<br>"; + echo "getting $asin<br />"; $content = join('', file($amazon_url)); - if(! $content) { - echo "no content for $asin<br>"; + 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>"; + 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); + echo "getting image<br />"; + @mkdir("uploads", 0755); + @mkdir("uploads/amazon", 0755); switch($file_type) { - case "jpg": - $file = fopen($image_url, "rb"); + case 'png': + case 'gif': + case 'jpg': + $file = @fopen($image_url, "rb"); if($file) { - $save = fopen($local_path, "wb"); + $save = @fopen($local_path . '.' . $file_type, "wb"); if($save) { while($line = fread($file, 1024)) { fwrite($save, $line); @@ -164,24 +169,17 @@ } break; - case "gif": - $img = imagecreatefromgif($image_url); - imagejpeg($img, $local_path); - break; - - case "png": - $img = imagecreatefrompng($image_url); - imagejpeg($img, $local_path); - break; + default: + echo "unknown file type: '$file_type'<br />"; } } - echo "ready. next!<br><br>"; - + echo "ready. next!<br /><br />"; + $ret['desc'] = $description; } - + $ret['asin'] = $asin; - $ret['imgpath'] = $local_path; + $ret['imgpath'] = $local_path . '.' . $file_type; $ret['url'] = $amazon_url; return $ret; } |
From: Garvin H. <gar...@us...> - 2004-11-24 13:26:49
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_staticpage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5711/serendipity_event_staticpage Modified Files: serendipity_event_staticpage.php Log Message: added jannis head nugget plugin updated staticpage plugin Index: serendipity_event_staticpage.php =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_event_staticpage/serendipity_event_staticpage.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- serendipity_event_staticpage.php 17 Oct 2004 15:21:12 -0000 1.1 +++ serendipity_event_staticpage.php 24 Nov 2004 13:26:33 -0000 1.2 @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php # $Id: serendipity_event_staticpage.php, v0.3 2004/10/16 # (c) by Marco Rinck aka romulus, http://www.romulus23.de, licensed under BSD license, see http://www.fsf.org/licenses/info/BSD_3Clause.html @@ -6,14 +6,14 @@ 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_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('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; + break; case 'it': @define('STATICPAGE_HEADLINE', 'Intestazione'); @@ -22,123 +22,133 @@ @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('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; + 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', '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; + 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(&$propbag) { + global $serendipity; - } + $propbag->add('name', STATICPAGE_TITLE . ': ' . $this->get_config('pagetitle')); + $propbag->add('description', STATICPAGE_TITLE_BLAHBLAH); + $propbag->add('event_hooks', array('entries_header' => true, 'entry_display' => true)); + $propbag->add('configuration', array('headline', 'content', 'pagetitle', 'markup', 'articleformat')); + $propbag->add('author', 'Marco Rinck'); + $propbag->add('version', '1.4'); + $propbag->add('stackable', true); + } 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 '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'); + 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': + 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': + + 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').')'; + 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); + 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; + if ($this->get_config('articleformat') == TRUE) { + echo '</div></div>'; + } + } - $hooks = &$bag->get('event_hooks'); + function event_hook($event, &$bag, &$eventData, $addData = null) { + global $serendipity; - 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; - } - } + $hooks = &$bag->get('event_hooks'); + + if (isset($hooks[$event])) { + switch($event) { + case 'entry_display': + if ($serendipity['GET']['subpage'] == $this->get_config('pagetitle')) { + $eventData['clean_page'] = true; // This is important to not display an entry list! + } + return true; + break; + + case 'entries_header': + if ($serendipity['GET']['subpage'] == $this->get_config('pagetitle')) { + $title = ''; + $this->generate_content($title); + } + + return true; + break; + + default: + return false; + break; + } + } else { + return false; + } + } } -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file +/* vim: set sts=4 ts=4 expandtab : */ \ No newline at end of file |
From: Garvin H. <gar...@us...> - 2004-11-24 13:26:49
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_head_nugget In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5711/serendipity_event_head_nugget Added Files: serendipity_event_head_nugget.php Log Message: added jannis head nugget plugin updated staticpage plugin --- NEW FILE: serendipity_event_head_nugget.php --- <?php class serendipity_event_head_nugget extends serendipity_event { function introspect(&$propbag) { $propbag->add('name', 'head nugget'); $propbag->add('description', HOLDS_A_BLAHBLAH); $propbag->add('configuration', array( 'content' ) ); $propbag->add('event_hooks', array('frontend_header' => true)); $propbag->add('author', 'Jannis Hermanns'); $propbag->add('version', '1.1'); $propbag->add('stackable', true); } function event_hook($event, &$bag, &$eventData, $addData = null) { if ($event == 'frontend_header') echo $this->get_config('content'); } function introspect_config_item($name, &$propbag) { switch($name) { case 'content': $propbag->add('type', 'html'); $propbag->add('name', CONTENT); $propbag->add('description', THE_NUGGET); $propbag->add('default', ''); break; default: return false; } return true; } } ?> |
From: Garvin H. <gar...@us...> - 2004-11-24 13:25:58
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_head_nugget In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5578/serendipity_event_head_nugget Log Message: Directory /cvsroot/php-blog/additional_plugins/serendipity_event_head_nugget added to the repository |
From: Garvin H. <gar...@us...> - 2004-11-24 13:20:27
|
Update of /cvsroot/php-blog/additional_plugins/mail2s9y In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4535/mail2s9y Added Files: mail2s9y.php Log Message: I don't want to maintain it on my site any more, so it's probably best kept here. --- NEW FILE: mail2s9y.php --- #!/usr/local/bin/php <?php # # mail2s9y.php, 0.6 # ----------------- # # Seperate PHP-Script to allow email blogging. # REQUIRES: PHP CLI-binary, Linux/Cygwin(?), local Mail installation. # # Contributed by Sebastian Nohn <seb...@no...>, Gijs van Tulder <gvt...@gm...> # Implemented by the Garvin Hicking <me...@su...> of the s9y group (www.s9y.org) # # Changes: # -------- # # 0.6 (2004-04-13): Update with patches from amonthera (related to lowercasing attributes) # 0.5 (2004-02-20): An security update by Alex Copeland, who pointed out that images could be uploaded without authentication. # 0.4 (2004-01-19): Another update from Bjoern Schotte, who added interactivity to s9y. It will now mail back to ask for a category for the item. # 0.3 (2004-01-13): # Automatic URL replacement (translates http://... and other common protocols into hyperlinks). Thanks to Bjoern Schotte for the patch! # Made Login modes working for s9y 0.5-CVS again # 0.2 (2003-12-02): Beautified code # 0.1 (2003-12-01): 3 different authentication methods are now available (security issues) # Resets any cookie/session variables to block webrequests to this page # # To get this to work, do the following: # -------------------------------------- # # 1. Possibly adjust the first line of this script to point to your PHP CLI-binary. Put the package # PEAR-Package Mail_Mime (http://pear.php.net/get/Mail_Mime) into your s9y/bundled-libs folder, so # that you have an existing s9y/bundled-libs/Mail/mimeDecode.php file. # # 2. Make your local MTA recognize an E-Mail adress to be responsible for s9y. In most setups, # just add the following line to your "/etc/aliases" file: # # s9y: "|/path/to/mail2s9y.php [username] [password]" # # The name 's9y' refers to the email account you chose to use for your local mail server. # Of course, change the path to something valid. # # If you use the 'cmdline' authentication method (configuration see below) you have to provide # the [username] and [password] credentials to your s9y-installation. If # password-security is important to you, use a .procmail forwarding rule and set appropriate # file permissions to your .procmail file (0600). However, the preferred authentication method # is 'mailbody' and should be used to disallow anybody to mail a blog entry to your special # email account, if ever exposed to the public. # # If you don't know how to setup an account or adjust the line above to a .procmail rule, # you most probably don't want to use this script at all. # # 3. Adjust the variable $params['s9ypath'] below to point to your s9y installation. # # 4. MAKE SURE, that your mail-account user is in the same group as the owner of the file # 'serendipity_config_local.inc.php'! Otherwise, your configuration can't be read. # Usually, the file belongs to the webserver, so if you don't want to stick the user into # the same group, you have to change the ownership of the file to your target user. Bear # in mind, that the original permission ('ug+rwx') are updated any time you make changes to # your s9y-setup. # # 5. Write an E-Mail to your chose local address. The subject will be the title for your entry, # the body your text and possible attachments will be uploaded to your s9y directory structure. # # # Also make sure that... # ---------------------- # # * Preferably your E-Mail blog-message should contain no unwanted # linebreaks after the usual 70 char limit. If your E-Mail client does # that to you, try to configure it not to; otherwise this may result # in an ugly HTML display in your blog, and/or broken HTML tags you could # have posted # # * If you use automatic URL rewriting (which transforms http://, ftp://, # ...) links into valid HTML, please take care that this url is without # any special characters (brackets, punctuation characters, ...), or else # you may get those characters included in the auto-guessed URL. # # * Feedback is appreciated! If anything doesn't work, please post your # problems to either the s9y-support forums/mailinglists or mail the # author personally. // --------------------------------------------------- // CONFIGURATION - // --------------------------------------------------- $params = array( 's9ypath' => '/home/superdbl/cvs/serendipity/', # PATH to your s9y installation 'auth' => 'mailsubject', # How will you pass your username/password? Possible values are: # # 'mailbody' : The username/password is extracted from the first line of the body of the mail # and has to be formatted like: "(username:password)<linebreak>Usual body here..." # (the '(' and ')' characters are required!) # # 'mailsubject': The username/password is extracted from the subject and has to be formatted # like: "(username:password)Usual Subject here..." # (the '(' and ')' characters are required!) # # 'cmdline': The username/password is provided in your /etc/aliases file (see point 2 from the # documentation above). In other setups/cases, just pass username as first and password # as the second commandline option to mail2s9y.phps 'logfile' => '/var/vpopmail/domains/supergarv.de/mail2s9y/mail2s9y.log', # If you want to log every received email, set the path to where a logfile shall be written. Remeber that # it needs to be writeable. 'include_bodies' => TRUE, 'decode_bodies' => TRUE, 'decode_headers' => TRUE, # MIMEDecode settings 'category' => '', # If you want to have your postings sorted to a special s9y category, insert the id of that category here. # If left empty, mail2s9y will mail you back to ask in which category to put your category. # REMEMBER TO PUT YOUR USERNAME/PASSWORD BACK IN THE RESPONSE MAIL, DEPENDING ON YOUR AUTH-METHOD! 'nl2br' => false, # Use nl2br() in order to get newlines from mail translated to br tags. 'allow_comments' => 'true', # If you want to disallow entries coming from your E-Mails to be commentable, set this to 'false' 'input' => '' # Initialization ); // --------------------------------------------------- $inc = @ini_get('include_path'); @ini_set('include_path', $params['s9ypath'] . ':.:' . $params['s9ypath'] . 'bundled-libs/'); // Constants @define('MAIL2S9Y_AUTHENTICATION_FAILED', 'Authentication failed using %s.'); @define('MAIL2S9Y_AUTHENTICATION_GRANTED', 'Authentication granted using %s'); @define('MAIL2S9Y_MAILINFO', 'Mail received from "%s", subject "%s". %d bytes in the article, %d images provided.'); @define('MAIL2S9Y_POSTING_FAILED', 'Posting failed'); @define('MAIL2S9Y_POSTING_SUCCEEDED', 'Posting succeeded'); @define('MAIL2S9Y_ALREADY_BLOGGED', "Error: The following images have already been blogged:\n\n%s"); @define('MAIL2S9Y_CATSELECTOR_BEGIN', 'BEGIN catselector'); @define('MAIL2S9Y_CATSELECTOR_END', 'END catselector'); // Safety: Reset any session to not post anything when viewed from the web unset($_SESSION); unset($HTTP_SESSION_VARS); unset($_GET); unset($HTTP_GET_VARS); unset($_POST); unset($HTTP_POST_VARS); unset($_REQUEST); unset($HTTP_REQUEST_VARS); unset($_COOKIE); unset($HTTP_COOKIE_VARS); unset($serendipity); // Custom functions function is_categorizer($body) { if (!preg_match('=^.*#([0-9]+) ' . ENTRY_SAVED . '.*$=msiU', $body, $entryidmatch)) { return false; } if (preg_match('=^.*\-\-\- ' . MAIL2S9Y_CATSELECTOR_BEGIN . ' \-\-\-\n(.*)\-\-\- ' . MAIL2S9Y_CATSELECTOR_END . ' \-\-\-.*$=msiU', $body, $matches)) { if (preg_match('=^.*\[X\] (.{0,3}[0-9]{1,4}) (.*)\n.*$=msiU', $matches[1], $matches)) { $GLOBALS['entryid'] = $entryidmatch[1]; return $matches[1]; } else { return false; } } else { return false; } } function url_replace($str) { $pattern = '#(^|[^\"=]{1})(http://|https://|ftp://|mailto:|news:)([^\s<>]+)([\s\n<>]|$)#sim'; $str = preg_replace($pattern, "\\1<a href=\"\\2\\3\">\\2\\3</a>\\4", $str); return $str; } // S9y hook chdir($params['s9ypath']); if (file_exists('./serendipity_config_local.inc.php')) { include('serendipity_config.inc.php'); } if ($params['auth'] == 'cmdline') { $serendipity['POST']['user'] = &$argv[1]; $serendipity['POST']['pass'] = &$argv[2]; } // PEAR hook require_once('bundled-libs/Mail/mimeDecode.php'); // Read the eMail from stdin $fd = fopen('php://stdin', 'r'); while (!feof($fd)) { $input .= fread($fd, 1024); } fclose($fd); $log = false; if ($params['logfile'] != '') { $log = @fopen($params['logfile'], 'a'); if (!is_resource($log)) { unset($log); function logger($msg) { return true; } } else { function logger($msg) { global $log; fwrite($log, date('[Y-m-d H:i] ') . $msg . "\n"); } } } $params['input'] = &$input; // Decode Mail $structure = Mail_mimeDecode::decode($params); // Subject $subject = $structure->headers['subject']; // From $from = $structure->headers['from']; // Recipient $to = $structure->headers['to']; $post = 0; $falsefile = ''; $images = 0; $writefiles = array(); // Is it a multipart-message? if(is_array($structure->parts)) { foreach ($structure->parts as $part) { if (strtolower($part->ctype_primary) == 'text') { // Body $body = &$part->body; } if (strtolower($part->ctype_primary) == 'image') { // Image $image = $params['s9ypath'] . 'uploads/' . $part->d_parameters['filename']; $url_image = $serendipity['BaseURL'] . 'uploads/' . $part->d_parameters['filename']; // Does this Image already exist? if (file_exists($image)) { $falsefile .= "$image\n"; $post++; } else { $writefiles[] = array('image' => $image, 'data' => $part->body); $body .= '<br /><img src="' . $url_image . '" alt="' . $subject . '"><br />'; $images++; } } } } else { // No multipart-message, so this is the body: $body = &$structure->body; } if ($params['auth'] == 'mailbody') { preg_match('@^\(([^:]*):(.*)\)@', $body, $matches); $body = trim(preg_replace('@^\(' . preg_quote($matches[1]) . ':' . preg_quote($matches[2]) . '\)@', '', $body)); $serendipity['POST']['user'] = $matches[1]; $serendipity['POST']['pass'] = $matches[2]; } elseif ($params['auth'] == 'mailsubject') { preg_match('@^\(([^:]*):(.*)\)@', $subject, $matches); $subject = trim(preg_replace('@^\(' . preg_quote($matches[1]) . ':' . preg_quote($matches[2]) . '\)@', '', $subject)); $serendipity['POST']['user'] = $matches[1]; $serendipity['POST']['pass'] = $matches[2]; } $serendipity['POST']['auto'] = 'true'; if (serendipity_userLoggedIn() || (function_exists('serendipity_login') && serendipity_login())) { logger(sprintf(MAIL2S9Y_AUTHENTICATION_GRANTED, $params['auth'])); } else { logger(sprintf(MAIL2S9Y_AUTHENTICATION_FAILED, $params['auth'])); die(sprintf(MAIL2S9Y_AUTHENTICATION_FAILED, $params['auth'])); mail($from, MAIL2S9Y_POSTING_FAILED, sprintf(MAIL2S9Y_AUTHENTICATION_FAILED, $params['auth'])); } if (count($writefiles) > 0) { foreach($writefiles AS $idx => $filearray) { $fd = fopen($filearray['image'], 'w'); fwrite($fd, $filearray['data']); fclose($fd); } } logger(sprintf(MAIL2S9Y_MAILINFO, $from, $subject, strlen($body), $images)); if ($post > 0) { $msg = sprintf(MAIL2S9Y_ALREADY_BLOGGED, $falsefile); echo $msg; mail($from, MAIL2S9Y_POSTING_FAILED, $msg); logger($msg); } else { logger($body); $newbody = url_replace($body); if (isset($params['nl2br']) && $params['nl2br']) { $newbody = nl2br($newbody); } logger($body); $entry = array( 'id' => '', 'title' => $subject, 'timestamp' => '', 'body' => $newbody, 'extended' => '', 'categoryid' => $params['category'], 'isdraft' => 'false', 'allow_comments' => $params['allow_comments'] ); $cats = ''; if (!$cats = is_categorizer($body)) { $res = serendipity_updertEntry($entry); } else { $res = array(); } if (is_string($res)) { echo MAIL2S9Y_POSTING_FAILED . ': ' . $res; mail($from, MAIL2S9Y_POSTING_FAILED, $res); logger(MAIL2S9Y_POSTING_FAILED . ': ' . $res); } else { $catupdated = false; if (!$cats) { $msg = '#' . $res . ' ' . ENTRY_SAVED; } else { $r = serendipity_db_query( sprintf( "UPDATE ${serendipity['dbPrefix']}entries SET categoryid='%d' WHERE id='%d'", $cats, $entryid ) ); if (!$r) { $msg = MAIL2S9Y_POSTING_FAILED; } else { $msg = CATEGORY_SAVED; } $catupdated = true; } /** * mail categories. */ if (empty($params['category']) && !$cats && !$catupdated) { $subj = "Re: " . $subject; $msg .= "\n\n"; $msg .= "--- " . MAIL2S9Y_CATSELECTOR_BEGIN . " ---\n\n"; $c = serendipity_fetchCategories(); foreach ($c as $v) { $msg .= sprintf("[] %4d %s\n", $v['categoryid'], $v['category_name']); } $msg .= "\n--- " . MAIL2S9Y_CATSELECTOR_END . " ---\n"; } elseif (empty($params['category'])) { $subj = CATEGORY_SAVED; } else { $subj = MAIL2S9Y_POSTING_SUCCEEDED; } mail($from, $subj, $msg, "From: " . $to); logger($msg); } } if ($log) fclose($log); ?> |
From: Garvin H. <gar...@us...> - 2004-11-24 13:17:57
|
Update of /cvsroot/php-blog/additional_plugins/mail2s9y In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4222/mail2s9y Log Message: Directory /cvsroot/php-blog/additional_plugins/mail2s9y added to the repository |
From: Garvin H. <gar...@us...> - 2004-11-21 10:19:12
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_gravatar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4216/serendipity_event_gravatar Added Files: serendipity_event_gravatar.php Log Message: gravatar plugin --- NEW FILE: serendipity_event_gravatar.php --- <?php # $Id: serendipity_event_gravatar.php,v 1.1 2004/11/21 10:19:01 garvinhicking Exp $ switch ($serendipity['lang']) { case 'de': @define('PLUGIN_EVENT_GRAVATAR_NAME', 'Gravatar'); @define('PLUGIN_EVENT_GRAVATAR_DESC', 'Avatare bei Kommentaren anzeigen'); @define('PLUGIN_EVENT_GRAVATAR_TRANSFORM', '<a href="http://www.gravatar.com/">Gravatar</a> unterstützt'); @define('PLUGIN_EVENT_GRAVATAR_DEFAULTAVATAR', 'Standard-Avatar'); @define('PLUGIN_EVENT_GRAVATAR_SIZE', 'Bildgröße'); @define('PLUGIN_EVENT_GRAVATAR_BORDER', 'Rahmenfarbe'); @define('PLUGIN_EVENT_GRAVATAR_RATING', 'Indizierung'); @define('PLUGIN_EVENT_GRAVATAR_RATING_G', 'General (G)'); @define('PLUGIN_EVENT_GRAVATAR_RATING_R', 'Restricted (R)'); @define('PLUGIN_EVENT_GRAVATAR_RATING_PG', 'Parental Guidance (PG)'); @define('PLUGIN_EVENT_GRAVATAR_RATING_X', 'Explicit (X)'); @define('PLUGIN_EVENT_GRAVATAR_DEFAULTAVATAR_DESC', 'URL zu ihrem Standard-Avatar?'); @define('PLUGIN_EVENT_GRAVATAR_SIZE_DESC', 'Maximal dargestellte Größe des Avatar-Bildes in Pixeln'); @define('PLUGIN_EVENT_GRAVATAR_RATING_DESC', 'Kinderschutz :)'); @define('PLUGIN_EVENT_GRAVATAR_BORDER_DESC', 'Farbcode (#FF0000) oder Farbname (rot) für einen 1-Pixel Rahmen um das Avatar-Bild'); break; case 'en': default: @define('PLUGIN_EVENT_GRAVATAR_NAME', 'Gravatar'); @define('PLUGIN_EVENT_GRAVATAR_DESC', 'Show avatars inside comments'); @define('PLUGIN_EVENT_GRAVATAR_TRANSFORM', '<a href="http://www.gravatar.com/">Gravatar</a> supported'); @define('PLUGIN_EVENT_GRAVATAR_DEFAULTAVATAR', 'Default Avatar image'); @define('PLUGIN_EVENT_GRAVATAR_SIZE', 'image size'); @define('PLUGIN_EVENT_GRAVATAR_BORDER', 'border color'); @define('PLUGIN_EVENT_GRAVATAR_RATING', 'Rating'); @define('PLUGIN_EVENT_GRAVATAR_RATING_G', 'General (G)'); @define('PLUGIN_EVENT_GRAVATAR_RATING_R', 'Restricted (R)'); @define('PLUGIN_EVENT_GRAVATAR_RATING_PG', 'Parental Guidance (PG)'); @define('PLUGIN_EVENT_GRAVATAR_RATING_X', 'Explicit (X)'); @define('PLUGIN_EVENT_GRAVATAR_DEFAULTAVATAR_DESC', 'What is the URL to your default avatar image?'); @define('PLUGIN_EVENT_GRAVATAR_SIZE_DESC', 'Maximum size of the avatar picture (in pixels)'); @define('PLUGIN_EVENT_GRAVATAR_RATING_DESC', 'Picture Rating'); @define('PLUGIN_EVENT_GRAVATAR_BORDER_DESC', 'color code (#FF0000) or color name (red) to choose a 1-pixel image border for the avatar picture'); break; } class serendipity_event_gravatar extends serendipity_event { var $title = PLUGIN_EVENT_GRAVATAR_NAME; function introspect(&$propbag) { global $serendipity; $propbag->add('name', PLUGIN_EVENT_GRAVATAR_NAME); $propbag->add('description', PLUGIN_EVENT_GRAVATAR_DESC); $propbag->add('event_hooks', array('frontend_display' => true, 'frontend_comment' => true)); $propbag->add('configuration', array('defaultavatar', 'size', 'rating', 'border')); } function introspect_config_item($name, &$propbag) { switch($name) { case 'defaultavatar': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_EVENT_GRAVATAR_DEFAULTAVATAR); $propbag->add('description', PLUGIN_EVENT_GRAVATAR_DEFAULTAVATAR_DESC); $propbag->add('default', ''); break; case 'size': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_EVENT_GRAVATAR_SIZE); $propbag->add('description', PLUGIN_EVENT_GRAVATAR_SIZE_DESC); $propbag->add('default', '40'); break; case 'border': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_EVENT_GRAVATAR_BORDER); $propbag->add('description', PLUGIN_EVENT_GRAVATAR_BORDER_DESC); $propbag->add('default', ''); break; case 'rating': $propbag->add('type', 'radio'); $propbag->add('name', PLUGIN_EVENT_GRAVATAR_RATING); $propbag->add('description', PLUGIN_EVENT_GRAVATAR_RATING_DESC); $propbag->add('radio', array( 'value' => array('G', 'PG', 'R', 'X'), 'desc' => array(PLUGIN_EVENT_GRAVATAR_RATING_G, PLUGIN_EVENT_GRAVATAR_RATING_PG, PLUGIN_EVENT_GRAVATAR_RATING_R, PLUGIN_EVENT_GRAVATAR_RATING_X) )); $propbag->add('radio_per_row', '1'); $propbag->add('default', 'R'); break; } return true; } function generate_content(&$title) { $title = PLUGIN_EVENT_GRAVATAR_NAME; } function event_hook($event, &$bag, &$eventData) { global $serendipity; $hooks = &$bag->get('event_hooks'); if (isset($hooks[$event])) { switch($event) { case 'frontend_display': if (isset($eventData['comment']) && !empty($eventData['email'])) { $eventData['comment'] = '<img src="http://www.gravatar.com/avatar.php?' . 'default=' . urlencode($this->get_config('defaultavatar', '')) . '&gravatar_id=' . md5($eventData['email']) . '&size=' . $this->get_config('size', '40') . '&border=' . $this->get_config('border', '') . '&rating=' . $this->get_config('rating', 'R') . '" alt="*" title="Gravatar" style="float: right; margin: 2px" />' . $eventData['comment']; } return true; break; case 'frontend_comment': echo '<div class="serendipity_commentDirection">' . PLUGIN_EVENT_GRAVATAR_TRANSFORM . '</div>'; return true; break; default: return false; } } else { return false; } } } /* vim: set sts=4 ts=4 expandtab : */ ?> |
From: Garvin H. <gar...@us...> - 2004-11-20 19:38:11
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_gravatar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8369/serendipity_event_gravatar Log Message: Directory /cvsroot/php-blog/additional_plugins/serendipity_event_gravatar added to the repository |