[pLog-svn] r2007 - plugins/trunk

oscar at devel.plogworld.net oscar at devel.plogworld.net
Fri May 13 19:42:44 GMT 2005


Author: oscar
Date: 2005-05-13 19:42:44 +0000 (Fri, 13 May 2005)
New Revision: 2007

Modified:
   plugins/trunk/moblog.php
Log:
now comments are enabled depending on ur current config settings

Modified: plugins/trunk/moblog.php
===================================================================
--- plugins/trunk/moblog.php	2005-05-13 19:40:22 UTC (rev 2006)
+++ plugins/trunk/moblog.php	2005-05-13 19:42:44 UTC (rev 2007)
@@ -28,6 +28,25 @@
 	include_once( PLOG_CLASS_PATH."plugins/moblog/class/moblog/moblogconstants.properties.php" );
 	include_once( PLOG_CLASS_PATH."class/template/cachecontrol.class.php" ); 
     
+//// help message sent to users requesting it ////
+    $helpMessage = <<< EOD
+pLog Moblog
+-----------
+Send a message with the following format ('start' and 'end' messages not included!):
+
+<<<<< start of moblog message format >>>>>
+
+USER: your-plog-username
+PASS: your-plog-password
+BLOG: your-plog-blog-name
+
+<<<<< end of moblog message format >>>>>
+
+The must be sent as plain text, and it can include as many attachment as needed.
+EOD;
+///////////////////////
+
+    
     // initialize the logging system
     MoblogLogger::log( "-- Initialized");
     
@@ -56,8 +75,8 @@
     // check if it's a help message
     if( $request->isHelpRequest()) {
         $response = new MoblogResponse( $request->getReplyTo(),
-                                        "pLog Moblog: Error",
-                                        "Incorrect request" );
+                                        "pLog Moblog: Help",
+                                        $helpMessage );
         $response->send();
         die();
     }
@@ -288,8 +307,11 @@
                             POST_STATUS_PUBLISHED,
                             0
                             );
-    $article->setDateObject( new Timestamp());
-    $article->setCommentsEnabled( true );
+    $article->setDateObject( new Timestamp());
+    // enable or disable comments by default depending on the current config
+    $commentsEnabled = $blogSettings->getValue( "comments_enabled" );
+    $article->setCommentsEnabled( $commentsEnabled );
+    
     $result = $articles->addArticle( $article );
     
     // add an article notification




More information about the pLog-svn mailing list