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

oscar at devel.lifetype.net oscar at devel.lifetype.net
Thu Jan 12 22:52:45 GMT 2006


Author: oscar
Date: 2006-01-12 22:52:45 +0000 (Thu, 12 Jan 2006)
New Revision: 2780

Modified:
   plog/trunk/class/action/admin/adminupdateblogsettingsaction.class.php
   plog/trunk/class/dao/bloginfo.class.php
   plog/trunk/class/dao/blogs.class.php
   plog/trunk/class/view/admin/adminblogsettingsview.class.php
   plog/trunk/locale/locale_en_UK.php
   plog/trunk/templates/admin/blogsettings.template
Log:
Show/not show blog in summary.php

Modified: plog/trunk/class/action/admin/adminupdateblogsettingsaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminupdateblogsettingsaction.class.php	2006-01-12 22:45:38 UTC (rev 2779)
+++ plog/trunk/class/action/admin/adminupdateblogsettingsaction.class.php	2006-01-12 22:52:45 UTC (rev 2780)
@@ -42,6 +42,7 @@
 			$this->registerField( "blogCategoriesOrder" );
 			$this->registerField( "blogLinkCategoriesOrder" );
 			$this->registerField( "blogEnableAutosaveDrafts" );
+			$this->registerField( "blogShowInSummary" );
 			// set the view that we're going to use
 			$view = new AdminBlogSettingsView( $this->_blogInfo );
 			$view->setErrorMessage( $this->_locale->tr("error_updating_settings"));
@@ -77,6 +78,7 @@
 			$this->_blogInfo->setProperties( $this->_request->getValue( "properties" ));
 			$this->_blogInfo->setBlogCategoryId( $this->_request->getValue( "blogCategory" ));
 			$this->_blogInfo->setMangledBlogName( Textfilter::urlize( $this->_blogInfo->getBlog()));
+			$this->_blogInfo->setShowInSummary( Textfilter::checkboxToBoolean( $this->_request->getValue( "blogShowInSummary" )));			
 
             // and now update the settings in the database
             $blogs = new Blogs();

Modified: plog/trunk/class/dao/bloginfo.class.php
===================================================================
--- plog/trunk/class/dao/bloginfo.class.php	2006-01-12 22:45:38 UTC (rev 2779)
+++ plog/trunk/class/dao/bloginfo.class.php	2006-01-12 22:52:45 UTC (rev 2780)
@@ -80,6 +80,9 @@
 			$this->_category = null;
 			$this->_categoryId = 0;
 			
+			// show in the summary by default
+			$this->_showInSummary = true;
+			
 			$this->_pk = "id";
 			$this->_fields = Array(
 				"blog" => "getBlog",
@@ -639,6 +642,16 @@
 			return( $this->_showInSummary );
 		}
 		
+		/** 
+		 * Whether to show this blog in the summary page or not.
+		 *
+		 * @param showInSummary
+		 */
+		function setShowInSummary( $showInSummary )
+		{
+			$this->_showInSummary = $showInSummary;
+		}
+		
 		/**
 		 * @private
 		 */

Modified: plog/trunk/class/dao/blogs.class.php
===================================================================
--- plog/trunk/class/dao/blogs.class.php	2006-01-12 22:45:38 UTC (rev 2779)
+++ plog/trunk/class/dao/blogs.class.php	2006-01-12 22:52:45 UTC (rev 2780)
@@ -298,6 +298,8 @@
 			$blogInfo->setTotalComments( $row['num_comments'] );
 			// mangled blog
 			$blogInfo->setMangledBlogName( $row['mangled_blog'] );
+			// show in summary or not
+			$blogInfo->setShowInSummary( $row['show_in_summary'] );
 
             return $blogInfo;
         }

Modified: plog/trunk/class/view/admin/adminblogsettingsview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminblogsettingsview.class.php	2006-01-12 22:45:38 UTC (rev 2779)
+++ plog/trunk/class/view/admin/adminblogsettingsview.class.php	2006-01-12 22:52:45 UTC (rev 2780)
@@ -35,6 +35,7 @@
 			$this->setValue( "blogEnableAutosaveDrafts", $blogSettings->getValue( "new_drafts_autosave_enabled" ));
 			$this->setValue( "blogCommentsOrder", $blogSettings->getValue( "comments_order" ));
 			$this->setValue( "blogCategory", $this->_blogInfo->getBlogCategoryId());
+			$this->setValue( "blogShowInSummary", $this->_blogInfo->getShowInSummary());
 		}
 		
 		function render()

Modified: plog/trunk/locale/locale_en_UK.php
===================================================================
--- plog/trunk/locale/locale_en_UK.php	2006-01-12 22:45:38 UTC (rev 2779)
+++ plog/trunk/locale/locale_en_UK.php	2006-01-12 22:52:45 UTC (rev 2780)
@@ -966,5 +966,8 @@
 $messages['editUser'] = 'Edit User';
 $messages['help_urlize_word_separator'] = 'Character that will be used as the word separator when generating URLs pointing to LifeType pages. This will also be used when generating hostnames from blog names if support for subdomains is activated. [Default = _]';
 $messages['help_summary_template_cache_lifetime'] = 'Life time in seconds of the summary cached pages. If set to something else than \'0\' the summary pages will be kept for as long as indicated here insted of being refreshed every time data changes. [Default = 0]';
-
+$messages['register_default_album_name'] = 'General';
+$messages['register_default_album_description'] = 'Use this album to upload new pictures.';
+$messages['show_in_summary'] = 'Show in Summary';
+$messages['show_in_summary_help'] = 'Include this blog in the summary page of this site.';
 ?>
\ No newline at end of file

Modified: plog/trunk/templates/admin/blogsettings.template
===================================================================
--- plog/trunk/templates/admin/blogsettings.template	2006-01-12 22:45:38 UTC (rev 2779)
+++ plog/trunk/templates/admin/blogsettings.template	2006-01-12 22:52:45 UTC (rev 2780)
@@ -122,6 +122,14 @@
 	    {$locale->tr("show_future_posts_help")}
 	  </div>
     </div>
+	
+     <div class="field">
+      <label for="blogShowInSummary">{$locale->tr("show_in_summary")}</label>
+      <div class="formHelp">
+        <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 class="field">
      <label for="blogCommentsOrder">{$locale->tr("comments_order")}</label>



More information about the pLog-svn mailing list