[pLog-svn] r4091 - in plog/trunk: . class/action class/action/admin class/dao class/data class/gallery/dao class/gallery/resizers class/net/xmlrpc class/summary/action class/summary/dao class/summary/view class/test class/test/helpers class/test/tests class/test/tests/dao class/test/tests/data class/test/tests/net/xmlrpc class/test/tests/ui js/tinymce js/tinymce/plugins js/tinymce/plugins/insertvideo js/tinymce/plugins/insertvideo/css js/tinymce/plugins/insertvideo/images locale templates/admin/chooser templates/standard templates/summary

mark at devel.lifetype.net mark at devel.lifetype.net
Thu Oct 5 18:06:54 GMT 2006


Author: mark
Date: 2006-10-05 18:06:53 +0000 (Thu, 05 Oct 2006)
New Revision: 4091

Added:
   plog/trunk/class/test/helpers/consolereporter.class.php
   plog/trunk/class/test/helpers/uiscriptrunner.class.php
   plog/trunk/class/test/tests/ui/
   plog/trunk/class/test/tests/ui/articlecategoriesui_test.class.php
   plog/trunk/class/test/tests/ui/login_test.class.php
   plog/trunk/js/tinymce/plugins/insertvideo/
   plog/trunk/js/tinymce/plugins/insertvideo/css/
   plog/trunk/js/tinymce/plugins/insertvideo/css/content.css
   plog/trunk/js/tinymce/plugins/insertvideo/css/flash.css
   plog/trunk/js/tinymce/plugins/insertvideo/editor_plugin.js
   plog/trunk/js/tinymce/plugins/insertvideo/functions.js
   plog/trunk/js/tinymce/plugins/insertvideo/images/
   plog/trunk/js/tinymce/plugins/insertvideo/images/gvideo.png
   plog/trunk/js/tinymce/plugins/insertvideo/images/youtube.png
   plog/trunk/js/tinymce/plugins/insertvideo/videoinput.html
Removed:
   plog/trunk/class/test/tests/ui/articlecategoriesui_test.class.php
   plog/trunk/class/test/tests/ui/login_test.class.php
   plog/trunk/js/tinymce/plugins/insertvideo/css/
   plog/trunk/js/tinymce/plugins/insertvideo/css/content.css
   plog/trunk/js/tinymce/plugins/insertvideo/css/flash.css
   plog/trunk/js/tinymce/plugins/insertvideo/editor_plugin.js
   plog/trunk/js/tinymce/plugins/insertvideo/functions.js
   plog/trunk/js/tinymce/plugins/insertvideo/images/
   plog/trunk/js/tinymce/plugins/insertvideo/images/gvideo.png
   plog/trunk/js/tinymce/plugins/insertvideo/images/youtube.png
   plog/trunk/js/tinymce/plugins/insertvideo/videoinput.html
Modified:
   plog/trunk/class/action/admin/adminupdateblogsettingsaction.class.php
   plog/trunk/class/action/admin/adminupdateeditblogaction.class.php
   plog/trunk/class/action/resourceserveraction.class.php
   plog/trunk/class/dao/bloginfo.class.php
   plog/trunk/class/dao/blogs.class.php
   plog/trunk/class/data/textfilter.class.php
   plog/trunk/class/gallery/dao/galleryresources.class.php
   plog/trunk/class/gallery/resizers/gallerythumbnailgenerator.class.php
   plog/trunk/class/net/xmlrpc/xmlrpcserver.class.php
   plog/trunk/class/summary/action/summaryrssaction.class.php
   plog/trunk/class/summary/dao/summarystats.class.php
   plog/trunk/class/summary/dao/summarystatsconstants.class.php
   plog/trunk/class/summary/view/summarybloglistview.class.php
   plog/trunk/class/summary/view/summarypostlistview.class.php
   plog/trunk/class/test/helpers/lifetypetestcase.class.php
   plog/trunk/class/test/helpers/testtools.class.php
   plog/trunk/class/test/testrunner.class.php
   plog/trunk/class/test/tests/dao/article_test.class.php
   plog/trunk/class/test/tests/dao/bloginfo_test.class.php
   plog/trunk/class/test/tests/dao/blogs_test.class.php
   plog/trunk/class/test/tests/data/textfilter_test.class.php
   plog/trunk/class/test/tests/net/xmlrpc/xmlrpcserver_test.class.php
   plog/trunk/js/tinymce/tiny_mce-plog.js
   plog/trunk/locale/locale_en_UK.php
   plog/trunk/locale/locale_es_ES.php
   plog/trunk/locale/locale_fr_FR.php
   plog/trunk/runtests.php
   plog/trunk/templates/admin/chooser/siteuserschooser.template
   plog/trunk/templates/standard/links.template
   plog/trunk/templates/summary/blog.template
   plog/trunk/templates/summary/blogslist.template
   plog/trunk/templates/summary/post.template
   plog/trunk/templates/summary/postslist.template
   plog/trunk/templates/summary/searchresults.template
   plog/trunk/wizard.php
Log:
Merge from lifetype branch 1.1.1 4032:4088

Modified: plog/trunk/class/action/admin/adminupdateblogsettingsaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminupdateblogsettingsaction.class.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/class/action/admin/adminupdateblogsettingsaction.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -93,7 +93,7 @@
             $this->_blogInfo->setTemplate( $this->_request->getValue( "blogTemplate" ));
 			$this->_blogInfo->setProperties( $this->_request->getValue( "properties" ));
 			$this->_blogInfo->setBlogCategoryId( $this->_request->getValue( "blogCategory" ));
-			$this->_blogInfo->setMangledBlogName( $this->_blogInfo->getBlog());
+			$this->_blogInfo->setMangledBlogName( $this->_blogInfo->getBlog(), true );
 			$this->_blogInfo->setShowInSummary( Textfilter::checkboxToBoolean( $this->_request->getValue( "blogShowInSummary" )));
 			
             // check to see whether we are going to save subdomain information			

Modified: plog/trunk/class/action/admin/adminupdateeditblogaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminupdateeditblogaction.class.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/class/action/admin/adminupdateeditblogaction.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -113,7 +113,7 @@
 			$blogInfo->setProperties( $this->_blogProperties );
             $blogInfo->setOwner( $this->_blogOwner );
 			$blogInfo->setStatus( $this->_blogStatus );
-            $blogInfo->setMangledBlogName( Textfilter::urlize( $blogInfo->getBlog()));
+            $blogInfo->setMangledBlogName( $blogInfo->getBlog(), true );
 
             // check to see whether we are going to save subdomain information			
             if( Subdomains::getSubdomainsEnabled()) {

Modified: plog/trunk/class/action/resourceserveraction.class.php
===================================================================
--- plog/trunk/class/action/resourceserveraction.class.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/class/action/resourceserveraction.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -80,6 +80,7 @@
             	// check if there was a user parameter
                 if( !empty($userName) ) {
                 	// if so, check to which blogs the user belongs
+					include_once( PLOG_CLASS_PATH."class/dao/users.class.php" );
                 	$users = new Users();
                  	$userInfo = $users->getUserInfoFromUsername( $userName );
                     // if the user exists and is valid...
@@ -109,6 +110,7 @@
             }
 			
             // fetch the BlogInfo object
+			include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
             $blogs = new Blogs();
             if( $blogId )
                 $this->_blogInfo = $blogs->getBlogInfo( $blogId );

Modified: plog/trunk/class/dao/bloginfo.class.php
===================================================================
--- plog/trunk/class/dao/bloginfo.class.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/class/dao/bloginfo.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -609,10 +609,13 @@
 		 *
 		 * @param mangledBlog the new mangled blog name
 		 */
-		function setMangledBlogName( $mangledBlog )
+		function setMangledBlogName( $mangledBlog, $modify = false )
 		{
-	        lt_include( PLOG_CLASS_PATH."class/data/textfilter.class.php" );			
-	        $this->_mangledBlog = Textfilter::domainize( $mangledBlog );
+			if( $modify ) {
+	        	lt_include( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
+				$mangledBlog = Textfilter::domainize( $mangledBlog );
+			}
+			$this->_mangledBlog = $mangledBlog;
 		}
 		
 		/**
@@ -622,8 +625,8 @@
 		{
 	        // fill in the field if it hasn't been filled yet
 	        if( $this->_mangledBlog === null ) {
-	        	lt_include( PLOG_CLASS_PATH."class/data/textfilter.class.php" );		
-	        	$this->_mangledBlog = Textfilter::domainize( $this->getBlog());	
+	        	lt_include( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
+				$this->setMangledBlogName( $this->getBlog(), true );
 			}
 	        	
 	    	return( $this->_mangledBlog );  
@@ -695,4 +698,4 @@
 			return( parent::__sleep());
 		}
 	}
-?>
\ No newline at end of file
+?>

Modified: plog/trunk/class/dao/blogs.class.php
===================================================================
--- plog/trunk/class/dao/blogs.class.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/class/dao/blogs.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -408,7 +408,7 @@
 			$blogInfo->setTotalTrackbacks( $row['num_trackbacks'] );
 			$blogInfo->setTotalComments( $row['num_comments'] );
 			// mangled blog
-			$blogInfo->setMangledBlogName( $row['mangled_blog'] );
+			$blogInfo->setMangledBlogName( $row['mangled_blog'], false );
 			$blogInfo->setCustomDomain( $row['custom_domain'] );
             // show in summary or not
 			$blogInfo->setShowInSummary( $row['show_in_summary'] );

Modified: plog/trunk/class/data/textfilter.class.php
===================================================================
--- plog/trunk/class/data/textfilter.class.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/class/data/textfilter.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -424,16 +424,8 @@
             return $string;            
         }
 		
-
         /** 
          * Given a string, convert it into something that can be used in the domain part of a URL
-         *    change spaces and underscores to hyphens - then call our regular urlize function for
-         *    the rest.
-         *
-         * @param string The string that we wish to convert into something that can be used as a URL
-         */
-        /** 
-         * Given a string, convert it into something that can be used in the domain part of a URL
          * (it probably doesn't work very
          * well with non iso-8859-X strings) It will remove the following characters:
          *
@@ -445,6 +437,7 @@
          * or replaced will be thrown away.
          *
          * @param string The string that we wish to convert into something that can be used as a URL
+ 	     * @static
          */
         function domainize( $string )
         {
@@ -454,15 +447,19 @@
             // removing a set of reserved characters (rfc2396: ; / ? : @ & = + $ ,)
             $string = str_replace(array(';','/','?',':','@','&','=','+','$',','), '', $string);
 
+            include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
+			$config =& Config::getConfig();
+            $sep = $config->getValue( "urlize_word_separator", URLIZE_WORD_SEPARATOR_DEFAULT );
+
             // replace some characters to similar ones
             // underscores aren't allowed in domain names according to rfc specs, and
             // cause trouble in some browsers, particularly with cookies.
-            $search  = array('_',' ','ä','ö','ü','é','è','à','ç','à','è','ì','ò','ù','á','é','í','ó','ú','ë','ï');
-            $replace = array('-','-','a','o','u','e','e','a','c','a','e','i','o','u','a','e','i','o','u','e','i');
+            $search  = array('-', '_',' ', '.', 'ä','ö','ü','é','è','à','ç','à','è','ì','ò','ù','á','é','í','ó','ú','ë','ï' );
+            $replace = array( $sep, $sep, $sep, $sep, 'a','o','u','e','e','a','c','a','e','i','o','u','a','e','i','o','u','e','i' );
             $string = str_replace($search, $replace, $string);
 
             // and everything that is still left that hasn't been replaced/encoded, throw it away
-            $string = preg_replace( '/[^a-z0-9.-]/', '', $string );
+            $string = preg_replace( "/[^a-z0-9".$sep."]/", '', $string );
             $string = trim($string, "-.");
 
             return $string;            

Modified: plog/trunk/class/gallery/dao/galleryresources.class.php
===================================================================
--- plog/trunk/class/gallery/dao/galleryresources.class.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/class/gallery/dao/galleryresources.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -106,7 +106,7 @@
 			$id = $resource->getId();
 			$query = "SELECT id, owner_id, album_id, description,
         	                 date, flags, resource_type, file_path, file_name,
-        	                 metadata, thumbnail_format 
+        	                 metadata, thumbnail_format, properties
         	          FROM {$prefix}gallery_resources 
 			          WHERE album_id = '$albumId' AND date >= '$date' AND id > $id
 					  ORDER BY date ASC,id ASC LIMIT 1";
@@ -146,7 +146,7 @@
 			$id = $resource->getId();
 			$query = "SELECT id, owner_id, album_id, description,
         	                 date, flags, resource_type, file_path, file_name,
-        	                 metadata, thumbnail_format 
+        	                 metadata, thumbnail_format, properties
         	          FROM {$prefix}gallery_resources 
 			          WHERE album_id = '$albumId' AND date <= '$date' AND id < $id
 					  ORDER BY date DESC,id DESC LIMIT 1";
@@ -474,19 +474,19 @@
             	
             	$imgWidth = $info["video"]["resolution_x"];
             	$imgHeight = $info["video"]["resolution_y"];
-            	
+	
 				$previewHeight = $config->getValue( "thumbnail_height", GALLERY_DEFAULT_THUMBNAIL_HEIGHT );
-				$previewWidth  = $config->getValue( "thumbnail_width", GALLERY_DEFAULT_THUMBNAIL_WIDTH );				
-				$imgHeight > $previewHeight ? $previewHeight = GALLERY_DEFAULT_THUMBNAIL_HEIGHT : $previewHeight = $imgHeight;
-				$imgWidth > $previewWidth ? $previewWidth = GALLERY_DEFAULT_THUMBNAIL_HEIGHT : $previewWidth = $imgWidth;
-                GalleryThumbnailGenerator::generateResourceThumbnail( $resFile, $resourceId, $ownerId, $previewHeight, $previewWidth );                
+				$previewWidth  = $config->getValue( "thumbnail_width", GALLERY_DEFAULT_THUMBNAIL_WIDTH );
+				$thumbHeight = ( $imgHeight > $previewHeight ? $previewHeight : $imgHeight );
+				$thumbWidth = ( $imgWidth > $previewWidth ? $previewWidth : $imgWidth );
+                GalleryThumbnailGenerator::generateResourceThumbnail( $resFile, $resourceId, $ownerId, $thumbHeight, $thumbWidth );                
 
 				$medPreviewHeight = $config->getValue( "medium_size_thumbnail_height", GALLERY_DEFAULT_MEDIUM_SIZE_THUMBNAIL_HEIGHT );
 				$medPreviewWidth  = $config->getValue( "medium_size_thumbnail_width", GALLERY_DEFAULT_MEDIUM_SIZE_THUMBNAIL_WIDTH );
-				$imgHeight > $medPreviewHeight ? $medPreviewHeight = GALLERY_DEFAULT_MEDIUM_SIZE_THUMBNAIL_HEIGHT : $medPreviewHeight = $imgHeight;
-				$imgWidth > $medPreviewWidth ? $medPreviewWidth = GALLERY_DEFAULT_MEDIUM_SIZE_THUMBNAIL_WIDTH : $medPreviewWidth = $imgWidth;				
-				GalleryThumbnailGenerator::generateResourceMediumSizeThumbnail( $resFile, $resourceId, $ownerId, $medPreviewHeight, $medPreviewWidth );
-				
+				$thumbHeight = ( $imgHeight > $medPreviewHeight ? $medPreviewHeight : $imgHeight );
+				$thumbWidth = ( $imgWidth > $medPreviewWidth ? $medPreviewWidth : $imgWidth );				
+				GalleryThumbnailGenerator::generateResourceMediumSizeThumbnail( $resFile, $resourceId, $ownerId, $thumbHeight, $thumbWidth );
+
 				// call this method only if the settings are right and the image is bigger than the final size(s)
 				$finalPreviewHeight = $config->getValue( "final_size_thumbnail_height", 0 );
 				$finalPreviewWidth  = $config->getValue( "final_size_thumbnail_width", 0 );

Modified: plog/trunk/class/gallery/resizers/gallerythumbnailgenerator.class.php
===================================================================
--- plog/trunk/class/gallery/resizers/gallerythumbnailgenerator.class.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/class/gallery/resizers/gallerythumbnailgenerator.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -14,8 +14,8 @@
 		 * @static
 		 */
 		function generateResourceThumbnail( $resFile, $resourceId, $ownerId,
-			                                $previewHeight = GALLERY_DEFAULT_MEDIUM_SIZE_THUMBNAIL_HEIGHT,				
-                                            $previewWidth = GALLERY_DEFAULT_MEDIUM_SIZE_THUMBNAIL_WIDTH )			
+			                                $previewHeight = GALLERY_DEFAULT_THUMBNAIL_HEIGHT,
+                                            $previewWidth = GALLERY_DEFAULT_THUMBNAIL_WIDTH )	
 		{
 			// get some configuration settings regarding the size of the
 			// thumbnails, and also the default format for thumbnails

Modified: plog/trunk/class/net/xmlrpc/xmlrpcserver.class.php
===================================================================
--- plog/trunk/class/net/xmlrpc/xmlrpcserver.class.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/class/net/xmlrpc/xmlrpcserver.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -36,7 +36,11 @@
 			            "metaWeblog.getPost"        => "this:metaWeblogGetPost",
 			            "metaWeblog.getRecentPosts" => "this:metaWeblogGetRecentPosts",
 			            "metaWeblog.getCategories"  => "this:metaWeblogGetCategories",
-			            "metaWeblog.newMediaObject" => "this:metaWeblogNewMediaObject"			
+			            "metaWeblog.newMediaObject" => "this:metaWeblogNewMediaObject",	
+			            "mt.getCategoryList"        => "this:mtGetCategoryList",
+			            "mt.supportedTextFilters"   => "this:mtSupportedTextFilters",
+			            "mt.getPostCategories"      => "this:mtGetPostCategories",
+			            "mt.setPostCategories"      => "this:mtSetPostCategories"
 			    	    ));
 			} 
 			else {
@@ -206,7 +210,20 @@
                 //}
                 
                 $title = $content["title"];
-                $body = $content["description"];
+                
+                // Check to see if the MovableType extnensions have been added
+	            $mt_excerpt = $content["mt_excerpt"]; 
+	            $mt_text_more = $content["mt_text_more"]; 
+	            $mt_allow_comments = $content["mt_allow_comments"]; 
+                
+                if ( $mt_text_more != NULL && trim($mt_text_more != ""))
+                {
+                    $body = $content["description"] . POST_EXTENDED_TEXT_MODIFIER . $mt_text_more;
+                }
+                else
+                {
+                    $body = $content["description"];
+                }
                 $catList = $content["categories"];
                 $categoryName = NULL;
     
@@ -242,6 +259,16 @@
     
                 $userInfo = $users->getUserInfoFromUsername( $username );
                 
+                // Initially assume that comments are enabled
+                $enableComments = true;
+                
+                // Was a setting specified in the MovableType fields?
+                if ($mt_allow_comments != NULL)
+                {
+                    $enableComments = $mt_allow_comments;
+                }
+                
+                
                 $article = new Article(
                     $title,
                     $body, // text
@@ -250,7 +277,7 @@
                     $blogid, // blogid
                     $status,
                     0, // numread
-                    Array( "comments_enabled" => true ) // enable comments
+                    Array( "comments_enabled" => $enableComments ) 
                 );
     
                $dateCreated = $content['dateCreated'];
@@ -375,6 +402,46 @@
 	        }
 	    }
 
+	    function mtGetCategoryList($args)
+	    {
+			$users = new Users();
+			$category = new ArticleCategories();
+			$blogsG = new Blogs();
+	
+	        $blogid     = $args[0];
+	        $username   = $args[1];
+	        $password   = $args[2];
+
+	        $auth = $users->authenticateUser( $username, $password );
+
+	        if ($auth)
+	        {
+                $blogInfo = $blogsG->getBlogInfo( $blogid );
+				if( !$blogInfo ) {
+					return new IXR_Error(-1, 'Incorrect blog id');
+				}
+		
+	            $cats = $category->getBlogCategories($blogid);
+				$url = $blogInfo->getBlogRequestGenerator();
+	            $ret = array();	
+	            foreach($cats as $cat)
+	            {
+	                $dummy                   = array();
+	                $dummy["categoryId"]     = $cat->getId();
+	                $dummy["categoryName"]   = $cat->getName();
+
+	                $ret[]                   = $dummy;
+	            }
+	
+				$this->setResponseCharset( $blogInfo );
+	
+	            return $ret;
+	        } else
+	        {
+	            return new IXR_Error(-1, 'You did not provide the correct password');
+	        }
+	    }
+
 	    function getPost($args)
 	    {
 			$users = new Users();
@@ -466,7 +533,18 @@
 	            $dummy["userid"]        = $userInfo->getId();
 	            $dummy["dateCreated"]   = new IXR_Date($time);
 	            $dummy["title"]         = $item->getTopic();
-	            $dummy["description"]   = $item->getText(false); 
+
+                $blogSettings = $blogInfo->getSettings();
+                
+                $useMovableType = $blogSettings->getValue( "xmlrpc_movabletype_enabled" );
+	            if ( $useMovableType ) 
+	            {
+                    $dummy["description"]   = $item->getIntroText(); 
+	            }
+	            else
+	            {
+                    $dummy["description"]   = $item->getText(false); 
+	            }
 	            $dummy["postid"]        = $item->getId();
 
 	            $dummy["link"]          = $url->postLink( $item );
@@ -477,6 +555,11 @@
 	                $catArray[]             = $category->getName();
 	            }
 	            $dummy["categories"]      = $catArray;
+
+	            // The MovableType Extensions
+	            $dummy["mt_text_more"]       = $item->getExtendedText(); 
+	            $dummy["mt_allow_comments"]  = $item->getCommentsEnabled(); 
+	            
 	
 				$this->setResponseCharset( $blogInfo );
 	
@@ -594,8 +677,21 @@
 	                $status = POST_STATUS_DRAFT;
 	            }            
 
-	            $title = $content["title"];
-	            $body = $content["description"];
+                $title = $content["title"];
+                
+                // Check to see if the MovableType extnensions have been added
+	            $mt_excerpt = $content["mt_excerpt"]; 
+	            $mt_text_more = $content["mt_text_more"]; 
+	            $mt_allow_comments = $content["mt_allow_comments"]; 
+                
+                if ( $mt_text_more != NULL && trim($mt_text_more) != "")
+                {
+                    $body = $content["description"] . POST_EXTENDED_TEXT_MODIFIER . $mt_text_more;
+                }
+                else
+                {
+                    $body = $content["description"];
+                }
 
 	            $article = $articles->getBlogArticle($postid,
 	                                                 -1, // blogId
@@ -624,17 +720,21 @@
 	                        }
 	                    }
 	                }
+                    $article->setCategoryIds( $categories );
 	            }
-	            else {
+	            else if ( count($article->getCategories()) == 0) {
+                    // Only assign a new category if there isn't one   
+                    
 	                // if no category, let's pick a random one
 	                $blogCategory = array_pop( $cats );
 	                $categories[] = $blogCategory->getId();
+	                
+                    $article->setCategoryIds( $categories );
 	            }
 
 	            $article->setText($body);
 	            $article->setTopic($title);
 	            $article->setStatus($status);
-	            $article->setCategoryIds( $categories );
 
 				// Get the plugin manager
 				$plugMgr =& PluginManager::getPluginManager();
@@ -693,6 +793,9 @@
 				// Send the EVENT_PRE_POST_DELETE message
 				$plugMgr->notifyEvent( EVENT_PRE_POST_DELETE, Array( "article" => &$article ));            
 
+	    		$blogid = $article->getBlog();
+	        	$blogInfo = $article->getBlogInfo();
+
 	            $articles->deleteArticle(
 	                $postid,
 	                $userInfo->getId(), // userid
@@ -702,10 +805,8 @@
 	            // Send the EVENT_POST_POST_DELETE messages to the plugins
 	            $plugMgr->notifyEvent( EVENT_POST_POST_DELETE, Array( "article" => &$article ));				
 
-	    		$blogid = $article->getBlog();
 	    		CacheControl::resetBlogCache( $blogid );
 
-	        	$blogInfo = $article->getBlogInfo();
 				$this->setResponseCharset( $blogInfo );
 
 	            return true;
@@ -797,6 +898,14 @@
 	                -1  // category id
 	            );
 
+	            $blogs = new Blogs();
+	            $blogInfo = $blogs->getBlogInfo( $blogid );
+                $url = $blogInfo->getBlogRequestGenerator();
+
+                $blogSettings = $blogInfo->getSettings();
+
+                $useMovableType = $blogSettings->getValue( "xmlrpc_movabletype_enabled" );
+
 	            foreach($list as $item)
 	            {
 	                $dateObject = $item->getDateObject();
@@ -811,17 +920,30 @@
 	                $dummy["userid"]        = $userInfo->getId();
 	                $dummy["dateCreated"]   = new IXR_Date($time);
 	                $dummy["title"]         = $item->getTopic(); 
-	                $dummy["description"]   = $item->getText(false);
+
+                    if ( $useMovableType ) 
+                    {
+                        $dummy["description"]   = $item->getIntroText(); 
+                    }
+                    else
+                    {
+                        $dummy["description"]   = $item->getText(false); 
+                    }
 	                $dummy["postid"]        = $item->getId();
 
-	                $blogInfo = $item->getBlogInfo();
-	                $url = $blogInfo->getBlogRequestGenerator();
 	                $dummy["link"]          = $url->postLink( $item );
 	                $dummy["permaLink"]     = $url->postPermalink( $item );
 
 	                $catArray               = array();
-	                $catArray[]             = $articleCat->getName();
-	                $dummy["categories"]      = $catArray;
+                    foreach( $item->getCategories() as $category ) {
+                        $catArray[]             = $category->getName();
+                    }
+                    $dummy["categories"]      = $catArray;
+
+                    // The MovableType Extensions
+                    $dummy["mt_text_more"]       = $item->getExtendedText(); 
+                    $dummy["mt_allow_comments"]  = $item->getCommentsEnabled(); 
+	            
 	
 					$this->setResponseCharset( $blogInfo );
 
@@ -993,5 +1115,127 @@
 	            return new IXR_Error(-1, 'You did not provide the correct password');
 	        }
 	    }	
+	    
+	    function mtSupportedTextFilters($args)
+	    {
+            $ret = array();
+
+            return $ret;
+	    }
+	    
+	    function mtGetPostCategories($args)
+	    {
+	        $users = new Users();
+			$articles = new Articles();
+	
+	        $postid     = $args[0];
+	        $username   = $args[1];
+	        $password   = $args[2];
+
+	        $auth = $users->authenticateUser($username,$password);
+
+	        if ($auth)
+	        {
+	            include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
+
+	            $userInfo = $users->getUserInfoFromUsername( $username );
+
+	            $item = $articles->getBlogArticle($postid,
+	                                              -1, // blogId
+	                                              true, // includeHiddenFields
+	                                              -1, // date
+	                                              -1, // categoryId
+	                                              $userInfo->getId());
+
+	            $blogId = $item->getBlog();
+	            $blogs = new Blogs();
+	            $blogInfo = $blogs->getBlogInfo( $blogId );
+
+	            $catArray               = array();
+	            foreach( $item->getCategories() as $category ) {
+   	                $dummy                   = array();
+	                $dummy["categoryId"]     = $category->getId();
+	                $dummy["categoryName"]   = $category->getName();
+
+	                $catArray[]              = $dummy;
+
+	            }
+	
+				$this->setResponseCharset( $blogInfo );
+	
+	            return $catArray;
+	        } else
+	        {
+	            return new IXR_Error(-1, 'You did not provide the correct password');
+	        }
+	    }
+	    
+        function mtSetPostCategories($args)
+	    {
+	        $users = new Users();
+			$articles = new Articles();
+	
+	        $postid     = $args[0];
+	        $username   = $args[1];
+	        $password   = $args[2];
+	        $categories = $args[3];
+
+	        $auth = $users->authenticateUser($username,$password);
+
+	        if ($auth)
+	        {
+	            include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
+
+	            $userInfo = $users->getUserInfoFromUsername( $username );
+
+	            $article = $articles->getBlogArticle($postid,
+	                                              -1, // blogId
+	                                              true, // includeHiddenFields
+	                                              -1, // date
+	                                              -1, // categoryId
+	                                              $userInfo->getId());
+
+	            $blogId = $article->getBlog();
+	            $blogInfo = $article->getBlogInfo();
+
+                $articleCategories = new ArticleCategories();
+
+
+	            $catArray      = Array();
+
+	            if ( $categories != NULL )
+	            {
+                    foreach( $categories as $category ) {
+                       // Get the category object for the category
+                       $catArray[] = $category["categoryId"];
+                    }
+                }
+	            
+	            $article->setCategoryIds($catArray);
+	
+				// Get the plugin manager
+				$plugMgr =& PluginManager::getPluginManager();
+				$plugMgr->setBlogInfo( $blogInfo );
+				$plugMgr->setUserInfo( $userInfo );
+				$plugMgr->loadPlugins();
+				// Send the EVENT_PRE_POST_UPDATE message
+				$plugMgr->notifyEvent( EVENT_PRE_POST_UPDATE, Array( "article" => &$article ));            
+
+	            $articles->updateArticle($article);
+
+	            // Send the EVENT_POST_POST_UPDATE messages to the plugins
+	            $plugMgr->notifyEvent( EVENT_POST_POST_UPDATE, Array( "article" => &$article ));				
+
+	    		CacheControl::resetBlogCache( $blogId );            
+	
+				$this->setResponseCharset( $blogInfo );
+	
+	            return true;
+	        } else
+	        {
+	            return new IXR_Error(-1, 'You did not provide the correct password');
+	        }
+	    }
+
 	}
 ?>
\ No newline at end of file

Modified: plog/trunk/class/summary/action/summaryrssaction.class.php
===================================================================
--- plog/trunk/class/summary/action/summaryrssaction.class.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/class/summary/action/summaryrssaction.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -99,7 +99,7 @@
 					if( empty($currentGlobalArticleCategory) )
 						$globalArticleCategoryId = ALL_GLOBAL_ARTICLE_CATEGORIES;
 						
-					$postslist = $stats->getRecentPostsByGlobalCategory( $globalArticleCategoryId,
+					$postslist = $stats->getPostsByGlobalCategory( $globalArticleCategoryId,
         										 					 $page = 1, 
         										 					 $summaryItemsPerPage );
 				}				

Modified: plog/trunk/class/summary/dao/summarystats.class.php
===================================================================
--- plog/trunk/class/summary/dao/summarystats.class.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/class/summary/dao/summarystats.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -179,7 +179,7 @@
 			lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
 		 
 			$prefix = $this->getPrefix();
-            $query = "SELECT COUNT(a.id) as t, SUM((num_reads / (TO_DAYS(NOW()) - TO_DAYS(a.date) + 1)) ) as rank, b.*
+            $query = "SELECT COUNT(a.id) as t, SUM((num_reads / (TO_DAYS(NOW()) - TO_DAYS(a.date) + 1)) ) as rank, b.id AS blog_id
                       FROM {$prefix}articles AS a
                       INNER JOIN {$prefix}blogs AS b 
                       ON b.id = a.blog_id AND b.status = ".BLOG_STATUS_ACTIVE."
@@ -203,7 +203,7 @@
             $blogs = Array();
 			$blogsDao = new Blogs();
             while( $row = $result->FetchRow()) {
-                $blog = $blogsDao->mapRow( $row );
+                $blog = $blogsDao->getBlogInfo( $row["blog_id"] );
                 $blogs[$blog->getId()] = $blog;
             }
             
@@ -226,7 +226,7 @@
 
 			$prefix = $this->getPrefix();
 
-			$query = "SELECT a.*
+			$query = "SELECT a.id AS id, a.blog_id AS blog_id
 					  FROM {$prefix}articles a, 
 					       {$prefix}blogs b
 					  WHERE a.date >= ".$this->_startTime." AND a.date <= ".$this->_now."
@@ -242,9 +242,15 @@
 			$query .= " ORDER BY a.date DESC";
 
             if( $maxPosts <= 0 )
-            	$maxPosts = $this->_summaryPageShowMax;            	
-            $query .= " LIMIT 0,".$maxPosts;
+            	$maxPosts = $this->_summaryPageShowMax;
 
+		// the multiplier here isn't a very elegant solution but what we're trying to avoid
+		// here is a situation where if the limit is '10', then a blog posting 10 articles in one
+		// go would use all these 10 'slots' in the result set. Then when the list of posts is 
+		// post-processed, there would only be one article left... which is definitely not
+		// what we'd like
+            $query .= " LIMIT 0,".$maxPosts * 15;
+
             $result = $this->Execute( $query );
 
             if( !$result )
@@ -259,7 +265,7 @@
                 if (!in_array($row["blog_id"], $blogs))
                 {
                     $blogs[] = $row["blog_id"];
-                    array_push( $posts, $articles->mapRow($row) );
+                    array_push( $posts, $articles->getArticle($row["id"]) );
                     $i++;
                 }
             }
@@ -269,7 +275,7 @@
             return $posts;
         }
 
-        function getRecentPostsByGlobalCategory( $globaArticleCategoryId = ALL_GLOBAL_ARTICLE_CATEGORIES, 
+        function getPostsByGlobalCategory( $globaArticleCategoryId = ALL_GLOBAL_ARTICLE_CATEGORIES, 
         										 $page = -1, 
         										 $itemsPerPage = SUMMARY_DEFAULT_ITEMS_PER_PAGE )
         {
@@ -277,10 +283,10 @@
 
 			$prefix = $this->getPrefix();
 
-			$query = "SELECT a.id as id, MAX(a.date) as date
+			$query = "SELECT a.id AS id
 					  FROM {$prefix}articles a, 
 					       {$prefix}blogs b
-					  WHERE a.date >= ".$this->_startTime." AND a.date <= ".$this->_now."
+					  WHERE a.date <= ".$this->_now."
 					        AND a.blog_id = b.id
 					        AND b.status = ".BLOG_STATUS_ACTIVE."
 					        AND a.status = ".POST_STATUS_PUBLISHED."
@@ -290,7 +296,7 @@
 			if($globaArticleCategoryId != ALL_GLOBAL_ARTICLE_CATEGORIES)
 				$query .= " AND a.global_category_id = '".Db::qstr($globaArticleCategoryId)."'";				
 
-			$query .= " GROUP BY a.blog_id ORDER BY a.date DESC";
+			$query .= " ORDER BY a.date DESC";
 
             $result = $this->Execute( $query, $page, $itemsPerPage );
             
@@ -300,7 +306,9 @@
             $posts = Array();
 			$articles = new Articles();
             while( $row = $result->FetchRow() ) {
-                array_push( $posts, $articles->getArticle($row["id"]) );
+		// if we call Articles::getArticle() we'll be using the cached data
+		// if it was already there, instead of mapping the whole row here
+                array_push( $posts, $articles->getArticle( $row["id"] ));
             }
 
             $result->Close();
@@ -308,17 +316,15 @@
             return $posts;
         }
 
-        function getNumRecentPostsByGlobalCategory( $globaArticleCategoryId = ALL_GLOBAL_ARTICLE_CATEGORIES )
+        function getNumPostsByGlobalCategory( $globaArticleCategoryId = ALL_GLOBAL_ARTICLE_CATEGORIES )
         {
             lt_include( PLOG_CLASS_PATH."class/dao/articles.class.php" );
 
 			$prefix = $this->getPrefix();
 
-			$query = "SELECT a.*
-					  FROM {$prefix}articles a, 
-					       {$prefix}blogs b
-					  WHERE a.date >= ".$this->_startTime." AND a.date <= ".$this->_now."
-					        AND a.blog_id = b.id
+
+			$query =" a.date <= ".$this->_now."
+					       AND a.blog_id = b.id
 					        AND b.status = ".BLOG_STATUS_ACTIVE."
 					        AND a.status = ".POST_STATUS_PUBLISHED."
 							AND b.show_in_summary = '1'
@@ -327,19 +333,12 @@
 			if($globaArticleCategoryId != ALL_GLOBAL_ARTICLE_CATEGORIES)
 				$query .= " AND a.global_category_id = '".Db::qstr($globaArticleCategoryId)."'";				
 
-			$query .= " GROUP BY a.blog_id ORDER BY a.date DESC";
-            $result = $this->Execute( $query );
-            
-            if( !$result )
-                return 0;
-
-	        $count = $result->RowCount();
-
-            $result->Close();
-
-            return $count;
+            return( $this->getNumItems( "{$prefix}articles a, {$prefix}blogs b", $query, "a.id" ));
         }
 
+		/**
+		 * @private
+		 */
 		function getNow() 
 		{
 			lt_include( PLOG_CLASS_PATH.'class/data/timestamp.class.php' );
@@ -350,6 +349,9 @@
 			return $now;
 		}
 
+		/** 
+		 * @private
+		 */
 		function getStartTime( $duration ) 
 		{
 			lt_include( PLOG_CLASS_PATH.'class/data/timestamp.class.php' );

Modified: plog/trunk/class/summary/dao/summarystatsconstants.class.php
===================================================================
--- plog/trunk/class/summary/dao/summarystatsconstants.class.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/class/summary/dao/summarystatsconstants.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -7,7 +7,9 @@
 	define( "ALL_GLOBAL_ARTICLE_CATEGORIES", 0 );
 	
 	/**
-	 *
+	 * By default show posts from the last 30 days, but please edit this constant
+ 	 * should you wish to display older data. Just bear in mind that the bigger this
+ 	 * figure, the bigger the performance hit on your database will be.
 	 */
-	define( "SUMMARY_DEFAULT_TIME_FENCE", 7 );
+	define( "SUMMARY_DEFAULT_TIME_FENCE", 30 );
 ?>
\ No newline at end of file

Modified: plog/trunk/class/summary/view/summarybloglistview.class.php
===================================================================
--- plog/trunk/class/summary/view/summarybloglistview.class.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/class/summary/view/summarybloglistview.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -60,7 +60,7 @@
 			$blogCategoryId = $this->_params->getValue( "blogCategoryId" );
 			$currentBlogCategory = $categories->getBlogCategory( $blogCategoryId );
 			if( !$currentBlogCategory )
-				$blogCategoryId = ALL_BLOG_CATEGORIES;			
+				$blogCategoryId = ALL_BLOG_CATEGORIES;
 
 			// get the data itself
 			$blogs = new Blogs();						
@@ -73,7 +73,7 @@
             }
 			
 			// calculate the links to the different pages
-			$pager = new Pager( "?op=BlogList&amp;page=",
+			$pager = new Pager( "?op=BlogList&amp;blogCategoryId=".$blogCategoryId."&amp;page=",
 			                    $this->_page, 
 								$numBlogs, 
 								$this->_numBlogsPerPage );

Modified: plog/trunk/class/summary/view/summarypostlistview.class.php
===================================================================
--- plog/trunk/class/summary/view/summarypostlistview.class.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/class/summary/view/summarypostlistview.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -65,8 +65,8 @@
 
 			// get the data itself
 			$stats = new SummaryStats();
-            $posts = $stats->getRecentPostsByGlobalCategory( $globalArticleCategoryId, $this->_page, $this->_numArticlesPerPage );
-            $numPosts = $stats->getNumRecentPostsByGlobalCategory( $globalArticleCategoryId );
+            $posts = $stats->getPostsByGlobalCategory( $globalArticleCategoryId, $this->_page, $this->_numArticlesPerPage );
+            $numPosts = $stats->getNumPostsByGlobalCategory( $globalArticleCategoryId );
 			
             if( !$posts ) {
                 // if there was an error, show the error view
@@ -74,7 +74,7 @@
             }
 			
 			// calculate the links to the different pages
-			$pager = new Pager( "?op=PostList&amp;page=",
+			$pager = new Pager( "?op=PostList&amp;globalArticleCategoryId=".$globalArticleCategoryId."&amp;page=",
 			                    $this->_page, 
 								$numPosts, 
 								$this->_numArticlesPerPage );

Copied: plog/trunk/class/test/helpers/consolereporter.class.php (from rev 4088, plog/branches/lifetype-1.1.1/class/test/helpers/consolereporter.class.php)

Modified: plog/trunk/class/test/helpers/lifetypetestcase.class.php
===================================================================
--- plog/trunk/class/test/helpers/lifetypetestcase.class.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/class/test/helpers/lifetypetestcase.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -1,6 +1,7 @@
 <?php
 
 	lt_include( PLOG_CLASS_PATH."class/test/PHPUnit/TestCase.php");
+	lt_include( PLOG_CLASS_PATH."class/test/helpers/uiscriptrunner.class.php");	
 	lt_include( PLOG_CLASS_PATH."class/net/http/httpclient.class.php" );
 	
 	/**
@@ -16,6 +17,11 @@
 	 */
 	class LifeTypeTestCase extends PHPUnit_TestCase
 	{		
+		/** 
+		 * An HTTP client
+		 */
+		var $c;
+		
 		/**
 		 * makes the given HTTP request and checks that the HTTP response code
 		 * matches with the expected once
@@ -91,5 +97,63 @@
 		{
 			return( str_replace( "_test", "", get_class( $this )));
 		}
+
+		/**
+		 * Finds the expected string in the content of the response after fetching the given
+		 * url via a POST request
+		 *
+		 * @param url
+		 * @param form An array that will be used as the variables of the form to be POSTed
+		 * @param expected
+		 * @param message
+		 */
+		function assertHTTPPostResponseContains( $url, $form, $expected, $message = '' )
+		{			
+			// fetch the url
+			$c = new HTTPClient();
+			$result = $c->submit( $url, $form );
+			
+			$this->assertTrue( $result, "Could not fetch $url" );
+			
+			// see if the string we're looking for is in the contents of the page
+			if( !strstr( $c->results, $expected )) {
+				$message = $message." expecting '$expected'";
+				return( $this->fail( $message ));
+			}
+		}
+
+		/**
+		 * Returns the admin url
+		 */
+		function getAdminUrl()
+		{
+			$config =& Config::getConfig();
+			return( $config->getValue( "base_url" )."/admin.php" );
+		}
+		
+		/**
+		 * Assert method that executes the given UI script and assert an error if the
+		 * script was not successfully executed
+		 *
+		 * @param script A UI script
+		 * @see UIScriptRunner
+		 */
+		function assertUIScript( $script )
+		{	
+			// keep this object as static so that its state is carried accross calls to this method
+			static $ui;
+			if(!isset($ui)) {
+				$ui = new UIScriptRunner();
+			}
+			
+			$result = $ui->run( $script );			
+						
+			if( !$result ) {
+				$message = "Error executing step ".$ui->getFailedStep().": ".$ui->getFailedStepErrorMessage();
+				return( $this->fail( $message ));
+			}
+			
+			return( true );
+		}
 	}
-?>
\ No newline at end of file
+?>

Modified: plog/trunk/class/test/helpers/testtools.class.php
===================================================================
--- plog/trunk/class/test/helpers/testtools.class.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/class/test/helpers/testtools.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -46,7 +46,7 @@
 		function createUser()
 		{
 			$user = new UserInfo(
-				md5(time()),
+				TestTools::getRandomWord( 15 ),
 				"password",
 				"test at user.com",
 				"About test user",
@@ -146,5 +146,32 @@
 				}
 			}
 		}
+		
+		/**
+		 * Generate random words
+		 */
+		function getRandomWord($lenght, $uppercase = false, $html = true) 
+		{
+		    $newcode_length = 1;
+		    $newcode = "";
+		    while($newcode_length < $lenght) {
+		        $a=97;
+		        $b=122;
+		        if ($newcode_length == 1) {
+		            if (rand(1,4) == 1 || $uppercase) {
+		                $a=65;
+		                $b=90;
+		            }
+		        }
+		        $code_part=chr(rand($a,$b));
+		        $newcode_length++;
+		        $newcode = $newcode.$code_part;
+		    }
+		    if ($html && rand(1, 50) == 1) {
+		        return "<a href=\"http://www.lifetype.net\">$newcode</a>";
+		    }
+		    return $newcode;
+		}
+		
 	}
 ?>
\ No newline at end of file

Copied: plog/trunk/class/test/helpers/uiscriptrunner.class.php (from rev 4088, plog/branches/lifetype-1.1.1/class/test/helpers/uiscriptrunner.class.php)

Modified: plog/trunk/class/test/testrunner.class.php
===================================================================
--- plog/trunk/class/test/testrunner.class.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/class/test/testrunner.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -61,6 +61,7 @@
 		var $files;
 		var $suite;
 		var $excludeFolders;
+		var $listener;
 		
 		/**
 		 * Constructor.
@@ -68,17 +69,33 @@
 		 * @param folder Where test suites are stored. Defaults to class/test/tests (relative
 		 * to PLOG_CLASS_PATH)
 		 * @param pattern Pattern that will be used to check whether a file in folder $folder
+		 * this this work. The default value is 'false'
 		 * is a test suite. Defaults to "*_test.class.php"
 		 */
-		function TestRunner( $folder = TEST_CLASS_FOLDER, $pattern = TEST_CLASS_NAME_PATTERN )
+		function TestRunner( $folders = TEST_CLASS_FOLDER, $pattern = TEST_CLASS_NAME_PATTERN )
 		{
-			$this->folder = $folder;
+			if( !is_array( $folders )) 
+				$folders = Array( $folders );
+				
+			$this->folders = $folders;
 			$this->pattern = $pattern;
 			$this->excludeFolders = explode( ",", EXCLUDE_FOLDERS_LIST );
 			
-			$this->files = $this->_findClasses( $this->folder, $this->pattern );
+			$this->files = $this->_findClasses( $this->folders, $this->pattern );
+			
+			$this->listener = NULL;
 		}
 		
+		/** 
+		 * Adds a test listener
+		 *
+		 * @see PHPUnit_TestResult::addListener
+		 */
+		function addListener( &$listener )
+		{
+			$this->listener = $listener;
+		}
+		
 		/**
 		 * Runs a test suite, or all of them if no test suite name is given
 		 *
@@ -87,15 +104,16 @@
 		 * test suites were run and their results. Please use the HtmlReporter class to obtain
 		 * a nicer report.
 		 */
-		function run( $suite = "all" )
-		{
+		function run( $suite = Array( "all" ))
+		{			
 			// process all the classes and add them to the test suite
 			$this->suite = new PHPUnit_TestSuite();			
 			foreach( $this->files as $file ) {
 				// build the class name
 				$className = str_replace( ".class.php", "", basename( $file ));				
 				// load the class file
-				if( $suite == "all" || $suite == $className || $suite == str_replace( "_test", "", $className )) {
+				//if( $suite == "all" || $suite == $className || $suite == str_replace( "_test", "", $className )) {
+				if( in_array( "all", $suite ) || in_array( $className, $suite ) || in_array( str_replace( "_test", "", $className ), $suite )) {
 					// add the current suite only if we're either loading them all or if
 					// the current one is the one we want to load
 					lt_include( $file );
@@ -105,8 +123,12 @@
 			}			
 			
 			// after adding all the tests, run the suite and return the result
-			$result = PHPUnit::run( $this->suite );
-			
+	        $result = new PHPUnit_TestResult();	
+			if( $this->listener !== NULL ) {			
+				$result->addListener( $this->listener );
+			}
+	        $this->suite->run( $result );
+
 			return( $result );
 		}
 		
@@ -141,32 +163,35 @@
 		 * it is used to easily find all the test classes. Later on these classes will be loaded, instantiated
 		 * and a test suite will be automatically created.
 		 */
-		function _findClasses( $folder = null, $pattern = "*" )
+		function _findClasses( $folders, $pattern = "*" )
 		{
 			$list = Array();
 			
-			$files = Glob::myGlob( $folder , "*" );
-			foreach( $files as $file ) {
-				// recursive call
-				if( File::isDir( $file )) {
-					if( array_search( basename( $file ), $this->excludeFolders ) === false )
-					{
-						$res = $this->_findClasses( $file, $pattern );
-						foreach( $res as $f ) {
-							$list[] = $f;
+			// load all test cases included in core code
+			foreach( $folders as $folder ) {
+				$files = Glob::myGlob( $folder , "*" );
+				foreach( $files as $file ) {
+					// recursive call
+					if( File::isDir( $file )) {
+						if( array_search( basename( $file ), $this->excludeFolders ) === false )
+						{
+							$res = $this->_findClasses( Array( $file ), $pattern );
+							foreach( $res as $f ) {
+								$list[] = $f;
+							}
 						}
 					}
+					else {
+						if ( File::isReadable( $file )) {						
+							if( Glob::fnmatch( $pattern, $file )) {
+								// add the file only if it matched our pattern
+								$list[] = $file;
+							}
+						}
+					}					
 				}
-				else {
-					if ( File::isReadable( $file )) {						
-						if( Glob::fnmatch( $pattern, $file )) {
-							// add the file only if it matched our pattern
-							$list[] = $file;
-						}
-					}
-				}					
 			}
-			
+						
 			return( $list );
 		}
 	}

Modified: plog/trunk/class/test/tests/dao/article_test.class.php
===================================================================
--- plog/trunk/class/test/tests/dao/article_test.class.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/class/test/tests/dao/article_test.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -18,6 +18,7 @@
 				"dummy text",
 				Array( 1 ),   // a dummy category
 				Array( 1 ),   // a dummy user
+				1,  // a dummy blog
 				POST_STATUS_PUBLISHED,  // published status
 				0   // not read yet
 			);	

Modified: plog/trunk/class/test/tests/dao/bloginfo_test.class.php
===================================================================
--- plog/trunk/class/test/tests/dao/bloginfo_test.class.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/class/test/tests/dao/bloginfo_test.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -54,13 +54,16 @@
 		 */
 		function testSetMangledBlogName()
 		{
-			$blogName = "this_is_a_blog____  name";
-			
+			// when set to 'true', the second parameter modifies the blog name
+			$blogName = "this_is_a_blog____  name";			
         	$blog = new BlogInfo( "blah", 1, "blah blah", new BlogSettings());
-
-			$blog->setMangledBlogName( $blogName );
-			
+			$blog->setMangledBlogName( $blogName, true );			
 			$this->assertEquals( Textfilter::domainize( $blogName ), $blog->getMangledBlogName());
+			// and went set to 'false' (default value) it won't
+			$blogName = "this_is_a_blog____  name";			
+        	$blog2 = new BlogInfo( "blah", 1, "blah blah", new BlogSettings());
+			$blog2->setMangledBlogName( $blogName, false );
+			$this->assertEquals( "this_is_a_blog____  name", $blog2->getMangledBlogName());			
 		}
 	}
 ?>
\ No newline at end of file

Modified: plog/trunk/class/test/tests/dao/blogs_test.class.php
===================================================================
--- plog/trunk/class/test/tests/dao/blogs_test.class.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/class/test/tests/dao/blogs_test.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -68,13 +68,13 @@
 			// update the name and the mangled blog name, in the same way it is done in
 			// class/action/admin/adminupdateblogsettingsaction.class.php
 			$blog1->setBlog( $randomName );
-			$blog1->setMangledBlogName( $randomName );
+			$blog1->setMangledBlogName( $randomName, true );
 			$blogs->updateBlog( $blog1 );
-			$blog2->setMangledBlogName( $randomName );			
+			$blog2->setMangledBlogName( $randomName, true );
 			$blog2->setBlog( $randomName );
-			$blog2->setMangledBlogName( $randomName );			
+			$blog2->setMangledBlogName( $randomName, true );
 			$blogs->updateBlog( $blog2 );
-			$blog3->setMangledBlogName( $randomName );			
+			$blog3->setMangledBlogName( $randomName, true );
 			$blog3->setBlog( $randomName );	
 			$blogs->updateBlog( $blog3 );
 			

Modified: plog/trunk/class/test/tests/data/textfilter_test.class.php
===================================================================
--- plog/trunk/class/test/tests/data/textfilter_test.class.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/class/test/tests/data/textfilter_test.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -43,5 +43,31 @@
 				$this->assertEquals( $output, $result );
 			}
 		}
+		
+		/**
+		 * Verifies the domainize() method
+		 */
+		function testDomainize()
+		{
+			// load the value of the default separator
+			$config =& Config::getConfig();
+            $sep = $config->getValue( "urlize_word_separator", URLIZE_WORD_SEPARATOR_DEFAULT );			
+			
+			// set of input values and their expected output
+			$tests = Array(
+				"test blog" => "test{$sep}blog",
+				"test-blog" => "test{$sep}blog",
+				"test_blog" => "test{$sep}blog",
+				"test.blog" => "test{$sep}blog",
+				"??test//blog" => "testblog",
+				"==================test blog" => "test{$sep}blog",
+				"this.has.dots_and-hyphens----and   spaces		    " => "this{$sep}has{$sep}dots{$sep}and{$sep}hyphens{$sep}{$sep}{$sep}{$sep}and{$sep}spaces{$sep}"
+			);
+			
+			foreach( $tests as $input => $output ) {
+				$result = $this->tf->domainize( $input );
+				$this->assertEquals( $output, $result, "input was: $input" );
+			}
+		}
 	}
 ?>
\ No newline at end of file

Modified: plog/trunk/class/test/tests/net/xmlrpc/xmlrpcserver_test.class.php
===================================================================
--- plog/trunk/class/test/tests/net/xmlrpc/xmlrpcserver_test.class.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/class/test/tests/net/xmlrpc/xmlrpcserver_test.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -73,6 +73,7 @@
 			                            "Description for category General",
 										$this->blog->getId(),
 										true );
+										
 			$cats = new ArticleCategories();
 			if( !$cats->addArticleCategory( $this->cat )) {
 				throw(  new Exception( "Error adding test category!" ));
@@ -590,6 +591,42 @@
 			$this->assertTrue( $this->checkResponseEncoding( $c->message->rawmessage, $this->blog), 
 			                   "The blog encoding and the response of the XMLRPC request did not match!" );
 			
+			/** test the extended text  feature through MovableType**/
+            $content  = array();
+            $content["title"] = "topic";
+            $content["description"] = "Intro text";
+            $content["mt_text_more"] = "Extended text";
+			$res = $c->query( "metaWeblog.newPost", 
+					   $this->blog->getId(), 
+					   $this->owner->getUsername(), 
+					   "password", 
+					   $content, 
+					   true );
+
+			// see that the call was successful
+			$this->assertTrue( $res, "Unable to query ".$this->url." with method blogger.newPost" );
+
+			// get the post id and check it in the db
+			$artId = $c->getResponse();
+			$articles = new Articles();
+			$article = $articles->getArticle( $artId );
+			$this->assertTrue( $article, "Could not load article with id = ".$artId );
+			if( !$article )
+				return;
+			// check that the post has the expected values
+			$this->assertEquals( "topic", $article->getTopic());
+			$this->assertEquals( "Intro textExtended text", $article->getText());
+			$this->assertEquals( "Intro text" . POST_EXTENDED_TEXT_MODIFIER . "Extended text", $article->getText(false));
+			$this->assertEquals( "Intro text", $article->getIntroText());
+			$this->assertEquals( "Extended text", $article->getExtendedText());
+
+			// delete the article
+			$articles->deleteArticle( $artId, $this->owner->getId(), $this->blog->getId(), true );
+
+			// get the response and see that it has the right encoding			
+			$this->assertTrue( $this->checkResponseEncoding( $c->message->rawmessage, $this->blog), 
+			                   "The blog encoding and the response of the XMLRPC request did not match!" );
+			
 		}
 		
 
@@ -688,6 +725,67 @@
 			                   "The blog encoding and the response of the XMLRPC request did not match!" );			
 
 
+
+            // EXTENDED TEXT, with extended text in mt_more_text
+			// create a new post first
+			$article = new Article(
+				"topic",
+				"Intro text" . POST_EXTENDED_TEXT_MODIFIER . "Extended text",
+				Array( $this->cat->getId()),
+				$this->owner->getId(),
+				$this->blog->getId(),
+				POST_STATUS_PUBLISHED,
+				0
+				);
+				
+			// Store the setting that mt_more_text should be used
+			$blogSettings = $this->blog->getSettings();
+            $blogSettings->setValue( "xmlrpc_movabletype_enabled", true );
+            $this->blog->setSettings( $blogSettings ); 
+            $blogs = new Blogs();
+            $blogs->updateBlog( $this->blog );
+
+				
+			$this->assertTrue( $articles->addArticle( $article ), "Unable to add a new test article" );
+			
+			// make the method call
+			$c = new IXR_Client( $this->url );
+			$res = $c->query( "metaWeblog.getPost",
+					   $article->getId(),
+					   $this->owner->getUsername(), 
+					   "password" );
+					
+			// see that the call was successful
+			$this->assertTrue( $res, "Unable to query ".$this->url." with method metaweblog.getPost" );
+			
+			// make sure that the call returned ok
+			$response = $c->getResponse();
+			$this->assertTrue( $response, "metaWeblog.getPost did not return a valid response" );
+			
+			// and now compare that the returned values match with what we expected
+			$this->assertEquals( $this->owner->getId(), $response["userid"], "The user id of the article does not match" );
+			$this->assertEquals( "topic", $response["title"], "The topic of the post does not match" );
+			$this->assertEquals( "Intro text", $response["description"], "The text of the article does not match" );
+			$this->assertEquals( "Extended text", $response["mt_text_more"], "The text of the extended text does not match" );
+			$this->assertEquals( $article->getId(), $response["postid"] );
+			$url = $this->blog->getBlogRequestGenerator();
+			$this->assertEquals( $url->postLink( $article ), $response["link"], "The post permalink does not match" );
+			$this->assertEquals( $url->postPermalink( $article ), $response["permaLink"], "The post permalink does not match" );
+			
+			$this->assertTrue( $articles->deleteArticle( $article->getId(), $this->owner->getId(), $this->blog->getId(), true ),
+			                   "Error deleting article" );
+			
+			// get the response and see that it has the right encoding
+			$this->assertTrue( $this->checkResponseEncoding( $c->message->rawmessage, $this->blog ), 
+			                   "The blog encoding and the response of the XMLRPC request did not match!" );			
+
+			// Restore the setting
+			$blogSettings = $this->blog->getSettings();
+            $blogSettings->setValue( "xmlrpc_movabletype_enabled", false );
+            $this->blog->setSettings( $blogSettings ); 
+            $blogs->updateBlog( $this->blog );
+
+
 		}
 		
 		/** 
@@ -724,6 +822,34 @@
 			                   "The blog encoding and the response of the XMLRPC request did not match!" );			
 		}
 		
+		function testMTGetCategoryList()
+		{
+			// make the method call
+			$c = new IXR_Client( $this->url );
+			$res = $c->query( "mt.getCategoryList",
+					   $this->blog->getId(),
+					   $this->owner->getUsername(), 
+					   "password" );
+					
+			// see that the call was successful
+			$this->assertTrue( $res, "Unable to query ".$this->url." with method mt.getCategoryList" );
+			
+			// make sure that the call returned ok
+			$response = $c->getResponse();
+			$this->assertTrue( $response, "mt.getCategoryList did not return a valid response" );
+						
+			// there should only be one category
+			$this->assertTrue(( count( $response ) == 1 ), "There should only be one category returned by mt.getCategoryList" );
+			
+			// check that the category settings are correct
+			$this->assertEquals( $this->cat->getName(), $response[0]["categoryName"], "The category name did not match" );
+			$this->assertEquals( $this->cat->getId(), $response[0]["categoryId"], "The category description did not match" );
+			
+			// get the response and see that it has the right encoding
+			$this->assertTrue( $this->checkResponseEncoding( $c->message->rawmessage, $this->blog ), 
+			                   "The blog encoding and the response of the XMLRPC request did not match!" );			
+		}
+		
 		function testMetaWeblogGetRecentPosts()
 		{
 			// create a new post first
@@ -776,6 +902,131 @@
 			
 		}
 		
+		
+        function testMTSupportedTextFilters()
+		{
+			// make the method call
+			$c = new IXR_Client( $this->url );
+			$res = $c->query( "mt.supportedTextFilters");
+					
+			// see that the call was successful
+			$this->assertTrue( $res, "Unable to query ".$this->url." with method mt.supportedTextFilters" );
+			
+			// make sure that the call returned ok
+			// there should be no filters
+			$response = $c->getResponse();
+			$this->assertFalse( $response, "mt.supportedTextFilters return an unexpected response" );
+									
+		}
+		
+		function testMTGetPostCategories()
+		{
+			// create a new post first
+			$article = new Article(
+				"topic",
+				"text",
+				Array( $this->cat->getId()),
+				$this->owner->getId(),
+				$this->blog->getId(),
+				POST_STATUS_PUBLISHED,
+				0
+				);
+			$articles = new Articles();
+			$this->assertTrue( $articles->addArticle( $article ), "Unable to add a new test article" );
+			
+			// make the method call
+			$c = new IXR_Client( $this->url );
+			$res = $c->query( "mt.getPostCategories",
+					   $article->getId(),
+					   $this->owner->getUsername(), 
+					   "password" );
+					
+			// see that the call was successful
+			$this->assertTrue( $res, "Unable to query ".$this->url." with method mt.getPostCategories" );
+			
+			// make sure that the call returned ok
+			$response = $c->getResponse();
+			$this->assertTrue( $response, "mt.getPostCategories did not return a valid response" );
+			
+			
+			// There should only be one category
+			$this->assertEquals( 1, count($response), "The number of categories returned by mt.getPostCategories is not correct" );
+			
+			// and now compare that the returned values match with what we expected
+			$this->assertEquals( $this->cat->getName(), $response[0]["categoryName"], "The category name did not match" );
+			$this->assertEquals( $this->cat->getId(), $response[0]["categoryId"], "The category description did not match" );
+			
+			$this->assertTrue( $articles->deleteArticle( $article->getId(), $this->owner->getId(), $this->blog->getId(), true ),
+			                   "Error deleting article" );
+			
+			// get the response and see that it has the right encoding
+			$this->assertTrue( $this->checkResponseEncoding( $c->message->rawmessage, $this->blog ), 
+			                   "The blog encoding and the response of the XMLRPC request did not match!" );			
+		}
+
+		
+		function testMTSetPostCategories()
+		{
+			// create a new post first, with no category
+			$article = new Article(
+				"topic",
+				"text",
+				Array( $this->cat->getId()),
+				$this->owner->getId(),
+				$this->blog->getId(),
+				POST_STATUS_PUBLISHED,
+				0
+				);
+			$articles = new Articles();
+			$this->assertTrue( $articles->addArticle( $article ), "Unable to add a new test article" );
+			
+			// another category
+			$cat2 = new ArticleCategory( "General2", 
+			                              "Description for category General2",
+										  $this->blog->getId(),
+										  true );			
+			$cats = new ArticleCategories();
+			if( !$cats->addArticleCategory( $cat2 )) {
+				throw(  new Exception( "Error adding test category!" ));
+				die();
+			}		  
+			
+			// Construct the Category Struct
+			$categories = Array();
+			$theCategory = Array();
+			$theCategory["categoryName"] = $cat2->getName();
+			$theCategory["categoryId"] = $cat2->getId();
+			$categories[] = $theCategory;
+			
+			// make the method call
+			$c = new IXR_Client( $this->url );
+			$res = $c->query( "mt.setPostCategories",
+					   $article->getId(),
+					   $this->owner->getUsername(), 
+					   "password",
+					   $categories
+					   );
+					
+			// see that the call was successful
+			$this->assertTrue( $res, "Unable to query ".$this->url." with method mt.setPostCategories" );
+			
+			// make sure that the call returned ok
+			$response = $c->getResponse();
+			$this->assertTrue( $response, "mt.setPostCategories did not return a valid response" );
+						
+			// check that the post was successfully updated
+			$updatedArticle = $articles->getArticle( $article->getId());
+			$this->assertEquals( $cat2->getId(), $updatedArticle->_categoryIds[0]);
+			
+			$cats->deleteCategory( $cat2->getId(), $this->blog->getId());
+
+			// get the response and see that it has the right encoding
+			$this->assertTrue( $this->checkResponseEncoding( $c->message->rawmessage, $this->blog ), 
+			                   "The blog encoding and the response of the XMLRPC request did not match!" );			
+		}
+
+
+		
 		/**
 		 * @private
 		 */

Copied: plog/trunk/class/test/tests/ui (from rev 4088, plog/branches/lifetype-1.1.1/class/test/tests/ui)

Deleted: plog/trunk/class/test/tests/ui/articlecategoriesui_test.class.php
===================================================================
--- plog/branches/lifetype-1.1.1/class/test/tests/ui/articlecategoriesui_test.class.php	2006-10-04 21:01:34 UTC (rev 4088)
+++ plog/trunk/class/test/tests/ui/articlecategoriesui_test.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -1,94 +0,0 @@
-<?php
-
-	include_once( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );
-	include_once( PLOG_CLASS_PATH."class/test/helpers/testtools.class.php" );	
-	
-	/**
-	 * \ingroup Test
-	 *
-	 * Tests the user interface to work with article categories
-	 */
-	class ArticleCategoriesUI_Test extends LifeTypeTestCase
-	{
-		function setUp()
-		{
-			$this->user = TestTools::createUser();
-			$this->blog = TestTools::createBlog( $this->user->getId());
-		}
-		
-		function tearDown()
-		{
-			TestTools::deleteDaoTestData( Array( $this->user, $this->blog ));
-		}
-		
-		/**
-		 * Test the whoe login and logout process
-		 */
-		function testArticleCategories()
-		{
-			$this->assertUIScript(
-				Array(
-					"login" => Array(
-						"url" => $this->getAdminUrl(),
-						"type" => "post",
-						"params" => Array(
-							"userName" => $this->user->getUserName(),
-							"userPassword" => "password",
-							"op" => "Login"
-						),
-						"expected" => "Dashboard",
-						"message" => "The dashboard did not appear when logging in"
-					 ),
-					"select_blog" => Array(
-						"url" => $this->getAdminUrl(),
-						"type" => "get",
-						"params" => Array(
-							"op" => "blogSelect",
-							"blogId" => $this->blog->getId()
-						),
-						"expected" => "New Post",
-						"message" => "The blog could not be selected after the dashboard"
-					),
-					"new_category" => Array(
-						"url" => $this->getAdminUrl(),
-						"type" => "get",
-						"params" => Array( "op" => "newArticleCategory" ),
-						"expected" => "Name that will be used to display the category",
-						"message" => "The form to input a new category was not successfully displayed"						
-					),
-					"create_category" => Array(
-						"url" => $this->getAdminUrl(),
-						"type" => "post",
-						"params" => Array( "categoryName" => "test category", "categoryDescription" => "description", "categoryInMainPage" => "1" , "op" => "addArticleCategory" ),
-						"expected" => "Category \"test category\" was successfully added to the blog",
-						"message" => "The test category was not successully added"
-					)
-				)
-			);
-			
-			// find the category in the db...
-			$cats = new ArticleCategories();
-			$cat = $cats->getCategoryByName( "test_category", $this->blog->getId());
-			
-			// ...and delete it via the UI
-			$this->assertUIScript(
-				Array(
-					"delete_category" => Array(
-						"url" => $this->getAdminUrl(),
-						"type" => "get",
-						"params" => Array( "categoryId" => $cat->getId(), "op" => "deleteArticleCategory" ),
-						"expected" => "Category \"".$cat->getName()."\" deleted successfully",
-						"message" => "The test category was not successully deleted"
-					),
-					"delete_category_again" => Array(
-						"url" => $this->getAdminUrl(),
-						"type" => "get",
-						"params" => Array( "categoryId" => $cat->getId(), "op" => "deleteArticleCategory" ),
-						"expected" => "There was an error deleting category with identifier \"".$cat->getId()."\"",
-						"message" => "Attempting to delete the same category twice did not generate the expected error message"
-					)					
-				)
-			);			
-		}
-	}
-?>
\ No newline at end of file

Copied: plog/trunk/class/test/tests/ui/articlecategoriesui_test.class.php (from rev 4088, plog/branches/lifetype-1.1.1/class/test/tests/ui/articlecategoriesui_test.class.php)

Deleted: plog/trunk/class/test/tests/ui/login_test.class.php
===================================================================
--- plog/branches/lifetype-1.1.1/class/test/tests/ui/login_test.class.php	2006-10-04 21:01:34 UTC (rev 4088)
+++ plog/trunk/class/test/tests/ui/login_test.class.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -1,101 +0,0 @@
-<?php
-
-	include_once( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );
-	include_once( PLOG_CLASS_PATH."class/test/helpers/testtools.class.php" );	
-	
-	/**
-	 * \ingroup Test
-	 */
-	class Login_Test extends LifeTypeTestCase
-	{
-		function setUp()
-		{
-			$this->user = TestTools::createUser();
-			$this->user2 = TestTools::createUser();
-			$this->blog = TestTools::createBlog( $this->user2->getId());
-		}
-		
-		function tearDown()
-		{
-			TestTools::deleteDaoTestData( Array( $this->user, $this->user2, $this->blog ));
-		}
-		
-		/**
-		 * check that the login page is working as expected
-		 */
-		function testLoginPage()
-		{
-			$this->assertUIScript(
-				Array(
-					"login_page" => Array(
-						"url" => $this->getAdminUrl(),
-						"type" => "get",
-						"expected" => "Welcome to LifeType",
-						"message" => "The login screen did not display the right message"
-					)
-				)
-			);
-		}
-		
-		/**
-		 * Test that a user without a blog cannot login
-		 */
-		function testUserHasNoBlog()
-		{
-			$this->assertUIScript(
-				Array(
-					"login_page" => Array(
-						"url" => $this->getAdminUrl(),
-						"type" => "post",
-						"params" => Array(
-							"userName" => $this->user->getUserName(),
-							"userPassword" => "password",
-							"op" => "Login"
-						),
-						"expected" => "you do not belong to any blog yet",
-						"message" => "User was not warned that he did not belong to any blog yet"
-					)
-				)
-			);			
-		}
-		
-		/**
-		 * Test the whoe login and logout process
-		 */
-		function testLoginLogout()
-		{
-			$this->assertUIScript(
-				Array(
-					"login" => Array(
-						"url" => $this->getAdminUrl(),
-						"type" => "post",
-						"params" => Array(
-							"userName" => $this->user2->getUserName(),
-							"userPassword" => "password",
-							"op" => "Login"
-						),
-						"expected" => "Dashboard",
-						"message" => "The dashboard did not appear when logging in"
-					 ),
-					"select_blog" => Array(
-						"url" => $this->getAdminUrl(),
-						"type" => "get",
-						"params" => Array(
-							"op" => "blogSelect",
-							"blogId" => $this->blog->getId()
-						),
-						"expected" => "New Post",
-						"message" => "The blog could not be selected after the dashboard"
-					),
-					"logout" => Array(
-						"url" => $this->getAdminUrl(),
-						"type" => "get",
-						"params" => Array( "op" => "Logout" ),
-						"expected" => "You have been successfully logged out",
-						"message" => "The logout screen was not displayed correctly"
-					)
-				)
-			);						
-		}
-	}
-?>
\ No newline at end of file

Copied: plog/trunk/class/test/tests/ui/login_test.class.php (from rev 4088, plog/branches/lifetype-1.1.1/class/test/tests/ui/login_test.class.php)

Copied: plog/trunk/js/tinymce/plugins/insertvideo (from rev 4088, plog/branches/lifetype-1.1.1/js/tinymce/plugins/insertvideo)

Copied: plog/trunk/js/tinymce/plugins/insertvideo/css (from rev 4088, plog/branches/lifetype-1.1.1/js/tinymce/plugins/insertvideo/css)

Deleted: plog/trunk/js/tinymce/plugins/insertvideo/css/content.css
===================================================================
--- plog/branches/lifetype-1.1.1/js/tinymce/plugins/insertvideo/css/content.css	2006-10-04 21:01:34 UTC (rev 4088)
+++ plog/trunk/js/tinymce/plugins/insertvideo/css/content.css	2006-10-05 18:06:53 UTC (rev 4091)
@@ -1,15 +0,0 @@
-.ltVideoYouTube {
-	border: 1px dotted #cc0000;
-	background-image: url('../images/youtube.png');
-	background-position: center;
-	background-repeat: no-repeat;
-	background-color: #ffffcc;
-}
-
-.ltVideoGoogleVideo {
-	border: 1px dotted #cc0000;
-	background-image: url('../images/gvideo.png');
-	background-position: center;
-	background-repeat: no-repeat;
-	background-color: #ffffcc;
-}

Copied: plog/trunk/js/tinymce/plugins/insertvideo/css/content.css (from rev 4088, plog/branches/lifetype-1.1.1/js/tinymce/plugins/insertvideo/css/content.css)

Deleted: plog/trunk/js/tinymce/plugins/insertvideo/css/flash.css
===================================================================
--- plog/branches/lifetype-1.1.1/js/tinymce/plugins/insertvideo/css/flash.css	2006-10-04 21:01:34 UTC (rev 4088)
+++ plog/trunk/js/tinymce/plugins/insertvideo/css/flash.css	2006-10-05 18:06:53 UTC (rev 4091)
@@ -1,11 +0,0 @@
-.panel_wrapper div.current {
-	height: 100px;
-}
-
-#width, #height {
-	width: 50px;
-}
-
-#file {
-	width: 250px;
-}

Copied: plog/trunk/js/tinymce/plugins/insertvideo/css/flash.css (from rev 4088, plog/branches/lifetype-1.1.1/js/tinymce/plugins/insertvideo/css/flash.css)

Deleted: plog/trunk/js/tinymce/plugins/insertvideo/editor_plugin.js
===================================================================
--- plog/branches/lifetype-1.1.1/js/tinymce/plugins/insertvideo/editor_plugin.js	2006-10-04 21:01:34 UTC (rev 4088)
+++ plog/trunk/js/tinymce/plugins/insertvideo/editor_plugin.js	2006-10-05 18:06:53 UTC (rev 4091)
@@ -1,279 +0,0 @@
-/* Import plugin specific language pack */
-tinyMCE.importPluginLanguagePack('insertvideo', 'en,tr,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl'); // <- Add a comma separated list of all supported languages
-
-// Singleton class
-var TinyMCE_insertvideoPlugin = {
-	getInfo : function() {
-		return {
-			longname : 'insertvideo plugin',
-			author : 'The LifeType Project',
-			authorurl : 'http://www.lifetype.net',
-			infourl : 'http://www.lifetype.net',
-			version : "1.0"
-		};
-	},
-
-	initInstance : function(inst) {
-		tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/plugins/insertvideo/css/content.css");	
-	},
-
-	getControlHTML : function(cn) {
-		switch (cn) {
-			case "insertvideo":
-				return tinyMCE.getButtonHTML(cn, 'lang_insertvideo_desc', '{$pluginurl}/images/youtube.png', 'mceinsertvideo', true);
-		}
-
-		return "";
-	},
-
-	/**
-	 * Executes a specific command, this function handles plugin commands.
-	 *
-	 * @param {string} editor_id TinyMCE editor instance id that issued the command.
-	 * @param {HTMLElement} element Body or root element for the editor instance.
-	 * @param {string} command Command name to be executed.
-	 * @param {string} user_interface True/false if a user interface should be presented.
-	 * @param {mixed} value Custom value argument, can be anything.
-	 * @return true/false if the command was executed by this plugin or not.
-	 * @type
-	 */
-	execCommand : function(editor_id, element, command, user_interface, value) {
-		// Handle commands		
-		switch (command) {
-			// Remember to have the "mce" prefix for commands so they don't intersect with built in ones in the browser.
-			case "mceinsertvideo":
-				// Show UI/Popup
-				if (user_interface) {
-					// Open a popup window and send in some custom data in a window argument
-					var insertvideo = new Array();
-
-					insertvideo['file'] = '../../plugins/insertvideo/videoinput.html'; // Relative to theme
-					insertvideo['width'] = 500;
-					insertvideo['height'] = 160;
-
-					tinyMCE.openWindow(insertvideo, {editor_id : editor_id, resizable : "no", scrollbars : "no", inline : "yes"});
-				}
-				return true;
-		}
-
-	   // Pass to next handler in chain
-	   return false;
-	},
-
-	cleanup : function(type, content) {
-		switch (type) {
-			case "insert_to_editor_dom":
-				// Force relative/absolute
-				if (tinyMCE.getParam('convert_urls')) {
-					var imgs = content.getElementsByTagName("img");
-					for (var i=0; i<imgs.length; i++) {
-						//if (tinyMCE.getAttrib(imgs[i], "class")== "ltVideoYouTube") {
-						if (tinyMCE.getAttrib(imgs[i], "class").substr(0,6) == "ltVideo") {							
-							var src = tinyMCE.getAttrib(imgs[i], "alt");
-
-							if (tinyMCE.getParam('convert_urls'))
-								src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
-
-							imgs[i].setAttribute('alt', src);
-							imgs[i].setAttribute('title', src);
-						}
-					}
-				}
-				break;
-
-			case "get_from_editor_dom":
-				var imgs = content.getElementsByTagName("img");
-				for (var i=0; i<imgs.length; i++) {
-					if (tinyMCE.getAttrib(imgs[i], "class").substr(0,6) == "ltVideo") {
-						var src = tinyMCE.getAttrib(imgs[i], "alt");
-
-						if (tinyMCE.getParam('convert_urls'))
-							src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
-
-						imgs[i].setAttribute('alt', src);
-						imgs[i].setAttribute('title', src);
-					}
-				}
-				break;
-
-			case "insert_to_editor":
-				var startPos = 0;
-				var embedList = new Array();
-
-				// Fix the embed and object elements
-				content = content.replace(new RegExp('<[ ]*object','gi'),'<object');
-				content = content.replace(new RegExp('<[ ]*/object[ ]*>','gi'),'</object>');
-
-				// Parse all embed tags
-				while ((startPos = content.indexOf('<embed', startPos+1)) != -1) {
-					var endPos = content.indexOf('>', startPos);
-					var attribs = TinyMCE_insertvideoPlugin._parseAttributes(content.substring(startPos + 6, endPos));
-					embedList[embedList.length] = attribs;
-				}
-
-				// Parse all object tags and replace them with images from the embed data
-				var index = 0;
-				while ((startPos = content.indexOf('<object', startPos)) != -1) {
-					if (index >= embedList.length)
-						break;
-
-					var attribs = embedList[index];
-
-					// Find end of object
-					endPos = content.indexOf('</object>', startPos);
-					endPos += 9;
-
-					// Insert image
-					var contentAfter = content.substring(endPos);
-					content = content.substring(0, startPos);
-					content += '<img width="' + attribs["width"] + '" height="' + attribs["height"] + '"';
-					content += ' src="' + (tinyMCE.getParam("theme_href") + '/images/spacer.gif') + '" title="' + attribs["src"] + '"';
-					content += ' alt="' + attribs["src"] + '" class="'+attribs["class"]+'" />' + content.substring(endPos);
-					content += contentAfter;
-					index++;
-
-					startPos++;
-				}
-
-				// Parse all embed tags and replace them with images from the embed data
-				var index = 0;
-				while ((startPos = content.indexOf('<object', startPos)) != -1) {
-					if (index >= embedList.length)
-						break;
-
-					var attribs = embedList[index];
-
-					// Find end of embed
-					endPos = content.indexOf('>', startPos);
-					endPos += 9;
-
-					// Insert image
-					var contentAfter = content.substring(endPos);
-					content = content.substring(0, startPos);
-					content += '<img width="' + attribs["width"] + '" height="' + attribs["height"] + '"';
-					content += ' src="' + (tinyMCE.getParam("theme_href") + '/images/spacer.gif') + '" title="' + attribs["src"] + '"';
-					content += ' alt="' + attribs["src"] + '" class="'+attribs["class"]+'" />' + content.substring(endPos);
-					content += contentAfter;
-					index++;
-
-					startPos++;
-				}
-
-				break;
-
-			case "get_from_editor":
-				// Parse all img tags and replace them with object+embed
-				var startPos = -1;
-
-				while ((startPos = content.indexOf('<img', startPos+1)) != -1) {
-					var endPos = content.indexOf('/>', startPos);
-					var attribs = TinyMCE_insertvideoPlugin._parseAttributes(content.substring(startPos + 4, endPos));
-
-					// Is not flash, skip it
-					if (attribs['class'] != "ltVideoYouTube" && attribs['class'] != "ltVideoGoogleVideo")
-						continue;
-
-					type = attribs['class'];
-
-					endPos += 2;
-
-					var embedHTML = '';
-					var wmode = tinyMCE.getParam("flash_wmode", "transparent");
-					var quality = tinyMCE.getParam("flash_quality", "high");
-					var menu = tinyMCE.getParam("flash_menu", "false");
-					
-					embedHTML = getVideoFlashHTML( attribs["title"], attribs["width"], attribs["height"] );
-
-					// Insert embed/object chunk
-					chunkBefore = content.substring(0, startPos);
-					chunkAfter = content.substring(endPos);
-					content = chunkBefore + embedHTML + chunkAfter;
-				}
-				break;
-		}
-
-		// Pass through to next handler in chain
-		return content;
-	},
-
-	handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
-		if (node == null)
-			return;
-
-		do {
-			if (node.nodeName == "IMG" && tinyMCE.getAttrib(node, 'class').indexOf('ltVideo') == 0) {
-				tinyMCE.switchClass(editor_id + '_flash', 'mceButtonSelected');
-				return true;
-			}
-		} while ((node = node.parentNode));
-
-		tinyMCE.switchClass(editor_id + '_flash', 'mceButtonNormal');
-
-		return true;
-	},
-
-	// Private plugin internal functions
-
-	_parseAttributes : function(attribute_string) {
-		var attributeName = "";
-		var attributeValue = "";
-		var withInName;
-		var withInValue;
-		var attributes = new Array();
-		var whiteSpaceRegExp = new RegExp('^[ \n\r\t]+', 'g');
-
-		if (attribute_string == null || attribute_string.length < 2)
-			return null;
-
-		withInName = withInValue = false;
-
-		for (var i=0; i<attribute_string.length; i++) {
-			var chr = attribute_string.charAt(i);
-
-			if ((chr == '"' || chr == "'") && !withInValue)
-				withInValue = true;
-			else if ((chr == '"' || chr == "'") && withInValue) {
-				withInValue = false;
-
-				var pos = attributeName.lastIndexOf(' ');
-				if (pos != -1)
-					attributeName = attributeName.substring(pos+1);
-
-				attributes[attributeName.toLowerCase()] = attributeValue.substring(1);
-
-				attributeName = "";
-				attributeValue = "";
-			} else if (!whiteSpaceRegExp.test(chr) && !withInName && !withInValue)
-				withInName = true;
-
-			if (chr == '=' && withInName)
-				withInName = false;
-
-			if (withInName)
-				attributeName += chr;
-
-			if (withInValue)
-				attributeValue += chr;
-		}
-
-		return attributes;
-	}
-};
-
-function getVideoFlashHTML( url, width, height )
-{
-	html = "<object type=\"application/x-shockwave-flash\" width=\""+width+"\" height=\""+height+"\" data=\""+url+"\">"+
-		"<param name=\"movie\" value=\""+url+"\" />"+
-		"<param name=\"wmode\" value=\"transparent\" />"+
-		"<param name=\"allowScriptAcess\" value=\"sameDomain\" />"+
-		"<param name=\"quality\" value=\"best\" />"+
-		"<param name=\"bgcolor\" value=\"#FFFFFF\" />"+
-		"<param name=\"scale\" value=\"noScale\" />"+
-		"<param name=\"salign\" value=\"TL\" />"+
-		"<param name=\"FlashVars\" value=\"playerMode=embedded\" />"+
-	"</object>";
-	
-	return( html );
-}
-
-tinyMCE.addPlugin("insertvideo", TinyMCE_insertvideoPlugin );
\ No newline at end of file

Copied: plog/trunk/js/tinymce/plugins/insertvideo/editor_plugin.js (from rev 4088, plog/branches/lifetype-1.1.1/js/tinymce/plugins/insertvideo/editor_plugin.js)

Deleted: plog/trunk/js/tinymce/plugins/insertvideo/functions.js
===================================================================
--- plog/branches/lifetype-1.1.1/js/tinymce/plugins/insertvideo/functions.js	2006-10-04 21:01:34 UTC (rev 4088)
+++ plog/trunk/js/tinymce/plugins/insertvideo/functions.js	2006-10-05 18:06:53 UTC (rev 4091)
@@ -1,98 +0,0 @@
-function init() {
-	tinyMCEPopup.resizeToInnerSize();
-}
-
-function isValidUrl( url )
-{
-	var regexp = /(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/
-	return regexp.test(url);
-}
-
-function getYouTubeLink( url ) 
-{	
-	// check if this is a URL pointing to a youtube link or to a youtube video
-	if( url.substring( 0, 31 ) == "http://www.youtube.com/watch?v=" ) {
-		// and if it's a link to a normal youtube page, build the right link to the video player	
-		var regexp = /http:\/\/www.youtube.com\/.*?v=([\-0-9a-zA-z]*).*/i;
-		result = regexp.exec( url );
-		if( result ) {
-			videoId = result[1];
-		}
-		else {
-			// let's try to make a best guess...
-			videoId = url.substring( 31, url.length );
-		}
-		
-		url = "http://www.youtube.com/v/" + videoId;
-	}
-	return( url );
-}
-
-function getGoogleVideoLink( url )
-{
-	// check if it's a link to a video page or a link to the video player
-	if( url.substring( 0, 40 ) == "http://video.google.com/videoplay?docid=" ) {
-		// if it's a link to a video page, generate the right one
-		var regexp = /http:\/\/video.google.com\/.*?docid=([\-0-9a-zA-z]*).*/i;
-		result = regexp.exec( url );
-		if( result ) {
-			videoId = result[1];
-		}
-		else {		
-			videoId = url.substring( 40, url.length );
-		}
-		
-		url = "http://video.google.com/googleplayer.swf?docId=" + videoId;
-	}
-	
-	return( url );
-}
-
-function insertVideoCode()
-{
-	// get and check the URL
-	urlField = document.forms[0].url;
-	url = urlField.value;
-	if( url == "" || !isValidUrl( url )) {
-		window.alert( "The URL is not valid" );
-		return( false );
-	}
-	
-	// check if a destination system was selected
-	youtube = document.getElementById("youtube");
-	gvideo = document.getElementById("gvideo");
-	if( youtube.checked==false && gvideo.checked==false) {
-		window.alert( "You must select one of the video services" );
-		return( false );	
-	}
-	
-	if( youtube.checked == true ) {
-		link = getYouTubeLink( url );
-		css="ltVideoYouTube";
-		width=425;
-		height=350;
-	}
-	else {
-		link = getGoogleVideoLink( url );	
-		css="ltVideoGoogleVideo";
-		width=400;
-		height=326;		
-	}
-
-	insertFlash( link, css, width, height );
-}
-
-function insertFlash( file, css, width, height ) {
-
-	var html      = '';
-
-	html += ''
-		+ '<img src="' + (tinyMCE.getParam("theme_href") + "/images/spacer.gif") + '" mce_src="' + (tinyMCE.getParam("theme_href") + "/images/spacer.gif") + '" '
-		+ 'width="' + width + '" height="' + height + '" '
-		+ 'border="0" alt="' + file + '" title="' + file + '" class="'+css+'" />';
-
-	tinyMCEPopup.execCommand("mceInsertContent", true, html);
-	tinyMCE.selectedInstance.repaint();
-
-	tinyMCEPopup.close();
-}
\ No newline at end of file

Copied: plog/trunk/js/tinymce/plugins/insertvideo/functions.js (from rev 4088, plog/branches/lifetype-1.1.1/js/tinymce/plugins/insertvideo/functions.js)

Copied: plog/trunk/js/tinymce/plugins/insertvideo/images (from rev 4088, plog/branches/lifetype-1.1.1/js/tinymce/plugins/insertvideo/images)

Deleted: plog/trunk/js/tinymce/plugins/insertvideo/images/gvideo.png
===================================================================
(Binary files differ)

Copied: plog/trunk/js/tinymce/plugins/insertvideo/images/gvideo.png (from rev 4088, plog/branches/lifetype-1.1.1/js/tinymce/plugins/insertvideo/images/gvideo.png)

Deleted: plog/trunk/js/tinymce/plugins/insertvideo/images/youtube.png
===================================================================
(Binary files differ)

Copied: plog/trunk/js/tinymce/plugins/insertvideo/images/youtube.png (from rev 4088, plog/branches/lifetype-1.1.1/js/tinymce/plugins/insertvideo/images/youtube.png)

Deleted: plog/trunk/js/tinymce/plugins/insertvideo/videoinput.html
===================================================================
--- plog/branches/lifetype-1.1.1/js/tinymce/plugins/insertvideo/videoinput.html	2006-10-04 21:01:34 UTC (rev 4088)
+++ plog/trunk/js/tinymce/plugins/insertvideo/videoinput.html	2006-10-05 18:06:53 UTC (rev 4091)
@@ -1,45 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<title>Insert Video</title>
-	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
-	<script language="javascript" type="text/javascript" src="functions.js"></script>	
-	<base target="_self" />
-</head>
-<body style="display: none">
-	<form name="video" id="video" method="post" action="#">
-	<div class="tabs">
-	  <ul>
-	   <li id="general_tab" class="current"><span>Insert Video</span></li>
-	  </ul>
-	</div>
-	<div class="panel_wrapper">
-	  <div id="general_panel" class="panel_current">
-	     <legend>Please provide a link to a video file or a link to a video page.</legend>	     	     
-	     <table border="0" cellpadding="4" cellspacing="0">
-	      <tr>
-	       <td nowrap="nowrap">Video URL:</td>
-	       <td><input type="text" id="url" name="url" value="" style="width:350px" /></td>
-	      </tr>
-	      <tr>
-	       <td nowrap="nowrap">Source:</td>
-	       <td>
-		    <input type="radio" id="youtube" style="border:0px" name="type" value="1"><img src="images/youtube.png" alt="YouTube" /> YouTube&nbsp;
-		    <input type="radio" id="gvideo" style="border:0px"name="type" value="2"><img src="images/gvideo.png" alt="Google Video" /> Google Video&nbsp;
-		   </td>
-		  </tr> 			
-		 </table>		    
-		</div>
-		</div>
-		<div class="mceActionPanel">
-		  <div style="float:left">		
-			<input type="button" name="insert" value="Insert Code" onClick="insertVideoCode()" id="insert" />
-		  </div>
-		  <div style="float:right">
-		    <input type="button" name="cancel" value="Close" onclick="tinyMCEPopup.close();" id="cancel" />
-		  </div>
-		</div>
-	 </div>
-	</div>				
-	 </form>
-</body>
-</html>

Copied: plog/trunk/js/tinymce/plugins/insertvideo/videoinput.html (from rev 4088, plog/branches/lifetype-1.1.1/js/tinymce/plugins/insertvideo/videoinput.html)

Modified: plog/trunk/js/tinymce/tiny_mce-plog.js
===================================================================
--- plog/trunk/js/tinymce/tiny_mce-plog.js	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/js/tinymce/tiny_mce-plog.js	2006-10-05 18:06:53 UTC (rev 4091)
@@ -2,13 +2,13 @@
 	mode : "exact",
 	elements : "postText,postExtendedText",
 	theme : "advanced",
-	plugins : "fullscreen,table,inlinepopups,insertdatetime,emotions,insertresource",
+	plugins : "fullscreen,table,inlinepopups,insertdatetime,emotions,insertresource,insertvideo",
 	relative_urls : false,
 	remove_script_host : false,
 	force_p_newlines : true,
 	cleanup_on_startup : true,	
 	theme_advanced_buttons1 : "fullscreen,separator,fontsizeselect,fontselect,forecolor,backcolor,bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull",
-	theme_advanced_buttons2 : "bullist,numlist,indent,outdent,separator,link,unlink,image,insertresource,emotions,separator,hr,insertdate,inserttime,separator,code",
+	theme_advanced_buttons2 : "bullist,numlist,indent,outdent,separator,link,unlink,image,insertresource,insertvideo,emotions,separator,hr,insertdate,inserttime,separator,code",
 	theme_advanced_buttons3 : "",
 	fullscreen_settings : {
                 theme_advanced_buttons3 : "tablecontrols"

Modified: plog/trunk/locale/locale_en_UK.php
===================================================================
--- plog/trunk/locale/locale_en_UK.php	2006-10-04 21:10:36 UTC (rev 4090)
+++ plog/trunk/locale/locale_en_UK.php	2006-10-05 18:06:53 UTC (rev 4091)
@@ -201,26 +201,26 @@
 
 // new post
 $messages['topic'] = 'Topic';
-$messages['topic_help'] = 'Title of the post';
+$messages['topic_help'] = 'Title of the post.';
 $messages['text'] = 'Text';
-$messages['text_help'] = 'Text of the post. This part will always appear in the front page';
+$messages['text_help'] = 'Text of the post. This part will always appear in the front page.';
 $messages['extended_text'] = 'Extended Text';
-$messages['extended_text_help'] = 'Extended text of the post. This part can optionally appear only in the post page or in the main page. See the blog settings for more information';
+$messages['extended_text_help'] = 'Extended text of the post. This part can optionally appear only in the post page or in the main page. See the blog settings for more information.';
 $messages['trackback_urls'] = 'Real Trackback Urls';
-$messages['trackback_urls_help'] = 'If the article you want to send the trackback does not support Trackback Auto-Discover mechanism, please put its real trackback url here and use the new line to seperate different urls.';
+$messages['trackback_urls_help'] = 'If the article, you want to send the trackback to, does not support Trackback Auto-Discover mechanism, you may put its real trackback url here and use new a line for each url.';
 $messages['post_slug'] = 'Slug';
-$messages['post_slug_help'] = 'The slug will be used to generate nice permanent links';
+$messages['post_slug_help'] = 'The slug will be used to generate nice permanent links.';
 $messages['date'] = 'Date';
-$messages['post_date_help'] = 'Date when this post is going to be published';
+$messages['post_date_help'] = 'Date when this post is going to be published.';
 $messages['status'] = 'Status';
-$messages['post_status_help'] = 'Select one of these status';
+$messages['post_status_help'] = 'Select one of these status.';
 $messages['post_status_published'] = 'Published';
 $messages['post_status_draft'] = 'Draft';
 $messages['post_status_deleted'] = 'Deleted';
 $messages['categories'] = 'Categories';
-$messages['post_categories_help'] = 'Select one or more categories';
+$messages['post_categories_help'] = 'Select one or more categories.';
 $messages['post_comments_enabled_help'] = 'Enable comments';
-$messages['send_notification_help'] = 'Notification of new comments';
+$messages['send_notification_help'] = 'Notification of new comments.';
 $messages['send_trackback_pings_help'] = 'Send trackbacks';
 $messages['send_xmlrpc_pings_help'] = 'Send XMLRPC pings';
 $messages['save_draft_and_continue'] = 'Save draft';
@@ -329,10 +329,10 @@
 
 // new category
 $messages['name'] = 'Name';
-$messages['category_name_help'] = 'Name that will be used to display the category';
+$messages['category_name_help'] = 'Name that will be used to display the category.';
 $messages['description'] = 'Description';
-$messages['category_description_help'] = 'Longer description for this category';
-$messages['show_in_main_page_help'] = 'Whether posts under this category should be shown in the main page, or only when this particular category is browsed';
+$messages['category_description_help'] = 'Longer description for this category.';
+$messages['show_in_main_page_help'] = 'Whether posts under this category should be shown in the main page, or only when this particular category is browsed.';
 $messages['error_empty_name'] = 'You must provide a name';
 $messages['error_empty_description'] = 'You must provide a description';
 $messages['error_adding_article_category'] = 'There was an error adding the new category. Please check the data and try again';
@@ -355,11 +355,11 @@
 $messages['links_deleted_ok'] = '%s links deleted successfully';
 
 // new link
-$messages['link_name_help'] = 'Name given to this link';
-$messages['link_url_help'] = 'Address where this link points';
-$messages['link_description_help'] = 'Brief description of this link';
-$messages['link_feed_help'] = 'A link to any of the RSS or Atom feeds of this link can also be provided';
-$messages['link_category_help'] = 'Choose one of the available link categories';
+$messages['link_name_help'] = 'Name given to this link.';
+$messages['link_url_help'] = 'Address where this link points.';
+$messages['link_description_help'] = 'Brief description of this link.';
+$messages['link_feed_help'] = 'A link to any of the RSS or Atom feeds of this link can also be provided.';
+$messages['link_category_help'] = 'Choose one of the available link categories.';
 $messages['error_adding_link'] = 'There was an error adding the link. Please check the data and try again';
 $messages['error_invalid_url'] = 'The address is not correct';
 $messages['link_added_ok'] = 'Link "%s" was successfully added';
@@ -380,7 +380,7 @@
 $messages['error_removing_link_category2'] = 'There was an error removing link category with identifier "%s"';
 
 // new link category
-$messages['link_category_name_help'] = 'Name given to this link category';
+$messages['link_category_name_help'] = 'Name given to this link category.';
 $messages['error_adding_link_category'] = 'There was an error adding the new link category';
 $messages['link_category_added_ok'] = 'Link category "%s" was successfully added';
 
@@ -399,10 +399,10 @@
 $messages['error_incorrect_field_id'] = 'The custom field identifier was not valid';
 
 // new custom field
-$messages['field_name_help'] = 'Identifier that will be used to refer to the value of this field in posts';
-$messages['field_description_help'] = 'Brief description of this field that will be shown when adding or editing posts';
-$messages['field_type_help'] = 'Select one of the available field types';
-$messages['field_hidden_help'] = 'If a field is hidden, it will not be shown when adding a or editing a post. This feature is mainly used by plugins';
+$messages['field_name_help'] = 'Identifier that will be used to refer to the value of this field in posts.';
+$messages['field_description_help'] = 'Brief description of this field that will be shown when adding or editing posts.';
+$messages['field_type_help'] = 'Select one of the available field types.';
+$messages['field_hidden_help'] = 'If a field is hidden, it will not be shown when adding a or editing a post. This feature is mainly used by plugins.';
 $messages['error_adding_custom_field'] = 'There was an error adding the custom field. Please check the data and try again';
 $messages['custom_field_added_ok'] = 'Custom field "%s" added successfully';
 $messages['text_field'] = 'Text field';
@@ -438,11 +438,11 @@
 $messages['add_album'] = 'Add album';
 
 // new album
-$messages['album_name_help'] = 'Short name for the new album';
+$messages['album_name_help'] = 'Short name for the new album.';
 $messages['parent'] = 'Parent';
 $messages['no_parent'] = 'No parent';
-$messages['parent_album_help'] = 'Use this to have albums within albums and better organize your files';
-$messages['album_description_help'] = 'Longer description of the contents of this album';
+$messages['parent_album_help'] = 'Use this to have albums within albums and better organize your files.';
+$messages['album_description_help'] = 'Longer description of the contents of this album.';
 $messages['error_adding_album'] = 'There was an error adding the new album. Please check the data and try again';
 $messages['album_added_ok'] = 'Album "%s" successfully added';
 
@@ -451,14 +451,14 @@
 $messages['error_fetching_album'] = 'There was an error fetching the album';
 $messages['error_updating_album'] = 'There was an error updating the album. Please check the data and try again';
 $messages['album_updated_ok'] = 'Album "%s" updated successfully';
-$messages['show_album_help'] = 'If disabled, the album will not be shown in the list of albums available in this blog';
+$messages['show_album_help'] = 'If disabled, the album will not be shown in the list of albums available in this blog.';
 
 // new resource
 $messages['file'] = 'File';
-$messages['resource_file_help'] = 'File that will be added to the current blog. Use the "Add field" link to upload more than one file at the same time';
+$messages['resource_file_help'] = 'File that will be added to the current blog. Use the "Add field" link to upload more than one file at the same time.';
 $messages['add_field'] = 'Add field';
-$messages['resource_description_help'] = 'Longer description of the contents of this file';
-$messages['resource_album_help'] = 'Select the album to which this file will be added';
+$messages['resource_description_help'] = 'Longer description of the contents of this file.';
+$messages['resource_album_help'] = 'Select the album to which this file will be added.';
 $messages['error_no_resource_uploaded'] = 'There was no file selected to upload';
 $messages['resource_added_ok'] = 'Resource "%s" added successfully';
 $messages['error_resource_forbidden_extension'] = 'The file was not added because it is of a forbidden type';
@@ -469,7 +469,7 @@
 
 // edit resource
 $messages['editResource'] = 'Edit Resource';
-$messages['resource_information_help'] = 'Below is some information about this resource file';
+$messages['resource_information_help'] = 'Below is some information about this resource file.';
 $messages['information'] = 'Information';
 $messages['size'] = 'Size';
 $messages['format'] = 'Format';
@@ -488,40 +488,40 @@
 $messages['blog_link'] = 'Blog link';
 $messages['blog_link_help'] = 'Permanent link to this blog';
 $messages['blog_name_help'] = 'Title for this blog';
-$messages['blog_description_help'] = 'Longer description about the contents of this blog';
+$messages['blog_description_help'] = 'Longer description about the contents of this blog.';
 $messages['language'] = 'Language';
-$messages['blog_language_help'] = 'Language used to display the texts of this blog, both in the public and administration side';
+$messages['blog_language_help'] = 'Language used to display the texts of this blog, both in the public and administration side.';
 $messages['max_main_page_items'] = 'Number of items in the main page';
-$messages['max_main_page_items_help'] = 'Number of posts that should be displayed at all times in the main page of the blog';
+$messages['max_main_page_items_help'] = 'Number of posts that should be displayed at all times in the main page of the blog.';
 $messages['max_recent_items'] = 'Number of recent items';
-$messages['max_recent_items_help'] = 'Maximum number of posts that will be shown as recent in the front page';
+$messages['max_recent_items_help'] = 'Maximum number of posts that will be shown as recent in the front page.';
 $messages['template'] = 'Template';
 $messages['choose'] = 'Choose';
-$messages['blog_template_help'] = 'Template that will be used to display the contents of the blog. This list includes global templates plus all the templates installed only for this blog';
+$messages['blog_template_help'] = 'Template that will be used to display the contents of the blog. This list includes global templates plus all the templates installed only for this blog.';
 $messages['use_read_more'] = 'Use "more..." link in posts';
-$messages['use_read_more_help'] = 'If enabled, only the text typed in the "Text" textbox will be shown in the main page. In order to display the "Extended text", a "more..." link will be added to each post';
+$messages['use_read_more_help'] = 'If enabled, only the text typed in the "Text" textbox will be shown in the main page. In order to display the "Extended text", a "more..." link will be added to each post.';
 $messages['enable_wysiwyg'] = 'Enable the visual editor of posts';
-$messages['enable_wysiwyg_help'] = 'Enables a more powerful, visual editor of HTML mark up. The editor only works in Internet Explorer 5.5 or higher or Mozilla 1.3 or higher';
+$messages['enable_wysiwyg_help'] = 'Enables a more powerful, visual editor of HTML mark up. The editor only works in Internet Explorer 5.5 or higher or Mozilla 1.3 or higher.';
 $messages['enable_comments'] = 'Enable comments by default';
-$messages['enable_comments_help'] = 'Enable comments for all posts by default. Comments can still be enabled/disabled for certain posts when creating new posts or editing old ones';
+$messages['enable_comments_help'] = 'Enable comments for all posts by default. Comments can still be enabled/disabled for certain posts when creating new posts or editing old ones.';
 $messages['show_future_posts'] = 'Show future posts in the calendar';
-$messages['show_future_posts_help'] = 'Whether posts which have a date in the future should appear in the calendar and visible to users';
+$messages['show_future_posts_help'] = 'Whether posts which have a date in the future should appear in the calendar and visible to users.';
 $messages['comments_order'] = 'Comments order';
-$messages['comments_order_help'] = 'Order in which comments should be displayed in the front page';
+$messages['comments_order_help'] = 'Order in which comments should be displayed in the front page.';
 $messages['oldest_first'] = 'Oldest first';
 $messages['newest_first'] = 'Newest first';
 $messages['categories_order'] = 'Categories order';
-$messages['categories_order_help'] = 'Order in which categories should be displayed in the front page';
+$messages['categories_order_help'] = 'Order in which categories should be displayed in the front page.';
 $messages['most_recent_updated_first'] = 'Most recently updated first';
 $messages['alphabetical_order'] = 'Alphabetical order';
 $messages['reverse_alphabetical_order'] = 'Reverse alphabetical order';
 $messages['most_articles_first'] = 'Most articles first';
 $messages['link_categories_order'] = 'Link categories order';
-$messages['link_categories_order_help'] = 'Order in which link categories should appear in the front page';
+$messages['link_categories_order_help'] = 'Order in which link categories should appear in the front page.';
 $messages['most_links_first'] = 'Most links first';
 $messages['most_links_last'] = 'Most links last';
 $messages['time_offset'] = 'Time offset';
-$messages['time_offset_help'] = 'Time difference in hours that will be dynamically added to each date and time in the blog';
+$messages['time_offset_help'] = 'Time difference in hours that will be dynamically added to each date and time in the blog.';
 $messages['close'] = 'Close';
 $messages['select'] = 'Select';
 $messages['error_updating_settings'] = 'There was an error updating the blog settings. Please check the data and try again';
@@ -531,17 +531,17 @@
 $messages['hours'] = 'Hours';
 
 // user settings
-$messages['username_help'] = 'Public username. It cannot be changed';
+$messages['username_help'] = 'Public username. It cannot be changed.';
 $messages['full_name'] = 'Full name';
 $messages['full_name_help'] = 'Complete full name';
-$messages['password_help'] = 'Type and confirm a new password, or leave empty for no change';
+$messages['password_help'] = 'Type and confirm a new password, or leave empty for no change.';
 $messages['confirm_password'] = 'Confirm password';
 $messages['email'] = 'Email';
-$messages['email_help'] = 'Email address where notifications will be sent';
+$messages['email_help'] = 'Email address where notifications will be sent.';
 $messages['bio'] = 'Your bio';
-$messages['bio_help'] = 'A longer description of yourself can be provided here';
+$messages['bio_help'] = 'A longer description of yourself can be provided here.';
 $messages['picture'] = 'Picture';
-$messages['user_picture_help'] = 'Please select a picture form the ones uploaded to this blog as your personal picture';
+$messages['user_picture_help'] = 'Please select a picture form the ones uploaded to this blog as your personal picture.';
 $messages['error_invalid_password'] = 'The password is not correct. Please make sure that it is not too short';
 $messages['error_passwords_dont_match'] = 'Sorry, passwords do not match';
 $messages['error_incorrect_email_address'] = 'The email address is not correct';
@@ -564,9 +564,9 @@
 // new blog user
 $messages['new_blog_username_help'] = 'Username of the user to whom you would like to give access to this blog. New users will only have access to the "Manage" and "Resources" sections.';
 $messages['send_notification'] = 'Send notification';
-$messages['send_user_notification_help'] = 'Send an email notification to this user';
+$messages['send_user_notification_help'] = 'Send an email notification to this user.';
 $messages['notification_text'] = 'Notification Text';
-$messages['notification_text_help'] = 'Text that will be included in the notification message';
+$messages['notification_text_help'] = 'Text that will be included in the notification message.';
 $messages['error_adding_user'] = 'There was an error granting access to the user. Please check the data and try again';
 $messages['error_empty_text'] = 'You must provide some text';
 $messages['error_adding_user'] = 'There was an error adding the user. Please check the data and try again';
@@ -611,16 +611,16 @@
 // create user
 $messages['user_added_ok'] = 'User "%s" added successfully';
 $messages['user_status_help'] = 'Current status for this user';
-$messages['user_blog_help'] = 'Blog to which this user will be initially assigned';
+$messages['user_blog_help'] = 'Blog to which this user will be initially assigned.';
 $messages['none'] = 'None';
 
 // edit user
 $messages['error_invalid_user'] = 'The user identifier is not correct or the user does not exist';
 $messages['error_updating_user'] = 'There was an error updating the user settings. Please check the data and try again';
 $messages['blogs'] = 'Blogs';
-$messages['user_blogs_help'] = 'Blogs which this user currently owns or where this user has access';
+$messages['user_blogs_help'] = 'Blogs which this user currently owns or where this user has access.';
 $messages['site_admin'] = 'Administrator';
-$messages['site_admin_help'] = 'Whether this user has administrator privileges and is allowed to see the "Administration" area and perform administrative tasks';
+$messages['site_admin_help'] = 'Whether this user has administrator privileges and is allowed to see the "Administration" area and perform administrative tasks.';
 $messages['user_updated_ok'] = 'User "%s" updated successfully';
 
 // site blogs
@@ -644,9 +644,9 @@
 
 // edit blog
 $messages['blog_status_help'] = 'Blog status';
-$messages['blog_owner_help'] = 'User who will be set as the owner, with full control on the blog settings';
+$messages['blog_owner_help'] = 'User who will be set as the owner, with full control on the blog settings.';
 $messages['users'] = 'Users';
-$messages['blog_quota_help'] = 'Resource quota in bytes. Set as 0 for unlimited or leave empty to make the blog use the global quota';
+$messages['blog_quota_help'] = 'Resource quota in bytes. Set as 0 for unlimited or leave empty to make the blog use the global quota.';
 $messages['edit_blog_settings_updated_ok'] = 'Blog "%s" updated successfully';
 $messages['error_updating_blog_settings'] = 'There was an error updating blog "%s"';
 $messages['error_incorrect_blog_owner'] = 'The user selected as blog owner is not correct';
@@ -682,137 +682,137 @@
 $messages['site_config_saved_ok'] = 'Site settings saved successfully';
 $messages['error_saving_site_config'] = 'There was an error saving the site settings';
 /// general settings
-$messages['help_comments_enabled'] = 'Enable comments for new blogs by default [Default = Yes]';
-$messages['help_beautify_comments_text'] = 'If enabled, comments posted by users will be formatted by adding paragraphs and auto-linking all URLs [Default = Yes]';
-$messages['help_temp_folder'] = 'Folder that LifeType can use to write its temporary data such as compiled templates, etc. Use a folder outside the web server tree for increased security [Default = ./tmp]';
-$messages['help_base_url'] = 'Base URL where this blog is installed';
-$messages['help_subdomains_enabled'] = 'Enable or disable subdomains. Please see the documentation for more information regarding subdomains [Default = No]';
-$messages['help_include_blog_id_in_url'] = 'Meaningful only when subdomains are enabled and "normal" URLs are enabled, forces internally-generated URLs not to have the "blogId" parameter. Do not change unless you know what you are doing [Default = Yes]';
-$messages['help_script_name'] = 'Set this if you need to rename index.php to something else [Default = index.php]';
-$messages['help_show_posts_max'] = 'Maximum number of posts shown in the main page. Only meaningful for new blogs [Default = 15]';
-$messages['help_recent_posts_max'] = 'Maximum number of recent posts shown in the main page. Only meaningful for new blogs [Default = 10]';
-$messages['help_save_drafts_via_xmlhttprequest_enabled'] = 'Whether the feature that allows to save drafts via Javascript and XmlHttpRequest is enabled [Default = Yes]';
-$messages['help_locale_folder'] = 'Folder where the locale files are stored [Default = ./locale]';
-$messages['help_default_locale'] = 'Default language settings for new blogs [Default = en_UK]';
-$messages['help_default_blog_id'] = 'Default blog that will be shown if no other is specified [Default = 1]';
-$messages['help_default_time_offset'] = 'Default time offset for new blogs [Default = 0]';
-$messages['help_html_allowed_tags_in_comments'] = 'Space-separated list of the HTML tags that are allowed in comments [Default = &lt;a&gt;&lt;i&gt;&lt;br&gt;&lt;br/&gt;&lt;b&gt;]';
-$messages['help_referer_tracker_enabled'] = 'Enable or disable the feature to save referrers to the database. Set to disabled for higher performance [Default = Yes]';
-$messages['help_show_more_enabled'] = 'Enable or disable the "more..." feature by default for new blogs [Default = Yes]';
-$messages['help_update_article_reads'] = 'Enable or disable the update of the counter of times that an article has been read is updated or not. Set to disabled for higher performance [Default = Yes]';
-$messages['help_update_cached_article_reads'] = 'Enable or disable the update of the counter of times that an article has been read is updated, even when caching has been turned on [Default = Yes]';
-$messages['help_xmlrpc_ping_enabled'] = 'Enable or disable sending XMLRPC pings to sites that support this feature [Default = Yes]';
-$messages['help_send_xmlrpc_pings_enabled_by_default'] = 'Enable or disable by default this feature when posting or updating an article [Default = Yes]';
-$messages['help_xmlrpc_ping_hosts'] = 'URL pointing to the XMLRPC interface of sites that support the XMLRPC ping specification. Put each URL in one new line [Default = http://rpc.weblogs.com/RPC2]';
-$messages['help_trackback_server_enabled'] = 'Enable or disable the feature to receive incoming trackbacks [Default = Yes]';
-$messages['help_htmlarea_enabled'] = 'Enable or disable the WYSIWYG post editor by default in new blogs [Default = Yes]';
-$messages['help_plugin_manager_enabled'] = 'Enable or disable plugins [Default = Yes]';
-$messages['help_minimum_password_length'] = 'Minimum length for passwords [Default = 4]';
-$messages['help_xhtml_converter_enabled'] = 'If enabled, LifeType will try to convert all HTML code into proper XHTML code [Default = Yes]';
-$messages['help_xhtml_converter_aggressive_mode_enabled'] = 'If enabled, LifeType will try even harder to generate XHTML out of HTML code, but it will be more prone to errors [Default = No]';
-$messages['help_session_save_path'] = 'Please use this setting to change the folder where LifeType stores its session data, via the PHP function session_save_path() Please make sure that the folder is writable by the web server. Leave empty to use PHP\'s default session folder [Default = (empty)]';
+$messages['help_comments_enabled'] = 'Enable comments for new blogs by default. [Default = Yes]';
+$messages['help_beautify_comments_text'] = 'If enabled, comments posted by users will be formatted by adding paragraphs and auto-linking all URLs. [Default = Yes]';
+$messages['help_temp_folder'] = 'Folder that LifeType can use to write its temporary data such as compiled templates, etc. Use a folder outside the web server tree for increased security. [Default = ./tmp]';
+$messages['help_base_url'] = 'Base URL where this blog is installed.';
+$messages['help_subdomains_enabled'] = 'Enable or disable subdomains. Please see the documentation for more information regarding subdomains. [Default = No]';
+$messages['help_include_blog_id_in_url'] = 'Meaningful only when subdomains are enabled and "normal" URLs are enabled, forces internally-generated URLs not to have the "blogId" parameter. Do not change unless you know what you are doing. [Default = Yes]';
+$messages['help_script_name'] = 'Set this if you need to rename index.php to something else. [Default = index.php]';
+$messages['help_show_posts_max'] = 'Maximum number of posts shown in the main page. Only meaningful for new blogs. [Default = 15]';
+$messages['help_recent_posts_max'] = 'Maximum number of recent posts shown in the main page. Only meaningful for new blogs. [Default = 10]';
+$messages['help_save_drafts_via_xmlhttprequest_enabled'] = 'Whether the feature that allows to save drafts via Javascript and XmlHttpRequest is enabled. [Default = Yes]';
+$messages['help_locale_folder'] = 'Folder where the locale files are stored. [Default = ./locale]';
+$messages['help_default_locale'] = 'Default language settings for new blogs. [Default = en_UK]';
+$messages['help_default_blog_id'] = 'Default blog that will be shown if no other is specified. [Default = 1]';
+$messages['help_default_