Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
(179) |
Apr
(56) |
May
(53) |
Jun
(65) |
Jul
(70) |
Aug
(89) |
Sep
(50) |
Oct
(38) |
Nov
(12) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(57) |
Feb
(226) |
Mar
(172) |
Apr
(194) |
May
(120) |
Jun
(162) |
Jul
(297) |
Aug
(156) |
Sep
(312) |
Oct
(180) |
Nov
(358) |
Dec
(362) |
2005 |
Jan
(275) |
Feb
(224) |
Mar
(202) |
Apr
(157) |
May
(133) |
Jun
(115) |
Jul
(211) |
Aug
(257) |
Sep
(135) |
Oct
(116) |
Nov
(106) |
Dec
(81) |
2006 |
Jan
(74) |
Feb
(94) |
Mar
(59) |
Apr
(125) |
May
(50) |
Jun
(71) |
Jul
(45) |
Aug
(80) |
Sep
(3) |
Oct
(44) |
Nov
(50) |
Dec
(38) |
2007 |
Jan
(46) |
Feb
(33) |
Mar
(24) |
Apr
(28) |
May
(19) |
Jun
(37) |
Jul
(66) |
Aug
(73) |
Sep
(87) |
Oct
(33) |
Nov
(39) |
Dec
(37) |
2008 |
Jan
(20) |
Feb
(54) |
Mar
(47) |
Apr
(68) |
May
(10) |
Jun
(13) |
Jul
(13) |
Aug
(25) |
Sep
(11) |
Oct
(22) |
Nov
(22) |
Dec
(34) |
2009 |
Jan
(34) |
Feb
(35) |
Mar
(11) |
Apr
(10) |
May
(15) |
Jun
(18) |
Jul
(28) |
Aug
(22) |
Sep
(9) |
Oct
(12) |
Nov
(6) |
Dec
(32) |
2010 |
Jan
(11) |
Feb
(7) |
Mar
(9) |
Apr
(3) |
May
(16) |
Jun
(1) |
Jul
(2) |
Aug
(25) |
Sep
(9) |
Oct
(8) |
Nov
(4) |
Dec
(8) |
2011 |
Jan
(17) |
Feb
(1) |
Mar
(6) |
Apr
(7) |
May
(5) |
Jun
(2) |
Jul
(12) |
Aug
(3) |
Sep
(18) |
Oct
(3) |
Nov
(2) |
Dec
|
2012 |
Jan
(92) |
Feb
(74) |
Mar
(64) |
Apr
(55) |
May
(44) |
Jun
(91) |
Jul
(35) |
Aug
(42) |
Sep
(32) |
Oct
(56) |
Nov
(42) |
Dec
(81) |
2013 |
Jan
(117) |
Feb
(130) |
Mar
(33) |
Apr
(36) |
May
(155) |
Jun
(241) |
Jul
(113) |
Aug
(70) |
Sep
(50) |
Oct
(55) |
Nov
(34) |
Dec
(36) |
2014 |
Jan
(94) |
Feb
(67) |
Mar
(177) |
Apr
(67) |
May
(147) |
Jun
(137) |
Jul
(58) |
Aug
(56) |
Sep
(62) |
Oct
(35) |
Nov
(118) |
Dec
(53) |
2015 |
Jan
(204) |
Feb
(165) |
Mar
(275) |
Apr
(42) |
May
(58) |
Jun
(91) |
Jul
(81) |
Aug
(62) |
Sep
(23) |
Oct
(63) |
Nov
(29) |
Dec
(110) |
2016 |
Jan
(82) |
Feb
(55) |
Mar
(48) |
Apr
(92) |
May
(77) |
Jun
(41) |
Jul
(27) |
Aug
(41) |
Sep
(101) |
Oct
(84) |
Nov
(12) |
Dec
(18) |
2017 |
Jan
(44) |
Feb
(40) |
Mar
(23) |
Apr
(79) |
May
(27) |
Jun
(12) |
Jul
(20) |
Aug
(14) |
Sep
(3) |
Oct
(9) |
Nov
(4) |
Dec
(9) |
2018 |
Jan
(5) |
Feb
(23) |
Mar
(150) |
Apr
(99) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
1
(1) |
2
(1) |
3
(3) |
4
(2) |
5
|
6
|
7
|
8
|
9
|
10
|
11
|
12
(1) |
13
|
14
(1) |
15
|
16
|
17
|
18
(4) |
19
|
20
|
21
(5) |
22
(9) |
23
(4) |
24
(11) |
25
(7) |
26
(2) |
27
|
28
|
29
|
30
(2) |
31
|
From: <gschlossnagle@us...> - 2003-05-30 15:05:26
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv17897 Modified Files: serendipity_functions.inc.php Log Message: fixed merge conflict Index: serendipity_functions.inc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- serendipity_functions.inc.php 30 May 2003 14:24:21 -0000 1.56 +++ serendipity_functions.inc.php 30 May 2003 15:05:20 -0000 1.57 @@ -283,13 +283,7 @@ /* pre-walk the array to collect them keyed by date */ $bydate = array(); -<<<<<<< serendipity_functions.inc.php - if (!is_array($entries) || $entries[0] == false) { -======= - - if (!is_array($entries)) { ->>>>>>> 1.43 echo "<br />".NO_ENTRIES_TO_PRINT; return; } |
From: <gschlossnagle@us...> - 2003-05-30 14:24:29
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv30055 Modified Files: serendipity_functions.inc.php Log Message: make sure array is not empty Index: serendipity_functions.inc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- serendipity_functions.inc.php 26 May 2003 13:14:14 -0000 1.55 +++ serendipity_functions.inc.php 30 May 2003 14:24:21 -0000 1.56 @@ -51,6 +51,9 @@ } function serendipity_forgetCommentDetails() { global $serendipity; + if(!$serendipity['COOKIE']) { + return; + } foreach ($serendipity['COOKIE'] as $n => $v) { serendipity_deleteCookie($n); } @@ -280,8 +283,13 @@ /* pre-walk the array to collect them keyed by date */ $bydate = array(); +<<<<<<< serendipity_functions.inc.php + + if (!is_array($entries) || $entries[0] == false) { +======= if (!is_array($entries)) { +>>>>>>> 1.43 echo "<br />".NO_ENTRIES_TO_PRINT; return; } |
From: <jhermanns@us...> - 2003-05-26 13:21:57
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv14549 Modified Files: serendipity_functions.inc.php serendipity_xmlrpc.php Log Message: Removed some occurences of archives/e_ and archives/d_ Index: serendipity_functions.inc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- serendipity_functions.inc.php 26 May 2003 00:18:56 -0000 1.54 +++ serendipity_functions.inc.php 26 May 2003 13:14:14 -0000 1.55 @@ -944,7 +944,7 @@ array_shift($matches); // Make trackback URL - $url = "{$serendipity['baseURL']}archives/e_{$id}.html"; + $url = "{$serendipity['baseURL']}archives/{$id}_".serendipity_makeFilename($title).".html"; // Add URL references $locations = $matches[0]; Index: serendipity_xmlrpc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_xmlrpc.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- serendipity_xmlrpc.php 24 May 2003 14:10:40 -0000 1.3 +++ serendipity_xmlrpc.php 26 May 2003 13:14:14 -0000 1.4 @@ -255,8 +255,8 @@ 'mt_allow_pings' => new XML_RPC_Value(1, 'boolean'), 'mt_convert_breaks' => new XML_RPC_Value(0, 'boolean'), 'title' => new XML_RPC_Value($entry['title'],'string'), - 'permalink' => new XML_RPC_Value($serendipity['baseURL']."/archives/e_$postid.html", 'string'), - 'link' => new XML_RPC_Value($serendipity['baseURL']."/archives/e_$postid.html", 'string')); + 'permalink' => new XML_RPC_Value($serendipity['baseURL']."/archives/{$postid}_.html", 'string'), + 'link' => new XML_RPC_Value($serendipity['baseURL']."/archives/{$postid}_.html", 'string')); $entry = new XML_RPC_Value($tmp, 'struct'); return new XML_RPC_Response($entry); } |
From: <tomsommer@us...> - 2003-05-26 00:18:59
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv14361 Modified Files: serendipity_functions.inc.php serendipity_lang_en.inc.php Log Message: We now send diffirent emails if the comment is a trackback. We also strip HTML tags in the mails And we changed the signature a bit Index: serendipity_functions.inc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- serendipity_functions.inc.php 25 May 2003 17:20:04 -0000 1.53 +++ serendipity_functions.inc.php 26 May 2003 00:18:56 -0000 1.54 @@ -516,8 +516,7 @@ AND e.authorid = a.authorid"; $row = serendipity_db_query($query, true); if($row['mail_comments']) { - serendipity_sendComment($row['email'], $name, $email, $url, $id, - $row['title'], $comments); + serendipity_sendComment($row['email'], $name, $email, $url, $id, $row['title'], $comments, $type); } serendipity_purgeEntry($id, $t); } @@ -536,25 +535,45 @@ serendipity_db_query("UPDATE ".$serendipity["dbPrefix"]." SET comments=comments+1 WHERE id LIKE $id"); } -function serendipity_sendComment($to, $fromName, $fromEmail, $fromUrl, $id, $title, $comment) { +function serendipity_sendComment($to, $fromName, $fromEmail, $fromUrl, $id, $title, $comment, $type='NORMAL') { global $serendipity; - $text = -sprintf(A_NEW_COMMENT_BLAHBLAH, $serendipity[blogTitle],$id)." + + if ($type == 'TRACKBACK') { -IP Address: $_SERVER[REMOTE_ADDR] -".NAME.": $fromName -".EMAIL.": $fromEmail -URL: $fromUrl +/* If the comment is a trackback */ + $subject = "[$serendipity[blogTitle]] New trackback made to $title"; + $text = sprintf(A_NEW_TRACKBACK_BLAHBLAH, $title)." -".COMMENTS.": +Weblog ".NAME.": ". stripslashes($fromName) ." +Link to remote-entry: $fromUrl -$comment +Excerpt: +". strip_tags($comment); + + + } else { +/* If the comment is a.. comment */ + $subject = "[$serendipity[blogTitle]] New comment posted to $title"; + $text = sprintf(A_NEW_COMMENT_BLAHBLAH, $serendipity[blogTitle],$title)." + +User IP Address: $_SERVER[REMOTE_ADDR] +User ".NAME.": $fromName +User ".EMAIL.": $fromEmail +User URL: $fromUrl + +".COMMENTS.": +". strip_tags($comment); + + } + +$signature = " -- -Powered by serendipity. -My blog runs on PHP. Yours can too. -http://php-blog.sf.net/ to find out how."; -mail($to, "[$serendipity[blogTitle]] New comment posted to $title", $text, +$serendipity[blogTitle] is powered by Serendipity. +The best PHP blog around, you can use it too. +Check out http://php-blog.sf.net/ to find out how."; + +mail($to, $subject, $text.$signature, "From: $fromName <$fromEmail>\r\n"); } Index: serendipity_lang_en.inc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_lang_en.inc.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- serendipity_lang_en.inc.php 22 May 2003 23:01:00 -0000 1.11 +++ serendipity_lang_en.inc.php 26 May 2003 00:18:56 -0000 1.12 @@ -82,7 +82,8 @@ define("POSTED_BY", "Posted by"); define("TRACKBACK_FROM", "Trackback from"); define("ON", "on"); -define("A_NEW_COMMENT_BLAHBLAH", "A new comment has been posted on your blog %s, on entry #%s."); +define("A_NEW_COMMENT_BLAHBLAH", "A new comment has been posted on your blog \"%s\", in the entry entitled \"%s\"."); +define("A_NEW_TRACKBACK_BLAHBLAH", "A new trackback has been made to your blog-entry entitled \"%s\"."); define("NO_CATEGORY", "No Category"); define("ENTRY_BODY", "Entry Body"); define("EXTENDED_BODY", "Extended Body"); |
From: <jhermanns@us...> - 2003-05-25 20:07:58
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv23222 Modified Files: serendipity_entries.php Log Message: Sessioning for the admin-interface wasn't SUCH a bad idea ;) Index: serendipity_entries.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_entries.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- serendipity_entries.php 25 May 2003 19:49:21 -0000 1.5 +++ serendipity_entries.php 25 May 2003 20:07:55 -0000 1.6 @@ -1,4 +1,5 @@ <?php +session_start(); if (file_exists("./serendipity_config_local.inc.php")) { include("serendipity_config.inc.php"); } else { |
From: <jhermanns@us...> - 2003-05-25 19:55:01
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv18118 Modified Files: index.php Log Message: When viewing a single entry, page <title> becomes entry's title. Index: index.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/index.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- index.php 25 May 2003 17:28:57 -0000 1.10 +++ index.php 25 May 2003 19:54:57 -0000 1.11 @@ -46,7 +46,7 @@ 'WHERE id=' . serendipity_db_escape_string($id), true); $title = $title[0]; - $serendipity['blogSubTitle'] = htmlspecialchars($title); + $serendipity['blogTitle'] = htmlspecialchars($title); ob_start(); include_once("serendipity_genpage.inc.php"); |
From: <jhermanns@us...> - 2003-05-25 19:49:24
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv15556 Modified Files: serendipity_entries.php serendipity_entries_overview.inc.php Log Message: Removed unnessecary session_start()s that prevent search engines from properly indexing everything... Index: serendipity_entries.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_entries.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- serendipity_entries.php 5 Apr 2003 23:46:55 -0000 1.4 +++ serendipity_entries.php 25 May 2003 19:49:21 -0000 1.5 @@ -1,5 +1,4 @@ <?php -session_start(); if (file_exists("./serendipity_config_local.inc.php")) { include("serendipity_config.inc.php"); } else { Index: serendipity_entries_overview.inc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_entries_overview.inc.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- serendipity_entries_overview.inc.php 30 Mar 2003 15:50:05 -0000 1.1 +++ serendipity_entries_overview.inc.php 25 May 2003 19:49:21 -0000 1.2 @@ -10,6 +10,5 @@ ########################################################################## if (IN_serendipity !== true) die ("Don't hack!"); -session_start(); ?> Welcome back, <?= $_SESSION['serendipityUser'] ?>. |
From: <jhermanns@us...> - 2003-05-25 17:29:00
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv26975 Modified Files: index.php Log Message: Allow archives/id_.html. Index: index.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/index.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- index.php 25 May 2003 16:36:33 -0000 1.9 +++ index.php 25 May 2003 17:28:57 -0000 1.10 @@ -33,7 +33,7 @@ echo $data; } -else if (preg_match('@/(\d+)_\w+\.html@...', $uri, $matches)) { +else if (preg_match('@/(\d+)_\w*\.html@...', $uri, $matches)) { $id = $matches[1]; serendipity_track_referrer($id); |
From: <jhermanns@us...> - 2003-05-25 17:20:07
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv24167 Modified Files: serendipity_functions.inc.php Log Message: Rewrite Umlauts, too. Index: serendipity_functions.inc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- serendipity_functions.inc.php 25 May 2003 16:36:33 -0000 1.52 +++ serendipity_functions.inc.php 25 May 2003 17:20:04 -0000 1.53 @@ -261,7 +261,15 @@ * Creates a filename that consists of [a-zA-z0-9_] (with some custom adjustments (space -> _, ä -> ae and such) **/ function serendipity_makeFilename($str) { - return preg_replace('#[^\w]#', '', str_replace(" ", "_" , $str)); + $str = str_replace("Ä", "Ae", $str); + $str = str_replace("ä", "ae", $str); + $str = str_replace("Ö", "Oe", $str); + $str = str_replace("ö", "oe", $str); + $str = str_replace("Ü", "Ue", $str); + $str = str_replace("ü", "ue", $str); + $str = str_replace("ß", "sz", $str); + $str = str_replace(" ", "_" , $str); + return preg_replace('#[^\w]#', '', $str); } /** |
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv5942 Modified Files: index.php search.php serendipity_admin.php serendipity_config.inc.php serendipity_functions.inc.php serendipity_sidebar_items.php Log Message: +++ATTENTION+++ This one's a troublemaker for those who already use serendipity. The link-rewriting has been changed. An entry is now accessed like this: /archives/id_title_of_entry.html (used to be /archives/e_id.html) Timeranges are now accessed like this: /archives/200203.html (used to be /archives/d_200203.html) This is more reader friendly and the search engines will be able to find pages better (title is contained in filename). Of course, all your "old" link to serendipity blogs are now broken. Since I don't want to have two ways of accessing an entry (old way AND new way), you'll have to go through your entries and fix the links. Since I'm the only one with 200+ entries, I'm probably the one who'll come up with a script that goes through your db and fixes the links. Eventually. Also, the pregeneration is now broken, but can be easily fixed (look for "fixme", there's an unlink($filename."*.html") that's supposed to delete a file - since this function doesnt (need to) know the title of the entry, it must delete id_*.html instead of id_title_of_entry.html). Easy fiX. Does the rest work for you? Index: index.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/index.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- index.php 3 May 2003 13:28:19 -0000 1.8 +++ index.php 25 May 2003 16:36:33 -0000 1.9 @@ -1,18 +1,16 @@ <?php // We need to set this to return a 200 since we use .htaccess ErrorDocument -// rules to handle archives. +// rules to handle archives. header("HTTP/1.0 200\r\n"); -session_start(); include_once("serendipity_config.inc.php"); $track_referer = true; $uri = $_SERVER['REQUEST_URI']; -if (preg_match('@/archives/@', $uri)) { - if (preg_match('@/(d_(\d+)\.html)@', $uri, $matches)) { - $range = $matches[2]; +if (preg_match('@/archives/(\d+)\.html@', $uri, $matches)) { + $range = $matches[1]; $_GET['serendipity']['action'] = "read"; $_GET['serendipity']['range'] = $range; - + if (strlen($range) == 6) { $date = date("m/Y", mktime(0,0,0, substr($range, 4, 6), 2, substr($range, 0, 4))); @@ -31,36 +29,37 @@ fwrite($fp, $data); fclose($fp); } - + echo $data; - } else if (preg_match('@/(e_(\d+)\.html)@', $uri, $matches)) { - $id = $matches[2]; - - serendipity_track_referrer($id); - $track_referer = false; +} - $_GET['serendipity']['action'] = 'read'; - $_GET['serendipity']['id'] = $id; +else if (preg_match('@/(\d+)_\w+\.html@...', $uri, $matches)) { + $id = $matches[1]; - $title = serendipity_db_query("SELECT title FROM {$serendipity['dbPrefix']}entries " . + serendipity_track_referrer($id); + $track_referer = false; + + $_GET['serendipity']['action'] = 'read'; + $_GET['serendipity']['id'] = $id; + + $title = serendipity_db_query("SELECT title FROM {$serendipity['dbPrefix']}entries " . 'WHERE id=' . serendipity_db_escape_string($id), true); - $title = $title[0]; - - $serendipity['blogSubTitle'] = htmlspecialchars($title); + $title = $title[0]; - ob_start(); - include_once("serendipity_genpage.inc.php"); - $data = ob_get_contents(); - ob_end_clean(); + $serendipity['blogSubTitle'] = htmlspecialchars($title); - if ($serendipity['pregenerate']) { - $fp = fopen("./archives/{$matches[1]}", "w"); - fwrite($fp, $data); - fclose($fp); - } + ob_start(); + include_once("serendipity_genpage.inc.php"); + $data = ob_get_contents(); + ob_end_clean(); + + if ($serendipity['pregenerate']) { + $fp = fopen("./archives/{$matches[1]}", "w"); + fwrite($fp, $data); + fclose($fp); + } + print $data; - print $data; - } } else if (preg_match('@/feeds/@', $uri)) { if (preg_match('@/index.(rss|rdf|rss2)$@', $uri, $matches)) { switch ($matches[1]) { @@ -84,7 +83,7 @@ fwrite($fp, $data); fclose($fp); } - + print $data; } } else if (preg_match('@/admin$@', $uri)) { Index: search.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/search.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- search.php 29 Mar 2003 16:44:46 -0000 1.2 +++ search.php 25 May 2003 16:36:33 -0000 1.3 @@ -1,5 +1,5 @@ <?php -session_start(); + include_once("serendipity_config.inc.php"); include_once("serendipity_genpage.inc.php"); ?> Index: serendipity_admin.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_admin.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- serendipity_admin.php 21 May 2003 15:49:50 -0000 1.8 +++ serendipity_admin.php 25 May 2003 16:36:33 -0000 1.9 @@ -1,4 +1,5 @@ <?php +ini_set("session.use_trans_sid",1); session_start(); if (file_exists("./serendipity_config_local.inc.php")) { include("serendipity_config.inc.php"); Index: serendipity_config.inc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_config.inc.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- serendipity_config.inc.php 24 May 2003 01:51:52 -0000 1.10 +++ serendipity_config.inc.php 25 May 2003 16:36:33 -0000 1.11 @@ -1,7 +1,7 @@ <?php define('IN_serendipity', true); include_once('compat.php'); - +ini_set("session.use_trans_sid",0); $serendipity['production'] = 1; if (!isset($serendipity['serendipityPath'])) { $serendipity['serendipityPath'] = './'; Index: serendipity_functions.inc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- serendipity_functions.inc.php 24 May 2003 22:04:22 -0000 1.51 +++ serendipity_functions.inc.php 25 May 2003 16:36:33 -0000 1.52 @@ -110,7 +110,7 @@ <TD COLSPAN='5' ALIGN='center' VALIGN='bottom' CLASS='serendipity_calendarHeader'><B><nobr> <?php if ($serendipity["rewrite"]==true) { - $link = $serendipity["serendipityHTTPPath"]."archives/d_".$year.sprintf("%02d",$month).".html"; + $link = $serendipity["serendipityHTTPPath"]."archives/".$year.sprintf("%02d",$month).".html"; } else { $link = "fixme"; @@ -152,7 +152,7 @@ // Print day if ($serendipity["rewrite"]==true) - $link = $serendipity["serendipityHTTPPath"]."archives/d_".date("Ymd", mktime(0,0,0, $month, $currDay, $year)).".html"; + $link = $serendipity["serendipityHTTPPath"]."archives/".date("Ymd", mktime(0,0,0, $month, $currDay, $year)).".html"; else $link = "fixme!"; if (date("m") == $month && date("Y") == $year && $currDay == date("j")) echo "<I>"; @@ -257,6 +257,12 @@ return serendipity_db_query($querystring); } +/** +* Creates a filename that consists of [a-zA-z0-9_] (with some custom adjustments (space -> _, ä -> ae and such) +**/ +function serendipity_makeFilename($str) { + return preg_replace('#[^\w]#', '', str_replace(" ", "_" , $str)); +} /** * Prints the entries you fetched with serendipity_fetchEntries/searchEntries in HTML. @@ -296,16 +302,16 @@ if ($entry['exflag'] && !$extended) { echo "<br><div class='serendipity_time'><a href=\"" . $serendipity['serendipityHTTPPath'] - . "archives/e_" + . "archives/" . $entry['id'] - . ".html#extended\">View Extended Entry</a></div><br>"; + . "_".serendipity_makeFilename($entry['title']).".html#extended\">View Extended Entry</a></div><br>"; } echo "<div class='serendipity_time'><br><a href=\"" . $serendipity['serendipityHTTPPath'] - . "archives/e_" + . "archives/" . $entry['id'] - . ".html\">".POSTED_BY." " + . "_".serendipity_makeFilename($entry['title']).".html\">".POSTED_BY." " . htmlentities($entry['username']) . ($entry['category_name']?(" in ${entry['category_name']}"):"") ." at " @@ -335,7 +341,7 @@ echo " rdf:about=\"{$serendipity['baseURL']}feeds/ei_{$entry['id']}.rdf\"\n"; echo " trackback:ping=\"{$serendipity['baseURL']}comment.php?type=trackback&entry_id={$entry['id']}\"\n"; echo " dc:title=\"{$entry['title']}\"\n"; - echo " dc:identifier=\"{$serendipity['baseURL']}archives/e_{$entry['id']}.html\" />\n"; + echo " dc:identifier=\"{$serendipity['baseURL']}archives/{$entry['id']}_".serendipity_makeFilename($entry['title']).".html\" />\n"; echo "</rdf:RDF>\n"; echo "-->\n"; @@ -562,7 +568,7 @@ foreach ($entries as $entry) { echo "<item>\n"; echo "<title>{$entry['title']}</title>\n"; - echo "<link>{$serendipity['baseURL']}archives/e_{$entry['id']}.html</link>\n"; + echo "<link>{$serendipity['baseURL']}archives/{$entry['id']}_".serendipity_makeFilename($entry['title']).".html</link>\n"; if ($version == '2.0') { // extract author information $query = "select email from {$serendipity['dbPrefix']}authors where username='{$entry['username']}'"; @@ -572,7 +578,7 @@ echo utf8_encode(htmlspecialchars(serendipity_emoticate(serendipity_markup_text($entry['body'])))); echo "\n</content:encoded>\n"; echo '<pubDate>' . date("r", $entry['timestamp']) . "</pubDate>\n"; - echo "<guid>{$serendipity['baseURL']}e_{$entry['id']}.html</guid>\n"; + echo "<guid>{$serendipity['baseURL']}archives/{$entry['id']}_".serendipity_makeFilename($entry['title']).".html</guid>\n"; } else { echo "<description>\n" . utf8_encode(htmlspecialchars($entry['body'])) . "\n</description>\n"; } @@ -681,10 +687,11 @@ $dated = date("Ymd", $timestamp); $datem = date("Ym", $timestamp); - @unlink("{$serendipity['serendipityPath']}/archives/d_{$dated}.html"); - @unlink("{$serendipity['serendipityPath']}/archives/d_{$datem}.html"); + @unlink("{$serendipity['serendipityPath']}/archives/{$dated}.html"); + @unlink("{$serendipity['serendipityPath']}/archives/{$datem}.html"); } - @unlink("{$serendipity['serendipityPath']}/archives/e_{$id}.html"); + // Fixme (the _* part) ! + @unlink("{$serendipity['serendipityPath']}/archives/{$id}_*.html"); @unlink("{$serendipity['serendipityPath']}/feeds/index.rss"); @unlink("{$serendipity['serendipityPath']}/feeds/index.rss2"); @unlink("{$serendipity['serendipityPath']}/index.html"); @@ -1727,7 +1734,7 @@ for($x=1; $x<13; $x++) { $entries = serendipity_postAmount($currYear, $x); if ($entries>0) { - $a = "<a href='{$serendipity['serendipityHTTPPath']}archives/d_$currYear".sprintf("%02s",$x).".html'>"; + $a = "<a href='{$serendipity['serendipityHTTPPath']}archives/$currYear".sprintf("%02s",$x).".html'>"; $b = "($entries entries)</a>"; } else { Index: serendipity_sidebar_items.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_sidebar_items.php,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- serendipity_sidebar_items.php 24 May 2003 10:23:06 -0000 1.12 +++ serendipity_sidebar_items.php 25 May 2003 16:36:33 -0000 1.13 @@ -64,7 +64,7 @@ for($x=0; $x<3; $x++) { $ts-=1; if ($serendipity["rewrite"] === true) - $link = $serendipity["serendipityHTTPPath"]."archives/d_".date("Ym", $ts).".html"; + $link = $serendipity["serendipityHTTPPath"]."archives/".date("Ym", $ts).".html"; else $link = "fixme"; echo "<a href='$link'>".$serendipity["months"][date("n", $ts)]." ".date("Y", $ts)."</a><br />"; |
From: <tomsommer@us...> - 2003-05-25 01:55:38
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv17647 Modified Files: serendipity_admin_images.inc.php Log Message: w00ps... need to use GET Index: serendipity_admin_images.inc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_admin_images.inc.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- serendipity_admin_images.inc.php 22 May 2003 23:19:33 -0000 1.5 +++ serendipity_admin_images.inc.php 25 May 2003 01:55:35 -0000 1.6 @@ -87,32 +87,33 @@ break; case "DoDelete": - $fThumb = serendipity_parseFileName($serendipity["fname"]); + $file = $serendipity['GET']['fname']; + $fThumb = serendipity_parseFileName($file); $fThumb = $fThumb[0].".".$serendipity["thumbSuffix"].".".$fThumb[1]; - if ( file_exists($serendipity["serendipityPath"].$serendipity["uploadPath"].$serendipity["fname"]) ) { - if ( @unlink($serendipity["serendipityPath"].$serendipity["uploadPath"].$serendipity["fname"]) ) { - echo "Deleted the image entitled <b>". $serendipity['fname'] ."</b>"; + if ( file_exists($serendipity["serendipityPath"].$serendipity["uploadPath"].$file) ) { + if ( @unlink($serendipity["serendipityPath"].$serendipity["uploadPath"].$file) ) { + echo "Deleted the image entitled <b>". $file ."</b>"; } else { - echo "Unable to delete <b>". $serendipity['fname'] ."</b>"; + echo "Unable to delete <b>". $file ."</b>"; } if ( @unlink($serendipity["serendipityPath"].$serendipity["uploadPath"].$fThumb) ) { echo "<br>Deleted the thumbnail entitled <b>". $fThumb ."</b>"; } } else { - echo "I was unable to locate the file entitled <b>". $serendipity['fname'] ."</b>, maybe it has already been deleted?"; + echo "I was unable to locate the file entitled <b>". $file ."</b>, maybe it has already been deleted?"; } break; case "delete": - $file = $serendipity['fname']; + $file = $serendipity['GET']['fname']; echo "You are about to delete <b>$file</b><br>"; echo "If you are using this file in some of your entries, it will cause dead images<br>"; echo "Are you sure you wish to proceed?<p>"; - $newLoc = $serendipity['serendipityHTTPPath'] ."serendipity_entries.php?serendipity[adminModule]=images&serendipity[adminAction]=DoDelete&serendipity[fname]=". $serendipity['fname']; + $newLoc = $serendipity['serendipityHTTPPath'] ."serendipity_entries.php?serendipity[adminModule]=images&serendipity[adminAction]=DoDelete&serendipity[fname]=". $file; echo "<input type='button' value='Delete the image' onClick='location.href=\"$newLoc\"'>"; echo str_repeat(" ", 10); |
From: <tomsommer@us...> - 2003-05-24 22:04:25
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv26233 Modified Files: serendipity_functions.inc.php serendipity_editor.js Log Message: This is the new non-WYSIWYG editor. Since it is only working in Mozilla and IE, we have a small regular-based condition to only show it, if the UA contains "Mozilla" or "IE", If you know of any other browsers which can handle this new non-WYSIWYG editor, let me know. It has much better handling of positioning of inserted text and can also work with selections etc. You can now select some text and wrap it with links or apply text-formating to the selection. Please test it as much as you can, and report back. The old non-WYSIWYG editor is still active to anyone who does not have Mozilla or IE Index: serendipity_functions.inc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- serendipity_functions.inc.php 24 May 2003 20:35:08 -0000 1.50 +++ serendipity_functions.inc.php 24 May 2003 22:04:22 -0000 1.51 @@ -485,7 +485,7 @@ $name = serendipity_db_escape_string($commentInfo['name']); $url = serendipity_db_escape_string($commentInfo['url']); $email = serendipity_db_escape_string($commentInfo['email']); - + $t = time(); $query = "INSERT INTO {$serendipity['dbPrefix']}comments (entry_id, author, email, url, body, type, timestamp, title)"; $query .= " VALUES ('$id', '$name', '$email', '$url', '$commentsFixed', '$type', '$t', '$title')"; @@ -1207,6 +1207,7 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = array(), $errMsg = "") { global $serendipity; + $serendipity['EditorBrowsers'] = "(IE|Mozilla)"; $cats = serendipity_fetchCategories(); $cat_list = "<select name=\"serendipity[categoryid]\"><option value=\"0\">[".NO_CATEGORY."]</option>\n"; @@ -1236,42 +1237,43 @@ echo '<input type="hidden" name="serendipity[id]" value="'.$entry["id"]."\">\n"; echo '<input type="hidden" name="serendipity[timestamp]" value="'.$entry["timestamp"]."\">\n"; ?> - <tr> - <td align="left"> - <input type="text" name="serendipity[title]" value="<?=$entry["title"]?>" size=30> + <tr> + <td align="left"> + <input type="text" name="serendipity[title]" value="<?=$entry["title"]?>" size="30"> + <input type="submit" value="- <?=SAVE?> -" style="font-weight: bold;"> </td> <td><?=Category?> <?= $cat_list ?></td> - </tr> - <tr> + </tr> + <tr> <td colspan="2"><?=ENTRY_BODY?></td> - </tr> - <tr> - <td colspan="2"> + </tr> + <tr> + <td colspan="2"> <textarea name="serendipity[body]" id="serendipity[body]" cols=80 rows=20><?=$entry["body"]?></textarea> </td> - </tr> - <tr> + </tr> + <tr> <td colspan="2"><?=EXTENDED_BODY?></td> - </tr> - <tr> - <td colspan="2"> + </tr> + <tr> + <td colspan="2"> <textarea name="serendipity[extended]" id="serendipity[extended]" cols=80 rows=20><?=htmlentities($entry["extended"])?></textarea> </td> - </tr> - <tr> + </tr> + <tr> <td colspan="2" align="right"> - <input type="submit" value="save"> + <input type="submit" value="- <?=SAVE?> -" style="font-weight: bold;"> </td> - </tr> - </form> + </tr> + </form> </table> - <?php +<?php serendipity_emit_htmlarea_code("document.forms['serendipityEntry']['serendipity[body]']"); serendipity_emit_htmlarea_code("document.forms['serendipityEntry']['serendipity[extended]']"); } else { - ?> +?> <script language="JavaScript" src="serendipity_editor.js"></script> <font color="#ff0000"><?=$errMsg?></font> <table class='serendipityEntryEdit'> @@ -1283,39 +1285,59 @@ echo '<input type="hidden" name="serendipity[id]" value="'.$entry["id"]."\">\n"; echo '<input type="hidden" name="serendipity[timestamp]" value="'.$entry["timestamp"]."\">\n"; ?> - <tr> - <td align="left" valign="top"> - <input type="text" name="serendipity[title]" value="<?=htmlentities($entry["title"])?>" size=30> - </td> - <td nowrap="nowrap" align="right" valign="top"> - <?=CATEGORY?> <?= $cat_list ?></td><tr><td align="left"> - <input type="button" value=" B " onClick="serendipity_insBasic(document.forms['serendipityEntry']['serendipity[body]'], 'b')"> - <input type="button" value=" U " onClick="serendipity_insBasic(document.forms['serendipityEntry']['serendipity[body]'], 'u')"> - <input type="button" value=" I " onClick="serendipity_insBasic(document.forms['serendipityEntry']['serendipity[body]'], 'i')"> - <input type="button" value="<img>" onClick="serendipity_insImage(document.forms['serendipityEntry']['serendipity[body]'])"> - <input type="button" value="<?=IMAGE?>" onClick="window.open('serendipity_admin_image_selector.php', 'ImageSel', 'width=800,height=600,toolbar=no');"> - <input type="button" value="Link" onClick="serendipity_insLink(document.forms['serendipityEntry']['serendipity[body]'])"> - </td><td align="right"> - <input type="submit" value="<?=SAVE?>"> + <tr> + <td align="left" colspan="2"> + <input type="text" name="serendipity[title]" value="<?=htmlentities($entry["title"])?>" size="80"> + <input type="submit" value="- <?=SAVE?> -" style="font-weight: bold;"> </td> - </tr> - <tr> - <td colspan="2"><?=ENTRY_BODY?></td> - </tr> - <tr> - <td colspan="2"> + </tr> + <tr> + <td> + <?=CATEGORY?> <?= $cat_list ?> + </td> + <td align="right"> + <?php + // Since the user has WYSIWYG editor disabled, we want to check if we should use the "better" non-WYSIWYG editor + if ( eregi($serendipity['EditorBrowsers'], $_SERVER['HTTP_USER_AGENT']) ) { + ?> + <input type="button" name="insI" value="I" accesskey="i" style="font-style: italic" onClick="wrapSelection(document.forms['serendipityEntry']['serendipity[body]'],'<i>','</i>')"> + <input type="button" name="insB" value="B" accesskey="i" style="font-weight: bold" onClick="wrapSelection(document.forms['serendipityEntry']['serendipity[body]'],'<b>','</b>')"> + <input type="button" name="insU" value="U" accesskey="u" style="text-decoration: underline;" onClick="wrapSelection(document.forms['serendipityEntry']['serendipity[body]'],'<u>','</u>')"> + <input type="button" name="insJ" value="img" accesskey="j" onClick="wrapInsImage(document.forms['serendipityEntry']['serendipity[body]'])"> + <input type="button" name="insImage" value="<?= IMAGE ?>" style="" onClick="window.open('serendipity_admin_image_selector.php', 'ImageSel', 'width=800, height=600, toolbar=no');"> + <input type="button" name="insU" value="URL" accesskey="l" style="color: blue; text-decoration: underline;" onClick="wrapSelectionWithLink(document.forms['serendipityEntry']['serendipity[body]'])"> + <? } else { ?> + <input type="button" value=" B " onClick="serendipity_insBasic(document.forms['serendipityEntry']['serendipity[body]'], 'b')"> + <input type="button" value=" U " onClick="serendipity_insBasic(document.forms['serendipityEntry']['serendipity[body]'], 'u')"> + <input type="button" value=" I " onClick="serendipity_insBasic(document.forms['serendipityEntry']['serendipity[body]'], 'i')"> + <input type="button" value="<img>" onClick="serendipity_insImage(document.forms['serendipityEntry']['serendipity[body]'])"> + <input type="button" value="<?=IMAGE?>" onClick="window.open('serendipity_admin_image_selector.php', 'ImageSel', 'width=800,height=600,toolbar=no');"> + <input type="button" value="Link" onClick="serendipity_insLink(document.forms['serendipityEntry']['serendipity[body]'])"> + <? } ?> + </td> + </tr> + <tr> + <td colspan="2"><?=ENTRY_BODY?></td> + </tr> + <tr> + <td colspan="2"> <textarea name="serendipity[body]" cols=80 rows=20><?=htmlentities($entry["body"])?></textarea> </td> - </tr> - <tr> + </tr> + <tr> <td colspan="2"><?=EXTENDED_BODY?></td> - </tr> - <tr> - <td colspan="2"> + </tr> + <tr> + <td colspan="2"> <textarea name="serendipity[extended]" cols=80 rows=20><?=htmlentities($entry["extended"])?></textarea> </td> - </tr> - </form> + </tr> + <tr> + <td colspan="2" align="right"> + <input type="submit" value="- <?=SAVE?> -" style="font-weight: bold;"> + </td> + </tr> + </form> </table> <?php } Index: serendipity_editor.js =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_editor.js,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- serendipity_editor.js 28 Mar 2003 20:05:24 -0000 1.1.1.1 +++ serendipity_editor.js 24 May 2003 22:04:22 -0000 1.2 @@ -1,4 +1,88 @@ <!-- // Hide from older browsers + +/* + Written by chris wetherell + http://www.massless.org + chris [THE AT SIGN] massless.org + + warning: it only works for IE4+/Win and Moz1.1+ + feel free to take it for your site + if there are any problems, let chris know. +*/ + +var thisForm; + +function getMozSelection(txtarea) { + var selLength = txtarea.textLength; + var selStart = txtarea.selectionStart; + var selEnd = txtarea.selectionEnd; + if (selEnd==1 || selEnd==2) selEnd=selLength; + return (txtarea.value).substring(selStart, selEnd); +} + +function mozWrap(txtarea, lft, rgt) { + var selLength = txtarea.textLength; + var selStart = txtarea.selectionStart; + var selEnd = txtarea.selectionEnd; + if (selEnd==1 || selEnd==2) selEnd=selLength; + var s1 = (txtarea.value).substring(0,selStart); + var s2 = (txtarea.value).substring(selStart, selEnd) + var s3 = (txtarea.value).substring(selEnd, selLength); + txtarea.value = s1 + lft + s2 + rgt + s3; +} + +function IEWrap(lft, rgt) { + strSelection = document.selection.createRange().text; + if (strSelection!="") { + document.selection.createRange().text = lft + strSelection + rgt; + } +} + +function wrapSelection(txtarea, lft, rgt) { + if (document.all) {IEWrap(lft, rgt);} + else if (document.getElementById) {mozWrap(txtarea, lft, rgt);} +} + +function wrapSelectionWithLink(txtarea) { + var my_link = prompt("Enter URL:","http://";); + if (getMozSelection(txtarea) == "") { + var my_desc = prompt("Enter Description"); + } + if (my_link != null) { + lft = "<a href=\"" + my_link + "\">"; + if (my_desc != null && my_desc != "") { + rgt = my_desc +"</a>"; + } else { + rgt = "</a>"; + } + wrapSelection(txtarea, lft, rgt); + } + return; +} +/* end chris w. script */ + +function mozInsert(txtarea, str) { + var selLength = txtarea.textLength; + var selStart = txtarea.selectionStart; + var selEnd = txtarea.selectionEnd; + if (selEnd==1 || selEnd==2) selEnd=selLength; + var s1 = (txtarea.value).substring(0,selStart); + var s2 = (txtarea.value).substring(selStart, selEnd) + var s3 = (txtarea.value).substring(selEnd, selLength); + txtarea.value = s1 + str + s2 + s3; +} + +function wrapInsImage (area) +{ + var loc = prompt('Enter the Image Location: '); + if (!loc) { + return; + } + mozInsert(area,'<img src="'+ loc + '" />'); +} + +/* end Better-Editor functions */ + function serendipity_insImage (area) { var loc = prompt('Enter the Image Location: '); @@ -11,6 +95,12 @@ area.focus(); } +function serendipity_insBasic (area, tag) +{ + area.value = area.value + "<" + tag + "></" + tag + ">"; + area.focus(); +} + function serendipity_insLink (area) { var loc = prompt('Enter Location: '); @@ -25,12 +115,6 @@ area.focus(); } -function serendipity_insBasic (area, tag) -{ - area.value = area.value + "<" + tag + "></" + tag + ">"; - area.focus(); -} - function serendipity_imageSelector_addToBody (str) { document.forms['serendipityEntry']['serendipity[body]'].value += str; @@ -39,6 +123,7 @@ function serendipity_imageSelector_done() { + var insert = ''; var img = ''; var src = ''; |
From: <tomsommer@us...> - 2003-05-24 21:01:47
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv30115 Modified Files: serendipity_functions.inc.php Log Message: We now check if a trackback is valid before going further, this is to prevent user-exploitation Index: serendipity_functions.inc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- serendipity_functions.inc.php 24 May 2003 19:16:15 -0000 1.49 +++ serendipity_functions.inc.php 24 May 2003 20:35:08 -0000 1.50 @@ -485,7 +485,7 @@ $name = serendipity_db_escape_string($commentInfo['name']); $url = serendipity_db_escape_string($commentInfo['url']); $email = serendipity_db_escape_string($commentInfo['email']); - + $t = time(); $query = "INSERT INTO {$serendipity['dbPrefix']}comments (entry_id, author, email, url, body, type, timestamp, title)"; $query .= " VALUES ('$id', '$name', '$email', '$url', '$commentsFixed', '$type', '$t', '$title')"; @@ -810,7 +810,10 @@ function add_trackback ($id, $title, $url, $name, $excerpt) { global $serendipity; - + // We can't accept a trackback if we don't get any URl, basic rule... + if ( empty($url) ) { + return 0; + } $comment['title'] = $title; $comment['url'] = $url; $comment['name'] = $name; |
From: <jhermanns@us...> - 2003-05-24 19:17:00
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv3859 Modified Files: comment.php serendipity_functions.inc.php Log Message: Beautified comments/trackback display and the new/edit entry form. Index: comment.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/comment.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- comment.php 24 May 2003 14:35:24 -0000 1.7 +++ comment.php 24 May 2003 19:16:15 -0000 1.8 @@ -6,13 +6,13 @@ serendipity_deleteComment($serendipity['GET']['delete'],$serendipity['GET']['entry'],$serendipity['GET']['type']); } -/* It's time to finally check if we need to remember the entered information, +/* It's time to finally check if we need to remember the entered information, the reason we are doing this up here, is because we want to send cookie-headers */ if ( isset($serendipity['POST']['remember']) ) { $details['url'] = $serendipity['POST']['url']; $details['name'] = $serendipity['POST']['name']; $details['email'] = $serendipity['POST']['email']; - $details['remember'] = 'checked'; + $details['remember'] = 'checked'; serendipity_rememberCommentDetails($details); } elseif ( isset($serendipity['POST']['comment']) ) { serendipity_forgetCommentDetails(); @@ -56,7 +56,10 @@ <?php if (!isset($serendipity['POST']['comment'])) { if ($serendipity['GET']['type'] == "trackbacks") { - echo '<div class="serendipity_commentsTitle">Trackbacks</div>'; + echo '<div class="serendipity_commentsTitle">Trackbacks</div><br />'; + echo '<b>Trackback URI for this entry:<br />'.str_repeat(" ",7); + $tbu = $serendipity['baseURL']."comment.php?type=trackback&entry_id=".$serendipity['GET']['entry_id']; + echo '<a href="'.$tbu.'">'.$tbu.'</a><p />'; serendipity_printTrackbacks(serendipity_fetchTrackbacks($id)); } else { ?> Index: serendipity_functions.inc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- serendipity_functions.inc.php 24 May 2003 14:35:24 -0000 1.48 +++ serendipity_functions.inc.php 24 May 2003 19:16:15 -0000 1.49 @@ -1281,17 +1281,19 @@ echo '<input type="hidden" name="serendipity[timestamp]" value="'.$entry["timestamp"]."\">\n"; ?> <tr> - <td align="left"> + <td align="left" valign="top"> <input type="text" name="serendipity[title]" value="<?=htmlentities($entry["title"])?>" size=30> </td> - <td nowrap="nowrap" align="right"> - <?=CATEGORY?> <?= $cat_list ?> + <td nowrap="nowrap" align="right" valign="top"> + <?=CATEGORY?> <?= $cat_list ?></td><tr><td align="left"> <input type="button" value=" B " onClick="serendipity_insBasic(document.forms['serendipityEntry']['serendipity[body]'], 'b')"> <input type="button" value=" U " onClick="serendipity_insBasic(document.forms['serendipityEntry']['serendipity[body]'], 'u')"> <input type="button" value=" I " onClick="serendipity_insBasic(document.forms['serendipityEntry']['serendipity[body]'], 'i')"> <input type="button" value="<img>" onClick="serendipity_insImage(document.forms['serendipityEntry']['serendipity[body]'])"> <input type="button" value="<?=IMAGE?>" onClick="window.open('serendipity_admin_image_selector.php', 'ImageSel', 'width=800,height=600,toolbar=no');"> <input type="button" value="Link" onClick="serendipity_insLink(document.forms['serendipityEntry']['serendipity[body]'])"> + </td><td align="right"> + <input type="submit" value="<?=SAVE?>"> </td> </tr> <tr> @@ -1310,11 +1312,6 @@ <textarea name="serendipity[extended]" cols=80 rows=20><?=htmlentities($entry["extended"])?></textarea> </td> </tr> - <tr> - <td colspan="2" align="right"> - <input type="submit" value="<?=SAVE?>"> - </td> - </tr> </form> </table> <?php |
From: <tomsommer@us...> - 2003-05-24 14:35:30
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv11366 Modified Files: comment.php serendipity_functions.inc.php Log Message: You can now delete trackbacks Index: comment.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/comment.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- comment.php 24 May 2003 01:33:19 -0000 1.6 +++ comment.php 24 May 2003 14:35:24 -0000 1.7 @@ -2,8 +2,8 @@ session_start(); include_once('serendipity_config.inc.php'); -if ( isset($_GET['delete'],$_GET['entry']) ) { - serendipity_deleteComment($_GET['delete'],$_GET['entry']); +if ( isset($serendipity['GET']['delete'],$serendipity['GET']['entry'],$serendipity['GET']['type']) ) { + serendipity_deleteComment($serendipity['GET']['delete'],$serendipity['GET']['entry'],$serendipity['GET']['type']); } /* It's time to finally check if we need to remember the entered information, Index: serendipity_functions.inc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- serendipity_functions.inc.php 24 May 2003 14:10:39 -0000 1.47 +++ serendipity_functions.inc.php 24 May 2003 14:35:24 -0000 1.48 @@ -358,7 +358,7 @@ } -function serendipity_deleteComment($id,$entry_id) +function serendipity_deleteComment($id,$entry_id,$type='comments') { global $serendipity; @@ -366,7 +366,7 @@ $query = "DELETE FROM {$serendipity['dbPrefix']}comments WHERE entry_id = ". $entry_id ." AND id = ". $id; serendipity_db_query($query); - $query = "UPDATE {$serendipity['dbPrefix']}entries SET comments = comments-1 WHERE id = ". $entry_id; + $query = "UPDATE {$serendipity['dbPrefix']}entries SET $type = $type-1 WHERE id = ". $entry_id; serendipity_db_query($query); header('Location: '. $_SERVER['HTTP_REFERER']); } else { @@ -428,7 +428,7 @@ <?php if ($_SESSION["serendipityAuthedUser"] === true) { ?> - (<a href="<?=$serendipity["baseURL"]?>comment.php?delete=<?=$comment['id']?>&entry=<?=$comment['entry_id']?>"><?= DELETE ?></a>) + (<a href="<?=$serendipity["baseURL"]?>comment.php?serendipity[delete]=<?=$comment['id']?>&serendipity[entry]=<?=$comment['entry_id']?>&serendipity[type]=comments"><?= DELETE ?></a>) <?php } ?></div> @@ -461,11 +461,11 @@ <?=htmlentities(strip_tags($comment['body']))?><br /> <div class="serendipity_comment_source"> <b>Weblog: </b> <?=strip_tags($name)?><br /> - <b>Tracked: </b><?=date("M d, h:i", $comment['timestamp'])?><p /> + <b>Tracked: </b><?=date("M d, h:i", $comment['timestamp'])?> <?php if ($_SESSION["serendipityAuthedUser"] === true) { ?> - (<a href="<?=$serendipity["baseURL"]?>comment.php?delete=<?=$comment['id']?>&entry=<?=$comment['entry_id']?>"><?= DELETE ?></a>) + (<a href="<?=$serendipity["baseURL"]?>comment.php?serendipity[delete]=<?=$comment['id']?>&serendipity[entry]=<?=$comment['entry_id']?>&serendipity[type]=trackbacks"><?= DELETE ?></a>) <?php } ?></div> |
From: <jhermanns@us...> - 2003-05-24 14:10:46
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv3901 Modified Files: serendipity_functions.inc.php serendipity_xmlrpc.php Log Message: Removed function serendipity_updateEntry, since this functionality is covered by serendipity_updertEntry (mixture between UPdate and insERT, was meant to say "this function does both"). serendipity_xmlrpc.php was the only file using serendipity_updateEntry() and has been fixed. I think George is the only one using xmlrpc, can you check to make sure it still works? Index: serendipity_functions.inc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- serendipity_functions.inc.php 24 May 2003 01:37:32 -0000 1.46 +++ serendipity_functions.inc.php 24 May 2003 14:10:39 -0000 1.47 @@ -1004,37 +1004,6 @@ return (int)$entry['id']; } -function serendipity_updateEntry($entry) { - global $serendipity; - - $newEntry = 0; - $exflag = 0; - - if (!is_numeric($entry["id"])) { - return; - } - if(strlen($entry["extended"])) { - $exflag = 1; - } - $querystring = "UPDATE ".$serendipity["dbPrefix"]."entries - SET title = '".serendipity_db_escape_string($entry["title"])."', - body = '".serendipity_db_escape_string($entry["body"])."', - extended = '".serendipity_db_escape_string($entry["extended"])."', - exflag = '$exflag' WHERE id = ".$entry["id"]; - $query = serendipity_db_query($querystring); - if (is_string($query)) { - return $query; - } - if($exflag) { - serendipity_handle_references($entry['id'], $serendipity['blogTitle'], $entry['title'], $entry['extended'], $newEntry); - } - else { - serendipity_handle_references($entry['id'], $serendipity['blogTitle'], $entry['title'], $entry['body'], $newEntry); - } - serendipity_purgeEntry($entry['id'], $entry['timestamp']); - return $entry['id']; -} - /** * Deletes an entry and everything that belongs to it (comments, etc...) from * the database Index: serendipity_xmlrpc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_xmlrpc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- serendipity_xmlrpc.php 23 May 2003 17:33:02 -0000 1.2 +++ serendipity_xmlrpc.php 24 May 2003 14:10:40 -0000 1.3 @@ -3,7 +3,7 @@ require_once 'serendipity_config.inc.php'; require_once 'bundled-libs/XML/RPC/Server.php'; -$dispatches = array('blogger.getUsersBlogs' => +$dispatches = array('blogger.getUsersBlogs' => array('function' => 'blogger_getUsersBlogs'), 'blogger.getUserInfo' => array('function' => 'blogger_getUserInfo'), @@ -34,7 +34,7 @@ 'mt.supportedTextFilters' => array('function' => 'mt_supportedTextFilters')); -function blogger_getUsersBlogs($message) +function blogger_getUsersBlogs($message) { global $serendipity; @@ -46,8 +46,8 @@ return new XML_RPC_Response('', 4, "Authentication Failed"); } $blog1 = new XML_RPC_Value( - array('url' => new XML_RPC_Value($serendipity['baseURL']), - 'blogid' => new XML_RPC_Value('1'), + array('url' => new XML_RPC_Value($serendipity['baseURL']), + 'blogid' => new XML_RPC_Value('1'), 'blogName' => new XML_RPC_Value($serendipity['blogTitle'])), 'struct'); $blogs = new XML_RPC_Value( array($blog1), 'array'); @@ -55,7 +55,7 @@ return($r); } -function blogger_getUserInfo($message) +function blogger_getUserInfo($message) { global $serendipity; $val = $message->params[1]; @@ -67,10 +67,10 @@ } $userdata = new XML_RPC_Value( array('nickname' => new XML_RPC_Value($serendipity['serendipityUser']), - 'userid' => new XML_RPC_Value($serendipity['authorid'], 'string'), - 'url' => new XML_RPC_Value($serendipity['baseURL']), - 'email' => new XML_RPC_Value($serendipity['serendipityEmail']), - 'lastname' => new XML_RPC_Value(''), + 'userid' => new XML_RPC_Value($serendipity['authorid'], 'string'), + 'url' => new XML_RPC_Value($serendipity['baseURL']), + 'email' => new XML_RPC_Value($serendipity['serendipityEmail']), + 'lastname' => new XML_RPC_Value(''), 'firstname' => new XML_RPC_Value('')), 'struct'); $r = new XML_RPC_Response($userdata); @@ -94,10 +94,10 @@ $xml_entries_vals[] = new XML_RPC_Value( array( 'categoryId' => new XML_RPC_Value($cat['categoryid'], 'string'), - 'categoryName' => new XML_RPC_Value($cat['category_name'], 'string')), 'struct'); + 'categoryName' => new XML_RPC_Value($cat['category_name'], 'string')), 'struct'); } $xml_entries = new XML_RPC_Value($xml_entries_vals, 'array'); - return new XML_RPC_Response($xml_entries); + return new XML_RPC_Response($xml_entries); } function mt_getRecentPostTitles($message) @@ -123,7 +123,7 @@ 'postid' => new XML_RPC_Value($entry['id'], 'string')), 'struct'); } $xml_entries = new XML_RPC_Value($xml_entries_vals, 'array'); - return new XML_RPC_Response($xml_entries); + return new XML_RPC_Response($xml_entries); } function mt_supportedTextFilters($message) @@ -167,7 +167,7 @@ $val = $message->params[4]; $entry['body'] = $val->getval(); $entry['user'] = $username; - $id = serendipity_updateEntry($entry); + $id = serendipity_updertEntry($entry); return new XML_RPC_Response( new XML_RPC_Value($id, 'string')); } @@ -226,7 +226,7 @@ $entry['user'] = $username; $entry['authorid'] = $serendipity['authorid']; $entry['id'] = $postid; - $id = serendipity_updateEntry($entry); + $id = serendipity_updertEntry($entry); return new XML_RPC_Response( new XML_RPC_Value($id)); } @@ -248,9 +248,9 @@ 'dateCreated' => new XML_RPC_Value(XML_RPC_iso8601_encode($entry['timestamp']), 'dateTime.iso8601'), 'postid' => new XML_RPC_Value($postid, 'string'), 'userid' => new XML_RPC_Value($entry['authorid'], 'string'), - 'description' => new XML_RPC_Value($entry['body'], 'string'), - 'mt_text_more'=> new XML_RPC_Value($entry['extended'], 'string'), - 'mt_excerpt'=> new XML_RPC_Value('', 'string'), + 'description' => new XML_RPC_Value($entry['body'], 'string'), + 'mt_text_more'=> new XML_RPC_Value($entry['extended'], 'string'), + 'mt_excerpt'=> new XML_RPC_Value('', 'string'), 'mt_allow_comments' => new XML_RPC_Value(1, 'boolean'), 'mt_allow_pings' => new XML_RPC_Value(1, 'boolean'), 'mt_convert_breaks' => new XML_RPC_Value(0, 'boolean'), @@ -258,7 +258,7 @@ 'permalink' => new XML_RPC_Value($serendipity['baseURL']."/archives/e_$postid.html", 'string'), 'link' => new XML_RPC_Value($serendipity['baseURL']."/archives/e_$postid.html", 'string')); $entry = new XML_RPC_Value($tmp, 'struct'); - return new XML_RPC_Response($entry); + return new XML_RPC_Response($entry); } function metaweblog_deletePost($message) @@ -283,7 +283,7 @@ { global $serendipity; $val = $message->params[0]; - $postid = $val->getval(); + $postid = $val->getval(); $val = $message->params[1]; $username = $val->getval(); $val = $message->params[2]; @@ -294,7 +294,7 @@ foreach ($categories as $cat) { $val = $cat['categoryId']; $category_ids[] = $val->getval(); - } + } if(!serendipity_authenticate_author($username, $password)) { return new XML_RPC_Response('', 4, "Authentication Failed"); } @@ -318,7 +318,7 @@ { global $serendipity; $val = $message->params[0]; - $postid = $val->getval(); + $postid = $val->getval(); $val = $message->params[1]; $username = $val->getval(); $val = $message->params[2]; |
From: <jhermanns@us...> - 2003-05-24 10:23:09
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv10959 Modified Files: serendipity_sidebar_items.php Log Message: New logo (comes without the 10/9 typo, though) Index: serendipity_sidebar_items.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_sidebar_items.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- serendipity_sidebar_items.php 23 May 2003 23:53:17 -0000 1.11 +++ serendipity_sidebar_items.php 24 May 2003 10:23:06 -0000 1.12 @@ -157,7 +157,7 @@ global $serendipity; $title = POWERED_BY.":"; - echo "<div class=\"serendipityPlug\"><a href=\"http://php-blog.sf.net\"><img src=\"{$serendipity['serendipityHTTPPath']}pixel/s10y_logo_small.png\" alt=\":serendipity\" border=\"0\"/></a></div>"; + echo "<div class=\"serendipityPlug\"><a href=\"http://php-blog.sf.net\"><img src=\"{$serendipity['serendipityHTTPPath']}pixel/s9y_banner_tiny.png\" alt=\":serendipity\" border=\"0\"/></a></div>"; } } |
From: <tomsommer@us...> - 2003-05-24 01:51:55
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv10096 Modified Files: serendipity_config.inc.php Log Message: Turning production back ON Index: serendipity_config.inc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_config.inc.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- serendipity_config.inc.php 24 May 2003 01:17:20 -0000 1.9 +++ serendipity_config.inc.php 24 May 2003 01:51:52 -0000 1.10 @@ -2,7 +2,7 @@ define('IN_serendipity', true); include_once('compat.php'); -$serendipity['production'] = 0; +$serendipity['production'] = 1; if (!isset($serendipity['serendipityPath'])) { $serendipity['serendipityPath'] = './'; } |
From: <tomsommer@us...> - 2003-05-24 01:37:35
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv6419 Modified Files: serendipity_functions.inc.php Log Message: Lets sort those comments/trackbacks by id Index: serendipity_functions.inc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- serendipity_functions.inc.php 24 May 2003 01:33:19 -0000 1.45 +++ serendipity_functions.inc.php 24 May 2003 01:37:32 -0000 1.46 @@ -378,7 +378,7 @@ { global $serendipity; - $query = "SELECT * FROM {$serendipity['dbPrefix']}comments WHERE entry_id=$id AND type LIKE 'NORMAL'"; + $query = "SELECT * FROM {$serendipity['dbPrefix']}comments WHERE entry_id=$id AND type LIKE 'NORMAL' ORDER BY id"; if (isset($limit)) { $query .= " LIMIT $limit"; } @@ -393,7 +393,7 @@ { global $serendipity; - $query = "SELECT * FROM {$serendipity['dbPrefix']}comments WHERE entry_id=$id AND type LIKE 'TRACKBACK' AND title!=''"; + $query = "SELECT * FROM {$serendipity['dbPrefix']}comments WHERE entry_id=$id AND type LIKE 'TRACKBACK' AND title!='' ORDER BY id"; if (isset($limit)) { $query .= " LIMIT $limit"; } |
From: <tomsommer@us...> - 2003-05-24 01:33:23
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv5418 Modified Files: serendipity_functions.inc.php comment.php Log Message: We now remember commentDetails, we can also forget them, both on request - no need for javascript Index: serendipity_functions.inc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- serendipity_functions.inc.php 23 May 2003 22:49:39 -0000 1.44 +++ serendipity_functions.inc.php 24 May 2003 01:33:19 -0000 1.45 @@ -12,15 +12,15 @@ <table border="0" width="100%" cellpadding="3"> <tr> <td class="serendipity_commentsLabel"><?=NAME?></td> -<td class="serendipity_commentsValue"><input type="text" name="serendipity[name]" value="" size="30" /></td> +<td class="serendipity_commentsValue"><input type="text" name="serendipity[name]" value="<?= $serendipity['COOKIE']['name'] ?>" size="30" /></td> </tr> <tr> <td class="serendipity_commentsLabel"><?=EMAIL?></td> -<td class="serendipity_commentsValue"><input type="text" name="serendipity[email]" value="" /></td> +<td class="serendipity_commentsValue"><input type="text" name="serendipity[email]" value="<?= $serendipity['COOKIE']['email'] ?>" /></td> </tr> <tr> <td class="serendipity_commentsLabel"><?=HOMEPAGE?></td> -<td class="serendipity_commentsValue"><input type="text" name="serendipity[url]" value="" /></td> +<td class="serendipity_commentsValue"><input type="text" name="serendipity[url]" value="<?= $serendipity['COOKIE']['url'] ?>" /></td> </tr> <tr> <td class="serendipity_commentsLabel"><?=COMMENT?></td> @@ -28,26 +28,32 @@ </tr> </table> <?=REMEMBER_INFO?> -<input type="checkbox" name="serendipity_remember" /><br /> +<input type="checkbox" name="serendipity[remember]" <?= $serendipity['COOKIE']['remember'] ?>/><br /> <input type="submit" value="<?=SUBMIT_COMMENT?>" /> </form> -<script type="text/javascript" language="javascript"> -<!-- -if (!document.serendipity_comment['serendipity[name]'].value) - document.serendipity_comment['serendipity[name]'].value = getCookie("serendipity_cmt_name"); - -if (!document.serendipity_comment['serendipity[email]'].value) - document.serendipity_comment['serendipity[email]'].value = getCookie("serendipity_cmt_email"); - -if (!document.serendipity_comment['serendipity[url]'].value) - document.serendipity_comment['serendipity[url]'].value = getCookie("serendipity_cmt_url"); - -if (getCookie("serendipity_cmt_name")) - document.serendipity_comment.serendipity_remember.checked = 1; -// --> -</script> </div> <?php +} +function serendipity_setCookie($name,$value) { + global $serendipity; + setcookie("serendipity[$name]", $value, time()+60*60*24*30, $serendipity['serendipityHTTPPath']); + $_COOKIE[$name] = $value; +} + +function serendipity_deleteCookie($name) { + setcookie("serendipity[$name]", "", time()-4000); + unset($_COOKIE[$name]); +} +function serendipity_rememberCommentDetails($details) { + foreach ( $details as $n=>$v ) { + serendipity_setCookie($n,$v); + } +} +function serendipity_forgetCommentDetails() { + global $serendipity; + foreach ($serendipity['COOKIE'] as $n => $v) { + serendipity_deleteCookie($n); + } } // Draws a little calendar in HTML Index: comment.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/comment.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- comment.php 22 May 2003 23:01:00 -0000 1.5 +++ comment.php 24 May 2003 01:33:19 -0000 1.6 @@ -6,6 +6,18 @@ serendipity_deleteComment($_GET['delete'],$_GET['entry']); } +/* It's time to finally check if we need to remember the entered information, + the reason we are doing this up here, is because we want to send cookie-headers */ +if ( isset($serendipity['POST']['remember']) ) { + $details['url'] = $serendipity['POST']['url']; + $details['name'] = $serendipity['POST']['name']; + $details['email'] = $serendipity['POST']['email']; + $details['remember'] = 'checked'; + serendipity_rememberCommentDetails($details); +} elseif ( isset($serendipity['POST']['comment']) ) { + serendipity_forgetCommentDetails(); +} + if (!($type = @$_GET['type'])) { $type = 'normal'; @@ -43,26 +55,23 @@ <body> <?php if (!isset($serendipity['POST']['comment'])) { -if ($serendipity['GET']['type'] == "trackbacks") { -echo '<div class="serendipity_commentsTitle">Trackbacks</div>'; - serendipity_printTrackbacks(serendipity_fetchTrackbacks($id)); -} -else { + if ($serendipity['GET']['type'] == "trackbacks") { + echo '<div class="serendipity_commentsTitle">Trackbacks</div>'; + serendipity_printTrackbacks(serendipity_fetchTrackbacks($id)); + } else { ?> <div class="serendipity_commentsTitle">Comments</div> <?php serendipity_printComments(serendipity_fetchComments($id)); ?> <div class="serendipity_commentsTitle">Add A Comment</div> <?php serendipity_displayCommentForm($id); -} + } } else { - $remember = 0; $comment['url'] = $serendipity['POST']['url']; $comment['comment'] = trim($serendipity['POST']['comment']); $comment['name'] = $serendipity['POST']['name']; $comment['email'] = $serendipity['POST']['email']; - if ( !empty($comment['comment']) ) { - serendipity_saveComment($serendipity['POST']['entry_id'], $comment, 'NORMAL'); + serendipity_saveComment($serendipity['POST']['entry_id'], $comment, 'NORMAL'); ?> Your comment was successfully added. Click <a href="<?=$PHP_SELF?>?serendipity[entry_id]=<?=$serendipity['POST']['entry_id']?>">here</a> to return to the comments, and <a href="#" onClick="self.close()">here</a> to close this window. |
From: <tomsommer@us...> - 2003-05-24 01:17:22
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv776 Modified Files: serendipity_config.inc.php Log Message: Get cookies to Index: serendipity_config.inc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_config.inc.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- serendipity_config.inc.php 10 Apr 2003 14:50:30 -0000 1.8 +++ serendipity_config.inc.php 24 May 2003 01:17:20 -0000 1.9 @@ -2,7 +2,7 @@ define('IN_serendipity', true); include_once('compat.php'); -$serendipity['production'] = 1; +$serendipity['production'] = 0; if (!isset($serendipity['serendipityPath'])) { $serendipity['serendipityPath'] = './'; } @@ -96,7 +96,7 @@ // Merge get and post into the serendipity array $serendipity["GET"] = &$_GET["serendipity"]; $serendipity["POST"] = &$_POST["serendipity"]; - +$serendipity["COOKIE"] = &$_COOKIE["serendipity"]; // We don't care who tells us what to do if (!$serendipity["GET"]["action"]) { $serendipity["GET"]["action"] = $serendipity["POST"]["action"]; |
From: <tomsommer@us...> - 2003-05-24 00:07:55
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv6745 Modified Files: serendipity_sidebar_items.php Log Message: Added link back to index Index: serendipity_sidebar_items.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_sidebar_items.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- serendipity_sidebar_items.php 23 May 2003 23:09:27 -0000 1.10 +++ serendipity_sidebar_items.php 23 May 2003 23:53:17 -0000 1.11 @@ -60,6 +60,7 @@ $title = ARCHIVES; $ts = mktime(0,0,0,(date("m")+1), 1, date("Y")); + echo "<a href='{$serendipity['serendipityHTTPPath']}'>Recent...</a><br />"; for($x=0; $x<3; $x++) { $ts-=1; if ($serendipity["rewrite"] === true) |
From: <tomsommer@us...> - 2003-05-23 23:55:54
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv7606 Modified Files: TODO Log Message: Small update Index: TODO =================================================================== RCS file: /cvsroot/php-blog/serendipity/TODO,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TODO 29 Mar 2003 19:52:58 -0000 1.2 +++ TODO 23 May 2003 23:55:50 -0000 1.3 @@ -1,5 +1,3 @@ -* Split up the administration and entry editing sections into two -separate areas. * Split up serendipity_functions.inc.php * Move the library files out of the docroot * Unify the configuration system @@ -13,5 +11,5 @@ * Add a citation extractor plugin * Add support for multiple weblogs * Add the ability to have a printer friendly format for the weblog -* Add a set of css templates that are distributed with serendipity. choose -a reasonable default +* Add a set of css templates that are distributed with serendipity. + - Choose a reasonable default |
From: <tomsommer@us...> - 2003-05-23 23:09:30
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv19432 Modified Files: serendipity_sidebar_items.php Log Message: Lets try using the correct HTTPPath, shall we? Index: serendipity_sidebar_items.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_sidebar_items.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- serendipity_sidebar_items.php 22 May 2003 21:06:47 -0000 1.9 +++ serendipity_sidebar_items.php 23 May 2003 23:09:27 -0000 1.10 @@ -156,7 +156,7 @@ global $serendipity; $title = POWERED_BY.":"; - echo "<div class=\"serendipityPlug\"><a href=\"http://php-blog.sf.net\"><img src=\"{$serendipity['HTTPPath']}pixel/s10y_logo_small.png\" alt=\":serendipity\" border=\"0\"/></a></div>"; + echo "<div class=\"serendipityPlug\"><a href=\"http://php-blog.sf.net\"><img src=\"{$serendipity['serendipityHTTPPath']}pixel/s10y_logo_small.png\" alt=\":serendipity\" border=\"0\"/></a></div>"; } } |
From: <tomsommer@us...> - 2003-05-23 22:49:44
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv10692 Modified Files: serendipity_functions.inc.php Log Message: Why call unknown function serendipity_() ? Index: serendipity_functions.inc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- serendipity_functions.inc.php 22 May 2003 23:01:00 -0000 1.43 +++ serendipity_functions.inc.php 23 May 2003 22:49:39 -0000 1.44 @@ -801,8 +801,7 @@ /** * */ -function -add_trackback ($id, $title, $url, $name, $excerpt) +function add_trackback ($id, $title, $url, $name, $excerpt) { global $serendipity; @@ -816,8 +815,7 @@ return 1; } -function -add_pingback ($id, $postdata) +function add_pingback ($id, $postdata) { global $serendipity; @@ -828,7 +826,7 @@ $comment['url'] = $remote; $comment['comment'] = ''; $comment['name'] = ''; - serendipity_($id, $comment, 'PINGBACK'); + serendipity_saveComment($id, $comment, 'PINGBACK'); return 1; } return 0; @@ -837,8 +835,7 @@ /** * Cut text */ -function -serendipity_trackback_excerpt($text) +function serendipity_trackback_excerpt($text) { return substr($text, 0, 255); } @@ -893,8 +890,7 @@ /** * search through link body, and automatically send a trackback ping. */ -function -serendipity_handle_references($id, $author, $title, $text) +function serendipity_handle_references($id, $author, $title, $text) { global $serendipity; |