Re: [pear-webmaster] Comment system - ready - please test!
| From: | Tobias Schlitt | Date: | Fri, 14 May 2004 18:02:02 +0000 |
| Subject: | Re: [pear-webmaster] Comment system - ready - please test! | ||
| References: | 1 2 | Groups: | php.pear.webmaster |
| Request: | Send a blank email to pear-webmaster+get-2310@lists.php.net to get a copy of this message | ||
Martin Jansen wrote:
So, I finally managed to finish the comment system for PEARWeb (as talked during the meeting).
Please review/test it on http://zuhause.bei.tobias-schlitt.de:81/ .
Looks cool. But who do you expect to edit the comments? For package homepages this should be taken care of by the maintainers. But what's with packages like the manual index page (http://pear.php.net/manual/en/)? Who is going to take care of that?On the meeting we agreed that comments should be edit/approve/deletable by every pear.dev to allow fast reaction. So, the pages just require pear.dev.
The system uses a newly implemented PEARMailer class for definition of mail templates and stuff. I woul afterwards like to migrate PEPr to use it, too. Dufuz told me, that he's interessted in that for the bug system and maybe we can switch every mail to it, to administrate mail templates in a common place.
That stuff should be part of include/Damblan/.So, let's call it "Damblan_Mailer"?
Waiting for your feedback! (Enhancements can easily be made when I commited.)
Is a diff of the changes available somewhere?Find the diff for all existent files here: Index: package-info.php =================================================================== RCS file: /repository/pearweb/public_html/package-info.php,v retrieving revision 1.61 diff -u -r1.61 package-info.php
--- package-info.php 22 Mar 2004 16:42:03 -0000 1.61 +++ package-info.php 14 May 2004 18:00:45 -0000@@ -20,6 +20,7 @@ */ require_once "Damblan/URL.php"; +require_once "comments/comment.php"; $site = new Damblan_URL; // {{{ setup, queries @@ -377,6 +378,13 @@ // {{{ page footer +echo "<br /><br />"; + +$page = $_SERVER['REQUEST_URI']; +printCommentForm($page, '90%'); +$comments = UserComment::getAll($page); +printComments($comments, '90%'); + response_footer(); // }}} Index: pear-manual.php =================================================================== RCS file: /repository/pearweb/include/pear-manual.php,v retrieving revision 1.44 diff -u -r1.44 pear-manual.php
--- pear-manual.php 13 May 2004 22:32:19 -0000 1.44 +++ pear-manual.php 14 May 2004 18:04:23 -0000@@ -19,6 +19,7 @@ */ require_once 'site.php'; +require_once 'comments/comment.php'; $doc_languages = array('en' => 'English',
'fr' => 'French',@@ -306,13 +307,21 @@
}} -function manualFooter($title, $id = '') -{ +function manualFooter($title,$id="") {
global $HTDIG;
+ global $HTDIG, $dbh;
if (!$HTDIG) {
- navigationBar($title, $id, 'bottom');
+ navigationBar($title, $id, "bottom");
}
+ // Comment system + $karma = new Damblan_Karma($dbh); + $page = $_SERVER['REQUEST_URI']; + printCommentForm($page); + $comments = UserComment::getAll($page); + printComments($comments);+
response_footer();} + ?> I can upload the new files I added as PHPS somewhere, if needed. Regards, Toby -- Tobias Schlitt GPG Key: 0xA6529579 a passion for php http://www.schlitt.info