[pLog-svn] r3347 - in plog/trunk: class/action/admin class/view/admin locale templates/admin

mark at devel.lifetype.net mark at devel.lifetype.net
Sat May 6 12:33:06 GMT 2006


Author: mark
Date: 2006-05-06 12:33:05 +0000 (Sat, 06 May 2006)
New Revision: 3347

Modified:
   plog/trunk/class/action/admin/adminupdateblogsettingsaction.class.php
   plog/trunk/class/view/admin/adminblogsettingsview.class.php
   plog/trunk/locale/locale_en_UK.php
   plog/trunk/locale/locale_zh_TW.php
   plog/trunk/templates/admin/blogsettings.template
   plog/trunk/templates/admin/newpost.template
Log:
Add a blogSendNotification settings to BlogSettings page. Now user can easily set the default value in blog-wise, instead of modify each post.

** This value only effect the new post. If the post already exist, user still have to change them one by one.

Modified: plog/trunk/class/action/admin/adminupdateblogsettingsaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminupdateblogsettingsaction.class.php	2006-05-05 21:07:05 UTC (rev 3346)
+++ plog/trunk/class/action/admin/adminupdateblogsettingsaction.class.php	2006-05-06 12:33:05 UTC (rev 3347)
@@ -44,6 +44,7 @@
 			$this->registerField( "blogLinkCategoriesOrder" );
 			$this->registerField( "blogEnableAutosaveDrafts" );
 			$this->registerField( "blogShowInSummary" );
+			$this->registerField( "blogSendNotification" );
 			// set the view that we're going to use
 			$view = new AdminBlogSettingsView( $this->_blogInfo );
 			$view->setErrorMessage( $this->_locale->tr("error_updating_settings"));
@@ -72,6 +73,7 @@
            	$blogSettings->setValue( "show_future_posts_in_calendar",  Textfilter::checkboxToBoolean($this->_request->getValue( "blogShowFuturePosts" )));
            	$blogSettings->setValue( "new_drafts_autosave_enabled", Textfilter::checkboxToBoolean($this->_request->getValue( "blogEnableAutosaveDrafts" )));
             $blogSettings->setValue( "comments_order", $this->_request->getValue( "blogCommentsOrder" ));
+            $blogSettings->setValue( "default_send_notification", $this->_request->getValue( "blogSendNotification" ));
             $this->_blogInfo->setAbout( Textfilter::filterAllHTML($this->_request->getValue( "blogAbout" )));
             $this->_blogInfo->setBlog( Textfilter::filterAllHTML($this->_request->getValue( "blogName" )));
             $this->_blogInfo->setSettings( $blogSettings );

Modified: plog/trunk/class/view/admin/adminblogsettingsview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminblogsettingsview.class.php	2006-05-05 21:07:05 UTC (rev 3346)
+++ plog/trunk/class/view/admin/adminblogsettingsview.class.php	2006-05-06 12:33:05 UTC (rev 3347)
@@ -37,6 +37,7 @@
 			$this->setValue( "blogCommentsOrder", $blogSettings->getValue( "comments_order" ));
 			$this->setValue( "blogCategory", $this->_blogInfo->getBlogCategoryId());
 			$this->setValue( "blogShowInSummary", $this->_blogInfo->getShowInSummary());
+			$this->setValue( "blogSendNotification", $blogSettings->getValue( "default_send_notification" ));
 		}
 		
 		function render()

Modified: plog/trunk/locale/locale_en_UK.php
===================================================================
--- plog/trunk/locale/locale_en_UK.php	2006-05-05 21:07:05 UTC (rev 3346)
+++ plog/trunk/locale/locale_en_UK.php	2006-05-06 12:33:05 UTC (rev 3347)
@@ -1017,4 +1017,6 @@
 
 $messages['help_force_posturl_unique'] = 'Force all post URLs within a blog to be unique.  This is only needed if you are changing the URLs and are removing the date portions of the URL. [Default = no]';
 
+$messages['default_send_notification'] = 'Default Send Notification';
+
 ?>
\ No newline at end of file

Modified: plog/trunk/locale/locale_zh_TW.php
===================================================================
--- plog/trunk/locale/locale_zh_TW.php	2006-05-05 21:07:05 UTC (rev 3346)
+++ plog/trunk/locale/locale_zh_TW.php	2006-05-06 12:33:05 UTC (rev 3347)
@@ -1013,5 +1013,10 @@
 $messages['error_comment_spam_keep'] = 'The anti-spam filter has put your comment in the moderation queue and it will have to be approved by the blog owner.';
 
 $messages['blog_categories'] = '網誌分類';
-$messages['global_article_categories'] = '全站文章分類';
+$messages['global_article_categories'] = '全站文章分類';
 
+
+$messages['help_force_posturl_unique'] = 'Force all post URLs within a blog to be unique.  This is only needed if you are changing the URLs and are removing the date portions of the URL. [Default = no]';
+
+$messages['default_send_notification'] = '預設發送通知'; 
+
 ?>
\ No newline at end of file

Modified: plog/trunk/templates/admin/blogsettings.template
===================================================================
--- plog/trunk/templates/admin/blogsettings.template	2006-05-05 21:07:05 UTC (rev 3346)
+++ plog/trunk/templates/admin/blogsettings.template	2006-05-06 12:33:05 UTC (rev 3347)
@@ -131,7 +131,15 @@
         <input class="checkbox" type="checkbox" name="blogShowInSummary" id="blogShowInSummary" value="1" {if $blogShowInSummary == true} checked="checked" {/if} />
 	    {$locale->tr("show_in_summary_help")}
 	  </div>
-    </div>	
+    </div>
+    
+     <div class="field">
+      <label for="blogSendNotification">{$locale->tr("default_send_notification")}</label>
+      <div class="formHelp">
+        <input class="checkbox" type="checkbox" name="blogSendNotification" id="blogSendNotification" value="1" {if $blogSendNotification == true} checked="checked" {/if} />
+	    {$locale->tr("send_notification_help")}
+	  </div>
+    </div>
 
     <div class="field">
      <label for="blogCommentsOrder">{$locale->tr("comments_order")}</label>

Modified: plog/trunk/templates/admin/newpost.template
===================================================================
--- plog/trunk/templates/admin/newpost.template	2006-05-05 21:07:05 UTC (rev 3346)
+++ plog/trunk/templates/admin/newpost.template	2006-05-06 12:33:05 UTC (rev 3347)
@@ -154,6 +154,10 @@
 	   </div>
    
        <div class="field_checkbox">
+         {assign var=blogSendNotification value=$blogsettings->getValue("default_send_notification")}
+         {if empty($sendNotification)}
+         	{assign var=sendNotification value=$blogSendNotification}
+         {/if}
 	     <input class="checkbox" type="checkbox" name="sendNotification" id="sendNotification" value="1" {if $sendNotification} checked="checked" {/if}/>
 		 <label for="sendNotification">{$locale->tr("send_notification_help")}</label>
 	   </div>



More information about the pLog-svn mailing list