[pLog-svn] r4381 - in plog/trunk: . bin-devel class class/action class/action/admin class/cache class/cache/Cache_Lite class/dao class/dao/userdata class/data class/data/validator class/gallery/dao class/gallery/resizers class/net/http class/security class/summary/action class/test/tests/dao class/test/tests/data class/test/tests/data/validator class/test/tests/ui class/view/admin class/view/admin/chooser config docs-devel js/tinymce js/tinymce/plugins js/tinymce/plugins/more js/tinymce/plugins/more/images js/tinymce/plugins/more/langs js/ui plugins templates/LifeType/en_UK templates/admin templates/summary tools

oscar at devel.lifetype.net oscar at devel.lifetype.net
Wed Dec 6 17:41:39 GMT 2006


Author: oscar
Date: 2006-12-06 17:41:38 +0000 (Wed, 06 Dec 2006)
New Revision: 4381

Added:
   plog/trunk/bin-devel/.htaccess
   plog/trunk/class/.htaccess
   plog/trunk/class/test/tests/dao/commentscommon_test.class.php
   plog/trunk/js/tinymce/plugins/more/
   plog/trunk/js/tinymce/plugins/more/editor_plugin.js
   plog/trunk/js/tinymce/plugins/more/images/
   plog/trunk/js/tinymce/plugins/more/images/help.gif
   plog/trunk/js/tinymce/plugins/more/images/more.gif
   plog/trunk/js/tinymce/plugins/more/images/more_bug.gif
   plog/trunk/js/tinymce/plugins/more/langs/
   plog/trunk/js/tinymce/plugins/more/langs/en.js
   plog/trunk/js/tinymce/plugins/more/more.css
   plog/trunk/plugins/.htaccess
   plog/trunk/tools/.htaccess
Removed:
   plog/trunk/js/tinymce/plugins/more/editor_plugin.js
   plog/trunk/js/tinymce/plugins/more/images/
   plog/trunk/js/tinymce/plugins/more/images/help.gif
   plog/trunk/js/tinymce/plugins/more/images/more.gif
   plog/trunk/js/tinymce/plugins/more/images/more_bug.gif
   plog/trunk/js/tinymce/plugins/more/langs/
   plog/trunk/js/tinymce/plugins/more/langs/en.js
   plog/trunk/js/tinymce/plugins/more/more.css
Modified:
   plog/trunk/admin.php
   plog/trunk/class/action/admin/adminaddblogaction.class.php
   plog/trunk/class/action/admin/adminaddpostaction.class.php
   plog/trunk/class/action/admin/adminupdateblogsettingsaction.class.php
   plog/trunk/class/action/blogaction.class.php
   plog/trunk/class/cache/Cache_Lite/Lite.php
   plog/trunk/class/cache/cache.class.php
   plog/trunk/class/cache/cachemanager.class.php
   plog/trunk/class/dao/article.class.php
   plog/trunk/class/dao/articlecategories.class.php
   plog/trunk/class/dao/articlenotifications.class.php
   plog/trunk/class/dao/commentscommon.class.php
   plog/trunk/class/dao/daocacheconstants.properties.php
   plog/trunk/class/dao/userdata/baseuserdataprovider.class.php
   plog/trunk/class/dao/userinfo.class.php
   plog/trunk/class/data/textfilter.class.php
   plog/trunk/class/data/validator/usernamevalidator.class.php
   plog/trunk/class/gallery/dao/galleryresource.class.php
   plog/trunk/class/gallery/dao/galleryresources.class.php
   plog/trunk/class/gallery/dao/galleryresourcestorage.class.php
   plog/trunk/class/gallery/resizers/gallerythumbnailgenerator.class.php
   plog/trunk/class/net/http/subdomains.class.php
   plog/trunk/class/security/bayesianfilter.class.php
   plog/trunk/class/summary/action/chooseblogtemplateaction.class.php
   plog/trunk/class/summary/action/doblogregistration.class.php
   plog/trunk/class/summary/action/dofinishregister.class.php
   plog/trunk/class/summary/action/dousercreation.class.php
   plog/trunk/class/summary/action/douserregister.class.php
   plog/trunk/class/summary/action/registeraction.class.php
   plog/trunk/class/test/tests/dao/article_test.class.php
   plog/trunk/class/test/tests/data/textfilter_test.class.php
   plog/trunk/class/test/tests/data/validator/usernamevalidator_test.class.php
   plog/trunk/class/test/tests/ui/articlecategoriesui_test.class.php
   plog/trunk/class/view/admin/admindashboardview.class.php
   plog/trunk/class/view/admin/adminview.class.php
   plog/trunk/class/view/admin/chooser/adminsimpleresourceslistview.class.php
   plog/trunk/config/config.properties.php
   plog/trunk/config/userdata.properties.php
   plog/trunk/debug.php
   plog/trunk/docs-devel/Doxyfile
   plog/trunk/error.php
   plog/trunk/index.php
   plog/trunk/js/tinymce/tiny_mce-plog.js
   plog/trunk/js/ui/common.js
   plog/trunk/js/ui/summary.js
   plog/trunk/resserver.php
   plog/trunk/runtests.php
   plog/trunk/templates/LifeType/en_UK/strings.txt
   plog/trunk/templates/admin/dashboard.template
   plog/trunk/templates/admin/editcomments.template
   plog/trunk/templates/admin/edittrackbacks.template
   plog/trunk/templates/admin/newpost.template
   plog/trunk/templates/summary/registerstep2.template
   plog/trunk/templates/summary/registerstep3.template
   plog/trunk/templates/summary/registerstep4.template
   plog/trunk/tools/generateData.php
   plog/trunk/tools/genloadtestdata.php
   plog/trunk/trackback.php
   plog/trunk/updatedbschema.php
   plog/trunk/version.php
Log:
merge of revisions 4274 to 4380 (1.1.3 to trunk)


Modified: plog/trunk/admin.php
===================================================================
--- plog/trunk/admin.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/admin.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -43,5 +43,5 @@
     $controller->process( HttpVars::getRequest(), "op");
 	
     // log statistics, only for debugging purposes
-    Info::logMetrics();
+    //Info::logMetrics();
 ?>

Copied: plog/trunk/bin-devel/.htaccess (from rev 4380, plog/tags/lifetype-1.1.3/bin-devel/.htaccess)

Copied: plog/trunk/class/.htaccess (from rev 4380, plog/tags/lifetype-1.1.3/class/.htaccess)

Modified: plog/trunk/class/action/admin/adminaddblogaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaddblogaction.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/action/admin/adminaddblogaction.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -34,6 +34,7 @@
 				$this->registerFieldValidator( "blogSubDomain", new DomainValidator());
 				$this->registerFieldValidator( "blogMainDomain", new DomainValidator());
 			}
+
         	$this->registerField( "userName" );	
 			$view = new AdminCreateBlogView( $this->_blogInfo );
 			$view->setErrorMessage( $this->_locale->tr( "error_adding_blog" ));

Modified: plog/trunk/class/action/admin/adminaddpostaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaddpostaction.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/action/admin/adminaddpostaction.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -152,9 +152,11 @@
             	//$article->setId( $artId );
                 $message = $this->_locale->tr("post_added_ok");
                 
-                // train the filter
-	            lt_include( PLOG_CLASS_PATH."class/bayesian/bayesianfiltercore.class.php" );
-                BayesianFilterCore::trainWithArticle( $article );
+                // train the filter, but only if enabled
+				if( $this->_config->getValue( "bayesian_filter_enabled" ) == true ) {
+		            include_once( PLOG_CLASS_PATH."class/bayesian/bayesianfiltercore.class.php" );
+	                BayesianFilterCore::trainWithArticle( $article );
+				}
                                 
         		// add the article notification if requested to do so
             	if( $this->_sendNotification ) {

Modified: plog/trunk/class/action/admin/adminupdateblogsettingsaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminupdateblogsettingsaction.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/action/admin/adminupdateblogsettingsaction.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -54,10 +54,8 @@
 			$this->registerField( "blogShowInSummary" );
 			$this->registerField( "blogSendNotification" );
 			$this->registerField( "blogCommentOnlyRegisteredUsers" );
-			if( Subdomains::getSubdomainsEnabled()) {
-				$this->registerFieldValidator( "blogSubDomain", new DomainValidator());
-				$this->registerFieldValidator( "blogMainDomain", new DomainValidator());			
-			}
+			$this->registerField( "blogSubDomain" );
+			$this->registerField( "blogMainDomain" );
 			// set the view that we're going to use
 			$view = new AdminBlogSettingsView( $this->_blogInfo );
 			$view->setErrorMessage( $this->_locale->tr("error_updating_settings"));
@@ -66,6 +64,45 @@
 			$this->requirePermission( "update_blog" );
         }
         
+		function validate()
+		{
+			$valid = parent::validate();
+			
+            // check to see whether we are going to save subdomain information
+            if( Subdomains::getSubdomainsEnabled()) {
+
+				// Translate a few characters to valid names, and remove the rest
+                $mainDomain = Textfilter::domainize($this->_request->getValue( "blogMainDomain" ));
+                if(!$mainDomain)
+                    $mainDomain = "?";
+                $subDomain = Textfilter::domainize($this->_request->getValue( "blogSubDomain" ));
+
+                // get list of allowed domains
+				$available_domains = Subdomains::getAvailableDomains();
+				
+                if($mainDomain == "?")
+                    $this->blogDomain = $subDomain;
+                else {
+                    $this->blogDomain = $subDomain . "." . $mainDomain;
+				}							
+
+                // make sure the mainDomain parameter is one of the blogAvailableDomains and if not, 
+				// force a validation error
+                if( !Subdomains::isDomainAvailable( $mainDomain ) || !Subdomains::isValidDomainName( $subDomain )) {
+					$valid = false;
+					$this->_form->setFieldValidationStatus( "blogSubDomain", false );					
+					$this->validationErrorProcessing();					
+                }
+				if( Subdomains::domainNameExists( $this->blogDomain, $this->_blogInfo->getId() )) {
+					$valid = false;
+					$this->_form->setFieldValidationStatus( "blogSubDomain", false );					
+					$this->validationErrorProcessing();					
+				}				
+            }
+
+			return( $valid );			
+		}
+
         /**
          * Carries out the specified action
          */
@@ -110,7 +147,6 @@
                 if(!$mainDomain)
 					$mainDomain = "?";
                 $subDomain = Textfilter::domainize($this->_request->getValue( "blogSubDomain" ));
-
                 if( !Subdomains::isDomainAvailable( $mainDomain )) {
                     $this->_view = new AdminBlogSettingsView( $this->_blogInfo );
                     $this->_view->setErrorMessage( $this->_locale->tr("error_updating_blog_domain"));

Modified: plog/trunk/class/action/blogaction.class.php
===================================================================
--- plog/trunk/class/action/blogaction.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/action/blogaction.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -166,19 +166,14 @@
                 lt_include( PLOG_CLASS_PATH."class/net/http/subdomains.class.php" );
 
                 $subdomainInfo = Subdomains::getSubdomainInfoFromRequest();
-                if( !empty($subdomainInfo["blogdomain"])
-                    && $this->_request->getValue( 'blogDomain' ) == "" )
-                {
+
+                if( !empty($subdomainInfo["blogdomain"]) && $this->_request->getValue( 'blogDomain' ) == "" ) {
                     $this->_request->setValue( 'blogDomain', $subdomainInfo["blogdomain"] );
                 }
-                if( !empty($subdomainInfo["username"])
-                    && $this->_request->getValue( 'blogUserName' ) == "" )
-                {
+                if( !empty($subdomainInfo["username"]) && $this->_request->getValue( 'blogUserName' ) == "" ) {
                     $this->_request->setValue( 'blogUserName', $subdomainInfo["username"] );
                 }
-                if( !empty($subdomainInfo["blogname"])
-                    && $this->_request->getValue( 'blogName' ) == "" )
-                {
+                if( !empty($subdomainInfo["blogname"]) && $this->_request->getValue( 'blogName' ) == "" ) {
                     $this->_request->setValue( 'blogName', $subdomainInfo["blogname"] );
                 }
             }
@@ -201,14 +196,23 @@
                     // if the user exists and is valid...
                 	if( $userInfo ) {
                     	$userBlogs = $users->getUsersBlogs( $userInfo->getId(), BLOG_STATUS_ACTIVE );
-                        // check if he or she belogs to any blog. If he or she does, simply
-                        // get the first one (any better rule for this?)
-                    	if( !empty($userBlogs)) {						
-	                		$blogId = $userBlogs[0]->getId();
-                        } else {
+						// check all the blogs and pick the first one that is owned. If none is owned, then pick a random
+						// one (the last one that was processed)
+                    	if( !empty($userBlogs)) {
+							$i = 0;
+							$found = false;
+							while( $i < count($userBlogs) && !$found ) {
+								$blog = $userBlogs[$i];
+								if( $blog->getOwnerId() == $userInfo->getId()) $found = true;
+								$i++;
+							}
+							$blogId = $blog->getId();
+                        } 
+						else {
                         	$blogId = $this->_config->getValue('default_blog_id');
                         }
-                    } else {
+                    } 
+					else {
                     	$blogId = $this->_config->getValue('default_blog_id');
                     }
                 }

Modified: plog/trunk/class/cache/Cache_Lite/Lite.php
===================================================================
--- plog/trunk/class/cache/Cache_Lite/Lite.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/cache/Cache_Lite/Lite.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -2,33 +2,34 @@
 
 lt_include( PLOG_CLASS_PATH."class/object/loggable.class.php" );
 
+/**
+* \ingroup Cache
+*
+* Fast, light and safe Cache Class
+*
+* Cache_Lite is a fast, light and safe cache system. It's optimized
+* for file containers. It is fast and safe (because it uses file
+* locking and/or anti-corruption tests).
+*
+* There are some examples in the 'docs/examples' file
+* Technical choices are described in the 'docs/technical' file
+*
+* Memory Caching is from an original idea of
+* Mike BENOIT <ipso at snappymail.ca>
+*
+* Nota : A chinese documentation (thanks to RainX <china_1982 at 163.com>) is
+* available at :
+* http://rainx.phpmore.com/manual/cache_lite.html
+*
+* @package Cache_Lite
+* @category Caching
+* @version $Id: Lite.php,v 1.45 2006/06/03 08:10:33 fab Exp $
+* @author Fabien MARTY <fab at php.net>
+*/
+
 define('CACHE_LITE_ERROR_RETURN', 1);
 define('CACHE_LITE_ERROR_DIE', 8);
 
-/**
- * \ingroup Cache
- *
- * Fast, light and safe Cache Class
- *
- * Cache_Lite is a fast, light and safe cache system. It's optimized
- * for file containers. It is fast and safe (because it uses file
- * locking and/or anti-corruption tests).
- *
- * There are some examples in the 'docs/examples' file
- * Technical choices are described in the 'docs/technical' file
- *
- * Memory Caching is from an original idea of
- * Mike BENOIT <ipso at snappymail.ca>
- *
- * Nota : A chinese documentation (thanks to RainX <china_1982 at 163.com>) is
- * available at :
- * http://rainx.phpmore.com/manual/cache_lite.html
- *
- * @package Cache_Lite
- * @category Caching
- * @version $Id: Lite.php,v 1.37 2005/11/24 20:10:01 fab Exp $
- * @author Fabien MARTY <fab at php.net>
- */
 class Cache_Lite extends Loggable
 {
 
@@ -239,6 +240,18 @@
     */
     var $_hashedDirectoryUmask = 0700;
     
+    /**
+     * API break for error handling in CACHE_LITE_ERROR_RETURN mode
+     * 
+     * In CACHE_LITE_ERROR_RETURN mode, error handling was not good because
+     * for example save() method always returned a boolean (a PEAR_Error object
+     * would be better in CACHE_LITE_ERROR_RETURN mode). To correct this without
+     * breaking the API, this option (false by default) can change this handling.
+     * 
+     * @var boolean
+     */
+    var $_errorHandlingAPIBreak = false;
+    
     // --- Public methods ---
 
     /**
@@ -258,10 +271,11 @@
     *     'onlyMemoryCaching' => enable / disable only memory caching (boolean),
     *     'memoryCachingLimit' => max nbr of records to store into memory caching (int),
     *     'fileNameProtection' => enable / disable automatic file name protection (boolean),
-    *     'automaticSerialization' => enable / disable automatic serialization (boolean)
-    *     'automaticCleaningFactor' => distable / tune automatic cleaning process (int)
-    *     'hashedDirectoryLevel' => level of the hashed directory system (int)
-    *     'hashedDirectoryUmask' => umask for hashed directory structure (int)
+    *     'automaticSerialization' => enable / disable automatic serialization (boolean),
+    *     'automaticCleaningFactor' => distable / tune automatic cleaning process (int),
+    *     'hashedDirectoryLevel' => level of the hashed directory system (int),
+    *     'hashedDirectoryUmask' => umask for hashed directory structure (int),
+    *     'errorHandlingAPIBreak' => API break for better error handling ? (boolean)
     * );
     *
     * @param array $options options
@@ -270,11 +284,9 @@
     function Cache_Lite($options = array(NULL))
     {
         $this->Loggable();
-
         foreach($options as $key => $value) {
             $this->setOption($key, $value);
         }
-        $this->_setRefreshTime();
     }
     
     /**
@@ -286,8 +298,9 @@
     * @var mixed $value value of the option
     * @access public
     */
-    function setOption($name, $value) {
-        $availableOptions = array('hashedDirectoryUmask', 'hashedDirectoryLevel', 'automaticCleaningFactor', 'automaticSerialization', 'fileNameProtection', 'memoryCaching', 'onlyMemoryCaching', 'memoryCachingLimit', 'cacheDir', 'caching', 'lifeTime', 'fileLocking', 'writeControl', 'readControl', 'readControlType', 'pearErrorMode');
+    function setOption($name, $value) 
+    {
+        $availableOptions = array('errorHandlingAPIBreak', 'hashedDirectoryUmask', 'hashedDirectoryLevel', 'automaticCleaningFactor', 'automaticSerialization', 'fileNameProtection', 'memoryCaching', 'onlyMemoryCaching', 'memoryCachingLimit', 'cacheDir', 'caching', 'lifeTime', 'fileLocking', 'writeControl', 'readControl', 'readControlType', 'pearErrorMode');
         if (in_array($name, $availableOptions)) {
             $property = '_'.$name;
             $this->$property = $value;
@@ -300,7 +313,7 @@
     * @param string $id cache id
     * @param string $group name of the cache group
     * @param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested
-    * @return string data of the cache (or false if no cache available)
+    * @return string data of the cache (else : false)
     * @access public
     */
     function get($id, $group = 'default', $doNotTestCacheValidity = false)
@@ -309,19 +322,19 @@
         $this->_group = $group;
         $data = false;
         if ($this->_caching) {
+            $this->_setRefreshTime();
             $this->_setFileName($id, $group);
+            clearstatcache();
             if ($this->_memoryCaching) {
                 if (isset($this->_memoryCachingArray[$this->_file])) {
                     if ($this->_automaticSerialization) {
                         return unserialize($this->_memoryCachingArray[$this->_file]);
-                    } else {
-                        return $this->_memoryCachingArray[$this->_file];
                     }
-                } else {
-                    if ($this->_onlyMemoryCaching) {
-                        return false;
-                    }
+                    return $this->_memoryCachingArray[$this->_file];
                 }
+                if ($this->_onlyMemoryCaching) {
+                    return false;
+                }                
             }
             if (($doNotTestCacheValidity) || (is_null($this->_refreshTime))) {
                 if (file_exists($this->_file)) {
@@ -349,7 +362,7 @@
     * @param string $data data to put in cache (can be another type than strings if automaticSerialization is on)
     * @param string $id cache id
     * @param string $group name of the cache group
-    * @return boolean true if no problem
+    * @return boolean true if no problem (else : false or a PEAR_Error object)
     * @access public
     */
     function save($data, $id = NULL, $group = 'default')
@@ -367,22 +380,32 @@
                     return true;
                 }
             }
-	    if ($this->_automaticCleaningFactor>0) {
+            if ($this->_automaticCleaningFactor>0) {
                 $rand = rand(1, $this->_automaticCleaningFactor);
-	        if ($rand==1) {
-	            $this->clean(false, 'old');
-		}
+                if ($rand==1) {
+                    $this->clean(false, 'old');
+                }
             }
             if ($this->_writeControl) {
-                if (!$this->_writeAndControl($data)) {
+                $res = $this->_writeAndControl($data);
+                if (is_bool($res)) {
+                    if ($res) {
+                        return true;  
+                    }
+                    // if $res if false, we need to invalidate the cache
                     @touch($this->_file, time() - 2*abs($this->_lifeTime));
                     return false;
-                } else {
-                    return true;
-                }
+                }            
             } else {
-	        return $this->_write($data);
-	    }
+                $res = $this->_write($data);
+            }
+            if (is_object($res)) {
+	        	// $res is a PEAR_Error object 
+                if (!($this->_errorHandlingAPIBreak)) {   
+	                return false; // we return false (old API)
+	            }
+	        }
+            return $res;
         }
         return false;
     }
@@ -431,13 +454,13 @@
     * Set to debug mode
     *
     * When an error is found, the script will stop and the message will be displayed
-    * (in debug mode only).
+    * (in debug mode only). 
     *
     * @access public
     */
     function setToDebug()
     {
-        $this->_pearErrorMode = CACHE_LITE_ERROR_DIE;
+        $this->setOption('pearErrorMode', CACHE_LITE_ERROR_DIE);
     }
 
     /**
@@ -497,10 +520,39 @@
     *
     * @return int last modification time
     */
-    function lastModified() {
+    function lastModified() 
+    {
         return @filemtime($this->_file);
     }
     
+    /**
+    * Trigger a PEAR error
+    *
+    * To improve performances, the PEAR.php file is included dynamically.
+    * The file is so included only when an error is triggered. So, in most
+    * cases, the file isn't included and perfs are much better.
+    *
+    * @param string $msg error message
+    * @param int $code error code
+    * @access public
+    */
+    function raiseError($msg, $code)
+    {
+        $this->log->error($msg, LOGGER_PRIO_ERROR);
+    }
+    
+    /**
+     * Extend the life of a valid cache file
+     * 
+     * see http://pear.php.net/bugs/bug.php?id=6681
+     * 
+     * @access public
+     */
+    function extendLife()
+    {
+        @touch($this->_file);
+    }
+    
     // --- Private methods ---
     
     /**
@@ -508,7 +560,8 @@
     *
     * @access private
     */
-    function _setRefreshTime() {
+    function _setRefreshTime() 
+    {
         if (is_null($this->_lifeTime)) {
             $this->_refreshTime = null;
         } else {
@@ -526,11 +579,9 @@
     function _unlink($file)
     {
         if (file_exists($file) && !@unlink($file)) {
-            $this->log->error('Unable to remove cache !', LOGGER_PRIO_ERROR );
-            return false;
-        } else {
-            return true;
+            return $this->raiseError('Cache_Lite : Unable to remove cache !', -3);
         }
+        return true;        
     }
 
     /**
@@ -562,8 +613,7 @@
             }
         }
         if (!($dh = opendir($dir))) {
-            $this->log->error('Unable to open cache directory!', LOGGER_PRIO_ERROR );
-            return false;
+            return $this->raiseError('Cache_Lite : Unable to open cache directory !', -4);
         }
         $result = true;
         while ($file = readdir($dh)) {
@@ -575,7 +625,7 @@
                             case 'old':
                                 // files older than lifeTime get deleted from cache
                                 if (!is_null($this->_lifeTime)) {
-                                    if ((mktime() - filemtime($file2)) > $this->_lifeTime) {
+                                    if ((mktime() - @filemtime($file2)) > $this->_lifeTime) {
                                         $result = ($result and ($this->_unlink($file2)));
                                     }
                                 }
@@ -654,7 +704,7 @@
     /**
     * Read the cache file and return the content
     *
-    * @return string content of the cache file
+    * @return string content of the cache file (else : false or a PEAR_Error object)
     * @access private
     */
     function _read()
@@ -662,7 +712,7 @@
         $fp = @fopen($this->_file, "rb");
         if ($this->_fileLocking) @flock($fp, LOCK_SH);
         if ($fp) {
-            clearstatcache(); // because the filesize can be cached by PHP itself...
+            clearstatcache();
             $length = @filesize($this->_file);
             $mqr = get_magic_quotes_runtime();
             set_magic_quotes_runtime(0);
@@ -681,7 +731,7 @@
             if ($this->_readControl) {
                 $hashData = $this->_hash($data, $this->_readControlType);
                 if ($hashData != $hashControl) {
-                    if (is_null($this->_lifeTime)) {
+                    if (!(is_null($this->_lifeTime))) {
                         @touch($this->_file, time() - 2*abs($this->_lifeTime)); 
                     } else {
                         @unlink($this->_file);
@@ -691,28 +741,28 @@
             }
             return $data;
         }
-        $this->log->error( 'Unable to read cache !', LOGGER_PRIO_ERROR );
-        return false;
+        return $this->raiseError('Cache_Lite : Unable to read cache !', -2); 
     }
     
     /**
     * Write the given data in the cache file
     *
     * @param string $data data to put in cache
-    * @return boolean true if ok
+    * @return boolean true if ok (a PEAR_Error object else)
     * @access private
     */
     function _write($data)
     {
-       	if(!is_dir(dirname($this->_file)) && ($this->_hashedDirectoryLevel>0)) {
+        if (!is_dir(dirname($this->_file)) && $this->_hashedDirectoryLevel > 0) {
             $hash = md5($this->_fileName);
             $root = $this->_cacheDir;
             for ($i=0 ; $i<$this->_hashedDirectoryLevel ; $i++) {
                 $root = $root . 'cache_' . substr($hash, 0, $i + 1) . '/';
-                if(!is_dir($root)) @mkdir($root, $this->_hashedDirectoryUmask);
-            }        	
+                if (!(@is_dir($root))) {
+                    @mkdir($root, $this->_hashedDirectoryUmask);
+                }
+            }
         }
-        
         $fp = @fopen($this->_file, "wb");
         if ($fp) {
             if ($this->_fileLocking) @flock($fp, LOCK_EX);
@@ -724,22 +774,30 @@
             if ($this->_fileLocking) @flock($fp, LOCK_UN);
             @fclose($fp);
             return true;
-        } 
-        $this->log->error('Unable to write cache file : '.$this->_file, LOGGER_PRIO_ERROR );
-        return false;
+        }      
+        return $this->raiseError('Cache_Lite : Unable to write cache file : '.$this->_file, -1);
     }
        
     /**
     * Write the given data in the cache file and control it just after to avoir corrupted cache entries
     *
     * @param string $data data to put in cache
-    * @return boolean true if the test is ok
+    * @return boolean true if the test is ok (else : false or a PEAR_Error object)
     * @access private
     */
     function _writeAndControl($data)
     {
-        $this->_write($data);
-        $dataRead = $this->_read($data);
+        $result = $this->_write($data);
+        if (is_object($result)) {
+            return $result; # We return the PEAR_Error object
+        }
+        $dataRead = $this->_read();
+        if (is_object($dataRead)) {
+            return $result; # We return the PEAR_Error object
+        }
+        if ((is_bool($dataRead)) && (!$dataRead)) {
+            return false; 
+        }
         return ($dataRead==$data);
     }
     
@@ -761,12 +819,8 @@
         case 'strlen':
             return sprintf('% 32d', strlen($data));
         default:
-            $this->log->error('Unknown cache controlType! Caching will be disabled 
-                            (available values are only \'md5\', \'crc32\', \'strlen\')',
-                            LOGGER_PRIO_ERROR );
-            return false;
+            return $this->raiseError('Unknown controlType ! (available values are only \'md5\', \'crc32\', \'strlen\')', -5);
         }
-        return false;
     }
     
 } 


Property changes on: plog/trunk/class/cache/Cache_Lite/Lite.php
___________________________________________________________________
Name: svn:executable
   - *


Property changes on: plog/trunk/class/cache/cache.class.php
___________________________________________________________________
Name: svn:executable
   - *


Property changes on: plog/trunk/class/cache/cachemanager.class.php
___________________________________________________________________
Name: svn:executable
   - *

Modified: plog/trunk/class/dao/article.class.php
===================================================================
--- plog/trunk/class/dao/article.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/dao/article.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -327,30 +327,14 @@
          * @return An array of UserComment objects.
          * @see UserComment
          */
-		function getComments( $onlyActive = true )
+		function getComments( $status = COMMENT_STATUS_NONSPAM )
 		{
 			// load the comments if they haven't been loaded yet
-			if( is_null($this->_comments) ) {
-				lt_include( PLOG_CLASS_PATH.'class/dao/articlecomments.class.php' );			
-				$userComments =  new ArticleComments();
-				$blogInfo = $this->getBlogInfo();
-				$blogSettings = $blogInfo->getSettings();
-				$this->setComments( $userComments->getPostComments( $this->getId(), $blogSettings->getValue( 'comments_order' ), COMMENT_STATUS_ALL ));
-			}
-
-			// if we only want to return the active ones, then we have to loop through
-			// the array once more			
-			if( $onlyActive ) {
-				$comments = Array();
-				foreach( $this->_comments as $comment ) {
-					if( $comment->getStatus() == COMMENT_STATUS_NONSPAM )
-						$comments[] = $comment;
-				}
-			}
-			else 
-				$comments = $this->_comments;
-				
-			return( $comments );
+			lt_include( PLOG_CLASS_PATH.'class/dao/articlecomments.class.php' );			
+			$userComments =  new ArticleComments();
+			$blogInfo = $this->getBlogInfo();
+			$blogSettings = $blogInfo->getSettings();
+			return( $userComments->getPostComments( $this->getId(), $blogSettings->getValue( 'comments_order' ), $status ));
 		}
 		
         /**

Modified: plog/trunk/class/dao/articlecategories.class.php
===================================================================
--- plog/trunk/class/dao/articlecategories.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/dao/articlecategories.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -303,7 +303,7 @@
 			$category->setNumPublishedArticles( $this->getNumItems (
 					$this->getPrefix()."article_categories_link acl, ".$this->getPrefix()."articles a",
 					"acl.category_id = '".Db::qstr($category->getId())."' and acl.article_id = a.id and a.status = ".POST_STATUS_PUBLISHED,
-					"category_id"
+					"acl.category_id"
 			));
         	if( $result = $this->update( $category )) {
 				$this->_cache->removeData( $category->getBlogId(), CACHE_ARTICLE_CATEGORIES_BLOG );

Modified: plog/trunk/class/dao/articlenotifications.class.php
===================================================================
--- plog/trunk/class/dao/articlenotifications.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/dao/articlenotifications.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -100,7 +100,7 @@
           * @param postId The post we want to check if there are notifications
           * @param blogId Just in case, the blog to which that post belongs.
           */
-         function notifyUsers( $postId, $blogInfo, $message = null)
+         function notifyUsers( $postId, $blogInfo)
          {
             lt_include( PLOG_CLASS_PATH."class/dao/users.class.php" );
             
@@ -108,11 +108,6 @@
          	$blogId = $blogInfo->getId();
          	$artNotifs = $this->getArticleNotifications( $postId, $blogId );
 
-            // default message.
-            // NOTE: Should this be translatable???
-            if( $message == null )
-            	$message = "There has been actitivity in the article with id ".$postId;
-
             if( empty($artNotifs))
             	return;
 

Modified: plog/trunk/class/dao/commentscommon.class.php
===================================================================
--- plog/trunk/class/dao/commentscommon.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/dao/commentscommon.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -56,7 +56,8 @@
         {
         	if(( $result = $this->add( $comment ))) {
         		lt_include( PLOG_CLASS_PATH."class/dao/articles.class.php" );
-				$this->_cache->removeData( $comment->getArticleId(), CACHE_ARTICLE_COMMENTS_BYARTICLE );
+				$this->_cache->removeData( $comment->getArticleId(), CACHE_ARTICLE_COMMENTS_BYARTICLE_NEWEST_TO_OLDEST );
+				$this->_cache->removeData( $comment->getArticleId(), CACHE_ARTICLE_COMMENTS_BYARTICLE_OLDEST_TO_NEWEST );
 				// update the article comments
 				$article = $comment->getArticle();
 				$blog = $article->getBlogInfo();
@@ -106,14 +107,18 @@
 		                          $page = -1, 
 		                          $itemsPerPage = DEFAULT_ITEMS_PER_PAGE )
 		{
-			if( $order == COMMENT_ORDER_NEWEST_FIRST )
+			if( $order == COMMENT_ORDER_NEWEST_FIRST ){
 				$order = Array( "date" => "DESC" );
-			else
+                $cache_item = CACHE_ARTICLE_COMMENTS_BYARTICLE_NEWEST_TO_OLDEST;
+            }
+			else{
 				$order = Array( "date" => "ASC" );
+                $cache_item = CACHE_ARTICLE_COMMENTS_BYARTICLE_OLDEST_TO_NEWEST;
+            }
 		
 			$comments = $this->getMany( "article_id",
 			                            $artid,
-			                            CACHE_ARTICLE_COMMENTS_BYARTICLE,
+                                        $cache_item,
 			                            Array(),
 			                            $order,
 										"",
@@ -179,29 +184,42 @@
         	$numComments = 0;
 			$articles = new Articles();
 			$article = $articles->getArticle( $artId );        	
-        
+
+            if(!$article)
+                return 0;
+            
 			if( $type == COMMENT_TYPE_COMMENT ) {
-				if( $status == COMMENT_STATUS_ALL && $article ) {
+				if( $status == COMMENT_STATUS_ALL ) {
 					$numComments = $article->getTotalComments();
 				}
-				elseif( $status == COMMENT_STATUS_NONSPAM && $article ) {
+				elseif( $status == COMMENT_STATUS_NONSPAM ) {
 					$numComments = $article->getNumComments();
 				}
+				elseif( $status == COMMENT_STATUS_SPAM ) {
+					$numComments = $article->getTotalComments() - $article->getNumComments();
+				}
 				else {
-					$numComments = $this->getPostComments( $artId, COMMENT_ORDER_NEWEST_FIRST, $status, $type );
+                    $numComments = 0;
 				}
 			}
-			else {
-				if( $status == COMMENT_STATUS_ALL && $article ) {
+			else if($type == COMMENT_TYPE_TRACKBACK) {
+				if( $status == COMMENT_STATUS_ALL ) {
 					$numComments = $article->getTotalTrackBacks();
 				}
-				elseif( $status == COMMENT_STATUS_NONSPAM && $article ) {
+				elseif( $status == COMMENT_STATUS_NONSPAM ) {
 					$numComments = $article->getNumTrackBacks();
 				}
+				elseif( $status == COMMENT_STATUS_SPAM ) {
+                        $numComments = $article->getTotalTrackbacks() - $article->getNumTrackbacks();
+				}
 				else {
-					$numComments = $this->getPostComments( $artId, COMMENT_ORDER_NEWEST_FIRST, $status, $type );
-				}			
+                    $numComments = 0;
+				}
 			}
+            else{
+                $numComments = $this->getNumPostComments($artId, $status, COMMENT_TYPE_COMMENT) +
+                    $this->getNumPostComments($artId, $status, COMMENT_TYPE_TRACKBACK);
+            }
 			
 			return( $numComments );
         }
@@ -268,7 +286,8 @@
 				         Db::qstr($commentid)."' AND article_id = '".
 						 Db::qstr( $comment->getArticleId())."'";
         	    $result = $this->Execute( $query );
-        	    $this->_cache->removeData( $comment->getArticleId(), CACHE_ARTICLE_COMMENTS_BYARTICLE );
+                $this->_cache->removeData( $comment->getArticleId(), CACHE_ARTICLE_COMMENTS_BYARTICLE_NEWEST_TO_OLDEST );
+                $this->_cache->removeData( $comment->getArticleId(), CACHE_ARTICLE_COMMENTS_BYARTICLE_OLDEST_TO_NEWEST );
         	    $this->_cache->removeData( $comment->getId(), CACHE_ARTICLE_COMMENTS );
         	    
         	    // update the blog and the article counters
@@ -319,7 +338,8 @@
         {    
         	if(($result = $this->update( $comment ))) {
 	        	// reset the cache
-        		$this->_cache->removeData( $comment->getArticleId(), CACHE_ARTICLE_COMMENTS_BYARTICLE );
+                $this->_cache->removeData( $comment->getArticleId(), CACHE_ARTICLE_COMMENTS_BYARTICLE_NEWEST_TO_OLDEST );
+                $this->_cache->removeData( $comment->getArticleId(), CACHE_ARTICLE_COMMENTS_BYARTICLE_OLDEST_TO_NEWEST );
         		$this->_cache->removeData( $comment->getId(), CACHE_ARTICLE_COMMENTS );
         		// update counters in the articles table according to the status
         		lt_include( PLOG_CLASS_PATH."class/dao/articles.class.php" );
@@ -410,7 +430,8 @@
 					$articles->updateArticle( $article );
 					$blogs->updateBlog( $blog );
 					// and clean the cache data
-					$this->_cache->removeData( $articleId, CACHE_ARTICLE_COMMENTS_BYARTICLE );					
+                    $this->_cache->removeData( $articleId, CACHE_ARTICLE_COMMENTS_BYARTICLE_NEWEST_TO_OLDEST );
+                    $this->_cache->removeData( $articleId, CACHE_ARTICLE_COMMENTS_BYARTICLE_OLDEST_TO_NEWEST );
 				}
 			}
 			

Modified: plog/trunk/class/dao/daocacheconstants.properties.php
===================================================================
--- plog/trunk/class/dao/daocacheconstants.properties.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/dao/daocacheconstants.properties.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -38,7 +38,8 @@
 	 * article comments
 	 */
 	define( "CACHE_ARTICLE_COMMENTS", "article_comments" );
-	define( "CACHE_ARTICLE_COMMENTS_BYARTICLE", "article_comments_byarticle" );
+	define( "CACHE_ARTICLE_COMMENTS_BYARTICLE_NEWEST_TO_OLDEST", "article_comments_byarticle_newest_to_oldest" );
+	define( "CACHE_ARTICLE_COMMENTS_BYARTICLE_OLDEST_TO_NEWEST", "article_comments_byarticle_oldest_to_newest" );
 	 
 	/**
 	 * custom fields

Modified: plog/trunk/class/dao/userdata/baseuserdataprovider.class.php
===================================================================
--- plog/trunk/class/dao/userdata/baseuserdataprovider.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/dao/userdata/baseuserdataprovider.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -143,7 +143,7 @@
         {
 	        lt_include( PLOG_CLASS_PATH."class/dao/userinfo.class.php" );
 	        
-			isset( $query_result["properties"] ) ? $properties = unserialize( $query_result["properties"] ) : $properties = Array();
+			isset( $query_result["properties"] ) ? $properties = unserialize( $query_result["properties"] ) : $properties = Array();			
 			
             $userInfo = new UserInfo( $query_result["user"], 
 			                          $query_result["password"],
@@ -155,7 +155,8 @@
                                       $query_result["id"]);
                                                                             
             // set some permissions
-            $userInfo->setSiteAdmin( $query_result["site_admin"] );
+			isset( $query_result["site_admin"] ) ? $siteAdmin = $query_result["site_admin"] : $siteAdmin = false;
+            $userInfo->setSiteAdmin( $siteAdmin );
             $userInfo->setStatus( $query_result["status"] );
 
             return $userInfo;

Modified: plog/trunk/class/dao/userinfo.class.php
===================================================================
--- plog/trunk/class/dao/userinfo.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/dao/userinfo.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -194,6 +194,7 @@
 
         function isSiteAdmin()
         {
+			if( $this->_siteAdmin == "" ) $this->_siteAdmin = false;
         	return $this->_siteAdmin;
         }
 

Modified: plog/trunk/class/data/textfilter.class.php
===================================================================
--- plog/trunk/class/data/textfilter.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/data/textfilter.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -529,6 +529,8 @@
             $string = preg_replace("/[".$separator."]+/", $separator, $string);
                 // remove starting and trailing separator chars
             $string = trim($string, $separator);
+				// and convert to lowercase
+			$string = strtolower( $string );
 
             return $string;
 		}

Modified: plog/trunk/class/data/validator/usernamevalidator.class.php
===================================================================
--- plog/trunk/class/data/validator/usernamevalidator.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/data/validator/usernamevalidator.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -7,7 +7,7 @@
 	lt_include( PLOG_CLASS_PATH."class/data/validator/rules/filteredpatternsrule.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
 	
-	define( "ONLY_ALPHANUMERIC_REGEXP", "^([A-Za-z0-9]*)$" );
+	define( "ONLY_ALPHANUMERIC_REGEXP", "^([a-z0-9]*)$" );
 
     /**
      * \ingroup Validator

Modified: plog/trunk/class/gallery/dao/galleryresource.class.php
===================================================================
--- plog/trunk/class/gallery/dao/galleryresource.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/gallery/dao/galleryresource.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -33,6 +33,7 @@
         var $_album;
 		var $_thumbnailFormat;
 		var $_fileDescriptor;
+		var $_fileSize;
 		
 		/**
 		 * Constructor.
@@ -70,6 +71,7 @@
             $this->_resourceType = $resourceType;
             $this->_filePath = $filePath;
             $this->_fileName = $fileName;
+			$this->_fileSize = 0;
             $this->_metadata = $metadata;
             $this->_date = $date;
 			$this->_thumbnailFormat = $thumbnailFormat;
@@ -368,9 +370,13 @@
 		 */
 		function getFileSize()
 		{
-			$reader = $this->getMetadataReader();
-			return $reader->getFileSize();
+			return( $this->_fileSize );
 		}
+		
+		function setFileSize( $size )
+		{
+			$this->_fileSize = $size;
+		}
 
 		/**
 		 * returns an object that will allow to access the metadata of this resource

Modified: plog/trunk/class/gallery/dao/galleryresources.class.php
===================================================================
--- plog/trunk/class/gallery/dao/galleryresources.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/gallery/dao/galleryresources.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -173,7 +173,7 @@
         /**
          * Returns all the resources that belong to a blog
          *
-         * @param blogId The blog to which the resources belong
+         * @param blogId The blog to which the resources belong, use -1 to indicate any blog/owner
          * @param albumId Filters by album
 		 * @param page
 		 * @param itemsPerPage
@@ -190,14 +190,21 @@
                                    $itemsPerPage = DEFAULT_ITEMS_PER_PAGE )
         {
 		$resources = Array();
-		$query = "SELECT id FROM ".$this->getPrefix()."gallery_resources WHERE owner_id = '".Db::qstr($ownerId)."'";
+		$query = "SELECT id FROM ".$this->getPrefix()."gallery_resources WHERE "; 
+		if( $ownerId != -1 )
+			$query .= " owner_id = '".Db::qstr($ownerId)."' AND";
 		if( $albumId != GALLERY_NO_ALBUM )
-			$query .= " AND album_id = '".Db::qstr($albumId)."'";
+			$query .= " album_id = '".Db::qstr($albumId)."' AND";
 		if( $resourceType != GALLERY_RESOURCE_ANY )
-			$query .= " AND resource_type = '".Db::qstr($resourceType)."'";
+			$query .= " resource_type = '".Db::qstr($resourceType)."' AND";
 		if( $searchTerms != "" )
-			$query .= " AND (".$this->getSearchConditions( $searchTerms ).")";
+			$query .= " (".$this->getSearchConditions( $searchTerms ).")";
 
+		// just in case if for any reason the string ends with "AND"
+		$query = trim( $query );
+		if( substr( $query, -3, 3 ) == "AND" )
+			$query = substr( $query, 0, strlen( $query ) - 3 );
+
 		$result = $this->Execute( $query, $page, $itemsPerPage );
 		if( !$result )
 			return $resources;
@@ -427,8 +434,8 @@
             $getId3 = new GetID3();
             $metadata = $getId3->analyze( $upload->getTmpName());
             // nifty helper method from the getid3 package
-            getid3_lib::CopyTagsToComments($metadata);            
-            
+            getid3_lib::CopyTagsToComments($metadata);
+
             $resourceType = $this->_getResourceType( $upload->getFileName(), $metadata );
             
             // set the flags
@@ -467,7 +474,7 @@
             	lt_include( PLOG_CLASS_PATH."class/gallery/resizers/gallerythumbnailgenerator.class.php" );
 
 				lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
-				$config =& Config::getConfig();            	            	
+				$config =& Config::getConfig();
             	
             	$imgWidth = $info["video"]["resolution_x"];
             	$imgHeight = $info["video"]["resolution_y"];
@@ -844,6 +851,7 @@
 										$row["thumbnail_format"],
 										unserialize($row["properties"]),
                                         $row["id"] );
+			$res->setFileSize( $row["file_size"] );
 
              return $res;
         }

Modified: plog/trunk/class/gallery/dao/galleryresourcestorage.class.php
===================================================================
--- plog/trunk/class/gallery/dao/galleryresourcestorage.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/gallery/dao/galleryresourcestorage.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -225,9 +225,6 @@
 				return false;
 
             // new name for the file
-            $fileParts = explode( ".", $upload->getFileName());
-            $fileExt = $fileParts[count($fileParts)-1];
-            $fileName = "$ownerId-$resourceId.$fileExt";
             $filePath = $this->getUserFolder( $ownerId );
 			
             // move the file to the temporaray folder first
@@ -244,11 +241,14 @@
             }
 
             // rename it while it's there
-			$origFile = $tmpFolder."/".basename($upload->getTmpName());
+			$origFile = $tmpFolder."/".basename($upload->getFileName());
 			//do not use storeFile method because I have change filename in $tmpFolder.
 			//$destFile = $this->storeFile( $resourceId, $ownerId, $origFile, RESOURCE_STORAGE_STORE_MOVE );
 			//$destFile use $filePath and $fileName generated above.
-			$destFile = $filePath.$fileName;
+
+			//$destFile = $filePath.$fileName;
+			$destFile = $filePath.$upload->getFileName();
+
 //=========================================			
 //codes below are copy and modify from method storeFile
 			// first of all, check if the file is readable and if not, quit	

Modified: plog/trunk/class/gallery/resizers/gallerythumbnailgenerator.class.php
===================================================================
--- plog/trunk/class/gallery/resizers/gallerythumbnailgenerator.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/gallery/resizers/gallerythumbnailgenerator.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -23,17 +23,12 @@
 			$config =& Config::getConfig();
 			$previewKeepAspectRatio = $config->getValue( "thumbnails_keep_aspect_ratio" );
 			
-			// get the file extension
-			$fileParts = explode( ".", $resFile );
-			$fileExt = strtolower($fileParts[count($fileParts)-1]);
-			$fileName = $ownerId."-".$resourceId.".".$fileExt;
-			
 			// and start the resizing process
 			lt_include( PLOG_CLASS_PATH."class/gallery/resizers/galleryresizer.class.php" );			
 			$resizer = new GalleryResizer( $resFile );
 			lt_include( PLOG_CLASS_PATH."class/gallery/dao/galleryresourcestorage.class.php" );			
 			GalleryResourceStorage::checkPreviewsStorageFolder( $ownerId );
-			$outFile = GalleryResourceStorage::getPreviewsFolder( $ownerId ).$fileName;
+			$outFile = GalleryResourceStorage::getPreviewsFolder( $ownerId ).$resFile;
 			
 			// and finally, we can generate the preview!
 			$result = $resizer->generate( $outFile, $previewHeight, $previewWidth, $previewKeepAspectRatio );
@@ -61,17 +56,12 @@
 			$config =& Config::getConfig();
 			$previewKeepAspectRatio = $config->getValue( "thumbnails_keep_aspect_ratio" );
 						
-			// get the file extension
-			$fileParts = explode( ".", $resFile );
-			$fileExt = strtolower($fileParts[count($fileParts)-1]);
-			$fileName = $ownerId."-".$resourceId.".".$fileExt;
-			
 			// and start the resizing process
 		    lt_include( PLOG_CLASS_PATH."class/gallery/resizers/galleryresizer.class.php" );			
 			$resizer = new GalleryResizer( $resFile );
 		    lt_include( PLOG_CLASS_PATH."class/gallery/dao/galleryresourcestorage.class.php" );			
 			GalleryResourceStorage::checkMediumSizePreviewsStorageFolder( $ownerId );
-			$outFile = GalleryResourceStorage::getMediumSizePreviewsFolder( $ownerId ).$fileName;
+			$outFile = GalleryResourceStorage::getMediumSizePreviewsFolder( $ownerId ).$resFile;
 			
 			// and finally, we can generate the preview!
 			$result = $resizer->generate( $outFile, $previewWidth, $previewHeight, $previewKeepAspectRatio );
@@ -100,18 +90,13 @@
 			lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );			
 			$config =& Config::getConfig();
 			$previewKeepAspectRatio = $config->getValue( "thumbnails_keep_aspect_ratio" );
-			
-			// get the file extension
-			$fileParts = explode( ".", $resFile );
-			$fileExt = $fileParts[count($fileParts)-1];
-			$fileName = $ownerId."-".$resourceId.".".$fileExt;
-			
+
 			// and start the resizing process
 		    lt_include( PLOG_CLASS_PATH."class/gallery/resizers/galleryresizer.class.php" );			
 			$resizer = new GalleryResizer( $resFile );
 		    lt_include( PLOG_CLASS_PATH."class/gallery/dao/galleryresourcestorage.class.php" );			
 			GalleryResourceStorage::checkUserStorageFolder( $ownerId );
-			$outFile = GalleryResourceStorage::getUserFolder( $ownerId ).$fileName;
+			$outFile = GalleryResourceStorage::getUserFolder( $ownerId ).$resFile;
 			
 			// and finally, we can generate the preview!
 			$result = $resizer->generate( $outFile, $previewWidth, $previewHeight, $previewKeepAspectRatio );

Modified: plog/trunk/class/net/http/subdomains.class.php
===================================================================
--- plog/trunk/class/net/http/subdomains.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/net/http/subdomains.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -130,5 +130,23 @@
 			$val =  new DomainValidator();
 			return( $val->validate( $domain ));
 		}
+		
+		/**
+		 * Returns true if the domain is unique or false otherwise
+		 *
+		 * @param domain
+		 * @return true if successful and false otherwise
+		 */
+		function domainNameExists( $domain, $ignoreBlogId=0 )
+		{
+			include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
+			$blogs = new Blogs();
+            $blog = $blogs->getBlogInfoByDomain( $domain );
+			$valid = is_object($blog);
+			if($valid && $ignoreBlogId != 0){
+                return ($blog->getId() != $ignoreBlogId);
+            }
+			return( $valid );
+		}
 	}
 ?>
\ No newline at end of file

Modified: plog/trunk/class/security/bayesianfilter.class.php
===================================================================
--- plog/trunk/class/security/bayesianfilter.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/security/bayesianfilter.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -44,8 +44,7 @@
         {
             $config =& Config::getConfig();
             
-            if (!$config->getValue("bayesian_filter_enabled"))
-            {
+            if (!$config->getValue("bayesian_filter_enabled")) {
                 return new PipelineResult(true);
             }
         

Modified: plog/trunk/class/summary/action/chooseblogtemplateaction.class.php
===================================================================
--- plog/trunk/class/summary/action/chooseblogtemplateaction.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/summary/action/chooseblogtemplateaction.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -13,8 +13,6 @@
 	 */
     class ChooseBlogTemplateAction extends RegisterAction 
 	{
-
-
         function ChooseBlogTemplateAction( $actionInfo, $request )
         {
         	$this->RegisterAction( $actionInfo, $request );
@@ -23,8 +21,12 @@
         	$this->setValidationErrorView( new BlogTemplateChooserView());
         }
 
-        function perform()
-        {
-        }
+		function perform()
+		{
+			// save data to the session
+	    	SessionManager::setSessionValue( "templateId", $this->_request->getValue( "templateId" ));			
+	
+			$this->setCommonData();
+		}
     }
 ?>
\ No newline at end of file

Modified: plog/trunk/class/summary/action/doblogregistration.class.php
===================================================================
--- plog/trunk/class/summary/action/doblogregistration.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/summary/action/doblogregistration.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -9,6 +9,7 @@
 	lt_include( PLOG_CLASS_PATH."class/locale/locales.class.php" );
     lt_include( PLOG_CLASS_PATH."class/data/validator/domainvalidator.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/net/http/subdomains.class.php" );
+	include_once( PLOG_CLASS_PATH."class/config/config.class.php" );	
 
 	/**
 	 * registers a blog
@@ -25,8 +26,9 @@
 	    	$this->registerFieldValidator( "blogName", new StringValidator());
 	    	$this->registerFieldValidator( "blogCategoryId", new IntegerValidator());
 	    	$this->registerFieldValidator( "blogLocale", new StringValidator());
-			$this->registerFieldValidator( "blogSubDomain", new DomainValidator(), true );
-			$this->registerFieldValidator( "blogMainDomain", new DomainValidator(), true );
+			$config =& Config::getConfig();
+			$this->registerField( "blogSubDomain" );
+			$this->registerField( "blogMainDomain" );
 	    	$view = new doBlogRegistrationView();
 	    	$view->setErrorMessage( $this->_locale->tr("register_error_creating_blog"));
 	    	$this->setValidationErrorView( $view );   
@@ -34,12 +36,9 @@
 
 		function validate()
 		{
-			// if the other fields did not validate, no need to continue
-			if( !parent::validate())
-				return false;
-				
+			$valid = parent::validate();
+			
             // check to see whether we are going to save subdomain information
-			$valid = true;
             if( Subdomains::getSubdomainsEnabled()) {
 
 				// Translate a few characters to valid names, and remove the rest
@@ -50,19 +49,25 @@
 
                 // get list of allowed domains
 				$available_domains = Subdomains::getAvailableDomains();
+				
+                if($mainDomain == "?")
+                    $this->blogDomain = $subDomain;
+                else {
+                    $this->blogDomain = $subDomain . "." . $mainDomain;
+				}							
 
                 // make sure the mainDomain parameter is one of the blogAvailableDomains and if not, 
 				// force a validation error
                 if( !Subdomains::isDomainAvailable( $mainDomain ) || !Subdomains::isValidDomainName( $subDomain )) {
 					$valid = false;
 					$this->_form->setFieldValidationStatus( "blogSubDomain", false );					
-					$this->validationErrorProcessing();
+					$this->validationErrorProcessing();					
                 }
-
-                if($mainDomain == "?")
-                    $this->blogDomain = $subDomain;
-                else
-                    $this->blogDomain = $subDomain . "." . $mainDomain;
+				if( Subdomains::domainNameExists( $this->blogDomain )) {
+					$valid = false;
+					$this->_form->setFieldValidationStatus( "blogSubDomain", false );					
+					$this->validationErrorProcessing();					
+				}				
             }
 
 			return( $valid );
@@ -72,9 +77,16 @@
         {
             // create the new view and clean the cache
             $this->_view = new BlogTemplateChooserView();
-            $this->setValues();
             $this->setCommonData();
 
+			// save data to the session
+	    	SessionManager::setSessionValue( "blogName", $this->_request->getValue( "blogName" ));
+	    	SessionManager::setSessionValue( "blogCategoryId", $this->_request->getValue( "blogCategoryId" ));
+	    	SessionManager::setSessionValue( "blogLocale", $this->_request->getValue( "blogLocale" ));
+	    	SessionManager::setSessionValue( "blogSubDomain", $this->_request->getValue( "blogSubDomain" ));
+	    	SessionManager::setSessionValue( "blogMainDomain", $this->_request->getValue( "blogMainDomain" ));
+			SessionManager::setSessionValue( "blogDomain", $this->blogDomain );
+
 			return( true );
         }
     }

Modified: plog/trunk/class/summary/action/dofinishregister.class.php
===================================================================
--- plog/trunk/class/summary/action/dofinishregister.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/summary/action/dofinishregister.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -78,10 +78,10 @@
         function createUser()
 		{
             // all data is already correct
-            $this->userName = $this->_request->getValue("userName");
-            $this->userFullName = $this->_request->getValue("userFullName");
-            $this->userPassword = $this->_request->getValue("userPassword");
-            $this->userEmail = $this->_request->getValue("userEmail");
+            $this->userName = SessionManager::getSessionValue("userName");
+            $this->userFullName = SessionManager::getSessionValue("userFullName");
+            $this->userPassword = SessionManager::getSessionValue("userPassword");
+            $this->userEmail = SessionManager::getSessionValue("userEmail");
 
             $users = new Users();
             $user = new UserInfo( $this->userName, 
@@ -129,10 +129,10 @@
          */
         function createBlog($userId)
 		{
-            $this->blogName = stripslashes($this->_request->getValue("blogName"));
-            $this->blogDomain = stripslashes($this->_request->getValue("blogDomain"));
-            $this->blogCategoryId = $this->_request->getValue("blogCategoryId");
-            $this->blogLocale = $this->_request->getValue("blogLocale");
+            $this->blogName = stripslashes(SessionManager::getSessionValue("blogName"));
+            $this->blogDomain = stripslashes(SessionManager::getSessionValue("blogDomain"));
+            $this->blogCategoryId = SessionManager::getSessionValue("blogCategoryId");
+            $this->blogLocale = SessionManager::getSessionValue("blogLocale");
             $this->templateId = $this->_request->getValue("templateId");
         
             // get the default locale configured for the site
@@ -151,7 +151,7 @@
             $blogInfo->setBlogCategoryId( $this->blogCategoryId );
 
             if( Subdomains::getSubdomainsEnabled()) {
-				$blogDomain = $this->_request->getValue( "blogDomain" );
+				$blogDomain = SessionManager::getSessionValue( "blogDomain" );
 				$blogInfo->setCustomDomain( $blogDomain );
             }			
 

Modified: plog/trunk/class/summary/action/dousercreation.class.php
===================================================================
--- plog/trunk/class/summary/action/dousercreation.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/summary/action/dousercreation.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -89,9 +89,14 @@
             	}
             }
 
+			// save the data to the session
+			SessionManager::setSessionValue( "userName", $this->userName );
+			SessionManager::setSessionValue( "userPassword", $this->userPassword );
+			SessionManager::setSessionValue( "userEmail", $this->userEmail );
+			SessionManager::setSessionValue( "userFullName", $this->userFullName );
+
             // if everything went fine, then proceed
             $this->_view = new doBlogRegistrationView();
-            $this->setValues();
             $this->setCommonData();
             return true;
         }

Modified: plog/trunk/class/summary/action/douserregister.class.php
===================================================================
--- plog/trunk/class/summary/action/douserregister.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/summary/action/douserregister.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -12,6 +12,17 @@
         {
            $this->_view = new SummaryUserCreationView();
            $this->setCommonData();
+
+		   // clean the session data
+			SessionManager::setSessionValue( "blogName", "" );
+			SessionManager::setSessionValue( "blogCategoryId", "" );
+			SessionManager::setSessionValue( "blogLocale", "" );
+			SessionManager::setSessionValue( "blogSubDomain", "" );
+			SessionManager::setSessionValue( "blogMainDomain", "" );
+			SessionManager::setSessionValue( "userName", "" );
+			SessionManager::setSessionValue( "userPassword", "" );
+			SessionManager::setSessionValue( "userEmail", "" );
+			SessionManager::setSessionValue( "userFullName", "" );	
            
            return( true );
         }

Modified: plog/trunk/class/summary/action/registeraction.class.php
===================================================================
--- plog/trunk/class/summary/action/registeraction.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/summary/action/registeraction.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -4,6 +4,11 @@
 lt_include( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
 lt_include( PLOG_CLASS_PATH."class/summary/view/summarycachedview.class.php" );
 lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
+include_once( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
+include_once( PLOG_CLASS_PATH."class/data/validator/usernamevalidator.class.php" );
+include_once( PLOG_CLASS_PATH."class/data/validator/passwordvalidator.class.php" );
+include_once( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
+include_once( PLOG_CLASS_PATH."class/data/validator/emailvalidator.class.php" );
 
 /**
  * Base action that all register actions should extend
@@ -25,18 +30,7 @@
     function RegisterAction( $actionInfo, $request )
     {
         $this->SummaryAction( $actionInfo, $request );
-        $this->registerValidators();
 
-		$tf = new Textfilter();
-        $this->blogName = $tf->filterAllHTML( $this->_request->getValue( "blogName" ));
-        $this->blogDomain = $tf->filterAllHTML( $this->_request->getValue( "blogDomain" ));
-        $this->blogCategoryId = $this->_request->getValue( "blogCategoryId" );
-        $this->blogLocale = $this->_request->getValue( "blogLocale" );
-        $this->userName = $tf->filterAllHTML($this->_request->getValue( "userName" ));
-        $this->userPassword = $tf->filterAllHTML($this->_request->getValue( "userPassword" ));
-        $this->userEmail = $tf->filterAllHTML($this->_request->getValue( "userEmail" ));
-		$this->userFullName = $tf->filterAllHTML($this->_request->getValue( "userFullName" ));
-		
 		// there has to be a better place to check this, but I can't think of it now... Killing
 		// the script without returning to the controller probably isn't a good idea, but it's
 		// the quickest right now!
@@ -46,45 +40,7 @@
 			$this->_view = new SummaryMessageView();
 			$this->_view->setErrorMessage( $this->_locale->tr("error_registration_disabled"));			
 			die($this->_view->render());
-		}		
+		}	
     }
-	
-	function validationErrorProcessing()
-	{
-		parent::validationErrorProcessing();
-		$this->setValues();
-	}
-
-    /**
-     * make these values tranferred until the last register step, if there are validation error happened.
-     */
-	function registerValidators()
-	{
-        $this->registerField( "userName" );
-        $this->registerField( "userFullName" );
-        $this->registerField( "userPassword" );
-        $this->registerField( "userEmail" );
-        $this->registerField( "blogName" );
-        $this->registerField( "blogCategoryId" );
-        $this->registerField( "blogDomain" );
-        $this->registerField( "blogLocale" );
-        $this->registerField( "templateId" );
-	}
-
-    /**
-     * make these values tranferred until the last register step
-     */
-    function setValues()
-	{
-        $this->_view->setValue( "userName", $this->userName );
-        $this->_view->setValue( "userFullName", $this->userFullName );
-        $this->_view->setValue( "userPassword", $this->userPassword );
-        $this->_view->setValue( "userEmail", $this->userEmail );
-        $this->_view->setValue( "blogName", $this->blogName );
-        $this->_view->setValue( "blogCategoryId", $this->blogCategoryId );
-        $this->_view->setValue( "blogDomain", $this->blogDomain );
-        $this->_view->setValue( "blogLocale", $this->blogLocale );
-        $this->_view->setValue( "templateId", $this->templateId );
-    }
 }
 ?>

Modified: plog/trunk/class/test/tests/dao/article_test.class.php
===================================================================
--- plog/trunk/class/test/tests/dao/article_test.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/test/tests/dao/article_test.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -12,7 +12,12 @@
 	{
 		function setUp()
 		{
-			// build a dummy Article object			
+                // 
+                // Note: if you are going to copy this code for another test, note that this code
+                // doesn't ever add this article to the database, since if it did, it could
+                // potentially overwrite your real blog data...
+                //
+                // build a dummy Article object			
 			$this->article = new Article(
 				"dummy topic",
 				"dummy text",

Copied: plog/trunk/class/test/tests/dao/commentscommon_test.class.php (from rev 4380, plog/tags/lifetype-1.1.3/class/test/tests/dao/commentscommon_test.class.php)

Modified: plog/trunk/class/test/tests/data/textfilter_test.class.php
===================================================================
--- plog/trunk/class/test/tests/data/textfilter_test.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/test/tests/data/textfilter_test.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -35,7 +35,8 @@
 				"<a>html</a><b>is</b><h1>not</h1><p>allowed</p>"
                  => "htmlisnotallowed",
 				"unclosed < html</a><b >shouldn't </b>be<h1> <p>stripped</p>"
-                 => "unclosed{$sep}htmlshouldn{$sep}t{$sep}be{$sep}stripped");
+                 => "unclosed{$sep}htmlshouldn{$sep}t{$sep}be{$sep}stripped",
+                "SOME uppercase CHARAcTERS" => "some{$sep}uppercase{$sep}characters" );
 				
 			// process each one of them
 			foreach( $tests as $input => $output ) {

Modified: plog/trunk/class/test/tests/data/validator/usernamevalidator_test.class.php
===================================================================
--- plog/trunk/class/test/tests/data/validator/usernamevalidator_test.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/test/tests/data/validator/usernamevalidator_test.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -49,6 +49,14 @@
 		}
 		
 		/**
+		 * test a username with upper-case characters
+		 */
+		function testUpperCase()
+		{
+			$this->assertFalse( $this->u->validate( "wHAtevEr" ), "An invalid username was accepted!" );
+		}
+		
+		/**
 		 * tests a valid username
 		 */
 		function testValidUsername()

Modified: plog/trunk/class/test/tests/ui/articlecategoriesui_test.class.php
===================================================================
--- plog/trunk/class/test/tests/ui/articlecategoriesui_test.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/test/tests/ui/articlecategoriesui_test.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -1,8 +1,9 @@
 <?php
 
-	include_once( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );
-	include_once( PLOG_CLASS_PATH."class/test/helpers/testtools.class.php" );	
-	
+include_once( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );
+include_once( PLOG_CLASS_PATH."class/test/helpers/testtools.class.php" );	
+include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
+
 	/**
 	 * \ingroup Test
 	 *
@@ -26,6 +27,8 @@
 		 */
 		function testArticleCategories()
 		{
+            $config =& Config::getConfig();
+
 			$this->assertUIScript(
 				Array(
 					"login" => Array(
@@ -68,27 +71,35 @@
 			
 			// 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"
-					)					
-				)
-			);			
+			$cat = $cats->getCategoryByName( "test".$config->getValue( "urlize_word_separator" )."category",
+                                             $this->blog->getId());
+			$this->assertTrue($cat != NULL, "Category \"test category\" was added but now cannot be found");
+
+            if($cat){
+                    // ...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

Modified: plog/trunk/class/view/admin/admindashboardview.class.php
===================================================================
--- plog/trunk/class/view/admin/admindashboardview.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/view/admin/admindashboardview.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -128,6 +128,7 @@
             $ts = new TemplateService();
         	$template = $ts->AdminTemplate( "dashboard" );
             $this->setValue( "locale", $locale );
+			$this->setValue( "bayesian_filter_enabled", $this->_config->getValue( "bayesian_filter_enabled" ));
             // assign all the values
             $template->assign( $this->_params->getAsArray());
 

Modified: plog/trunk/class/view/admin/adminview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminview.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/view/admin/adminview.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -94,6 +94,7 @@
             $this->setValue( 'baseurl', $config->getValue( 'base_url'));			
             $this->setValue( 'version', Version::getVersion());
             $this->setValue( 'uploads_enabled', $config->getValue( 'uploads_enabled' ));			
+            $this->setValue( 'bayesian_filter_enabled', $config->getValue( 'bayesian_filter_enabled' ));			
 
 			//
 			// stuff to generate the menu on the left

Modified: plog/trunk/class/view/admin/chooser/adminsimpleresourceslistview.class.php
===================================================================
--- plog/trunk/class/view/admin/chooser/adminsimpleresourceslistview.class.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/class/view/admin/chooser/adminsimpleresourceslistview.class.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -52,7 +52,7 @@
 			                                      new Timestamp(), // date
 			                                      THUMBNAIL_OUTPUT_FORMAT_SAME_AS_IMAGE, // it doesn't matter
 			                                      Array(),
-			                                      -1 ); // id
+			                                      "XXRESOURCEIDXX" ); // id
 			$dummyResource->setAlbumId( "XXALBUMIDXX" );
 			$dummyResource->setAlbum( $dummyAlbum );
 			// generate 4 urls with the current blog settings

Modified: plog/trunk/config/config.properties.php
===================================================================
--- plog/trunk/config/config.properties.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/config/config.properties.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -26,12 +26,12 @@
 #   (note, if upgrading between minor releases:
 #   1.0 to 1.0.1, etc. you shouldn't run the wizard)
 
-$config["db_host"] = "";
-$config["db_username"] = "";
-$config["db_password"] = "";
-$config["db_database"] = "";
+$config['db_host'] = 'localhost';
+$config['db_username'] = 'root';
+$config['db_password'] = '';
+$config['db_database'] = 'lt_trunk';
 $config["db_persistent"] = true;
-$config["db_character_set"] = "default";
+$config['db_character_set'] = 'latin1';
 
 #
 # the database prefix will be appended to the name of each database tables in case you want
@@ -40,5 +40,5 @@
 # coexist in the same unique database. If you change this after the initial configuration done
 # with the installation wizard, please make sure that you also rename the tables.
 #
-$config["db_prefix"] = "";
-?>
+$config['db_prefix'] = 'lt_';
+?>
\ No newline at end of file

Modified: plog/trunk/config/userdata.properties.php
===================================================================
--- plog/trunk/config/userdata.properties.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/config/userdata.properties.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -44,4 +44,76 @@
   "blogtitle_postfix" => "'s Weblog"
 );*/
 
+# 
+# VBB3 user data provider 
+# 
+/*$config = Array( 
+  "provider" => "vbb3UserDataProvider", 
+  "createBlogIfNotExisting" => false, 
+  "database" => "bbs",            //vbb database name 
+  "user" => "bbs",               //vbb data base user name 
+  "password" => "",         //vbb data base user password 
+  "prefix" => "",                 //vbb data base prefix 
+  "usesalt" => true,             //use password salt or not , if vbb3 ,plz set to true 
+  "allowgroup" => Array(2,5,6,7), //default set to 2,5,6,7 
+  "denygroup" => Array(3,4),       //default set to 3,4 
+  "admingroup"  => Array(6),      //default set to 6 
+  "adminuser" => Array(1)        //default set to 1 
+);*/
+
+# 
+# WBB2 user data provider 
+# 
+/*$config = Array( 
+  // general 
+  "provider" => "WBBUserDataProvider", 
+  "createBlogIfNotExisting" => true, 
+  
+  // WBB2 connection 
+  "host" => "localhost",                       //database server default: localhost 
+  "database" => "",                            //database name 
+  "user" => "",                                //database user 
+  "password" => "",                            //user-password 
+  "prefix" => "bb1_",                          //wbb2-prefix default: bb1_ 
+  "admingroup"  => Array('1','11','42'),       //groupcombinationIDs for Admin default: 1,11,42 
+  "blogtitle_postfix" => "'s Blog"              // This string gets appended to the username in blogtitle: "Username's Blog" 
+);
+*/
+
+#
+# JOOMLA user data provider
+#
+#
+# Please run the following SQL query in your LifeType database,
+# as it is required by the provider
+#
+# CREATE TABLE `lt_joomla_users` (
+#  `id` int(10) unsigned NOT NULL auto_increment,
+#  `joomla_id` int(10) unsigned NOT NULL,
+#  `about` text,
+#  `properties` text NOT NULL,
+#  `resource_picture_id` int(10) NOT NULL default '0',
+#  `blog_site_admin` int(10) NOT NULL default '0',
+#  PRIMARY KEY  (`id`),
+#  UNIQUE KEY `joomla_id` (`joomla_id`)
+# ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
+/*
+$config = Array( 
+  // general
+  "provider" => "JoomlaUserDataProvider",
+  "createBlogIfNotExisting" => true,
+
+  // Joomla db connection
+  "host" => "mysql_host",
+  "database" => "joomla_db",
+  "user" => "joomla_db_user",
+  "password" => "joomla_db_pass",
+  "prefix" => "jos_",
+
+  // This string gets appended to the username and results
+  // in "Username's Weblog"
+  "blogtitle_postfix" => "'s Weblog"
+);
+*/
+
 ?>

Modified: plog/trunk/debug.php
===================================================================
--- plog/trunk/debug.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/debug.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -1,6 +1,6 @@
 <?php
 
-	include_once( PLOG_CLASS_PATH."class/logger/loggermanager.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/logger/loggermanager.class.php" );
 
 	/**
      * Very stupid function that will hopefully replace all my

Modified: plog/trunk/docs-devel/Doxyfile
===================================================================
--- plog/trunk/docs-devel/Doxyfile	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/docs-devel/Doxyfile	2006-12-06 17:41:38 UTC (rev 4381)
@@ -17,13 +17,13 @@
 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
 # by quotes) that should identify the project.
 
-PROJECT_NAME           = pLog
+PROJECT_NAME           = LifeType
 
 # The PROJECT_NUMBER tag can be used to enter a project or revision number. 
 # This could be handy for archiving the generated documentation or 
 # if some version control system is used.
 
-PROJECT_NUMBER         = 1.0
+PROJECT_NUMBER         = 1.1
 
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
 # base path where the generated documentation will be put. 
@@ -416,7 +416,7 @@
 # directories like "/usr/src/myproject". Separate the files or directories 
 # with spaces.
 
-INPUT                  = ../class/object/ ../class/dao/ ../class/logger/ ../class/gallery/ ../class/locale/ ../class/config/ ../class/file/ ../class/database/ ../class/data/forms ../class/security/ ../class/xml/ ../class/controller/ ../class/mail/ ../class/bayesian/ ../class/misc/ ../class/net/ ../class/data/ ../class/view/ ../class/plugin/ ../class/template/ ../class/action/ ../class/summary/dao/
+INPUT                  = ../class/bootstrap.php ../class/object/ ../class/dao/ ../class/logger/ ../class/gallery/ ../class/locale/ ../class/config/ ../class/file/ ../class/database/ ../class/data/forms ../class/security/ ../class/xml/ ../class/controller/ ../class/mail/ ../class/bayesian/ ../class/misc/ ../class/net/ ../class/data/ ../class/view/ ../class/plugin/ ../class/template/ ../class/action/ ../class/summary/dao/
 
 # If the value of the INPUT tag contains directories, you can use the 
 # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
@@ -500,7 +500,7 @@
 # Note: To get rid of all source code in the generated output, make sure also 
 # VERBATIM_HEADERS is set to NO.
 
-SOURCE_BROWSER         = YES
+SOURCE_BROWSER         = NO
 
 # Setting the INLINE_SOURCES tag to YES will include the body 
 # of functions and classes directly in the documentation.

Modified: plog/trunk/error.php
===================================================================
--- plog/trunk/error.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/error.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -4,10 +4,11 @@
         define( "PLOG_CLASS_PATH", dirname(__FILE__)."/");
     }
 
-    include_once( PLOG_CLASS_PATH."class/net/http/httpvars.class.php" );
-    include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
-	include_once( PLOG_CLASS_PATH."class/net/request.class.php" );
-	include_once( PLOG_CLASS_PATH."class/net/baserequestgenerator.class.php" );
+	include_once( PLOG_CLASS_PATH."class/bootstrap.php" );
+    lt_include( PLOG_CLASS_PATH."class/net/http/httpvars.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/net/request.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/net/baserequestgenerator.class.php" );
 
     /**
      * Implements an error handler for 401, 403 and 404 errors so that
@@ -31,14 +32,14 @@
 	$config =& Config::getConfig(); 
 
 	if( $config->getValue( "request_format_mode" ) == SEARCH_ENGINE_FRIENDLY_MODE ) {
-		include_once( PLOG_CLASS_PATH."class/net/prettyrequestparser.class.php" );
+		lt_include( PLOG_CLASS_PATH."class/net/prettyrequestparser.class.php" );
 		$server = HttpVars::getServer();
 		$parser = new PrettyRequestParser( "default", $server["REQUEST_URI"]);
 		$result = $parser->parse();
 		HttpVars::setRequest( $result );
-		include_once( PLOG_CLASS_PATH."index.php" );		
+		lt_include( PLOG_CLASS_PATH."index.php" );		
 	}
 	else {
-		include_once( PLOG_CLASS_PATH."blog.php" );
+		lt_include( PLOG_CLASS_PATH."blog.php" );
 	}
-?>
\ No newline at end of file
+?>

Modified: plog/trunk/index.php
===================================================================
--- plog/trunk/index.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/index.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -1,8 +1,4 @@
 <?php
-
-//xdebug_start_profiling();
-//xdebug_start_trace('/Users/oscar/plog-devel/tmp/trace');
-
     // please enable the line below if you are having memory problems
     //ini_set('memory_limit', "16M");
 
@@ -50,5 +46,5 @@
     $controller->process( HttpVars::getRequest(), "op");	
 
     // log statistics, only for debugging purposes
-    Info::logMetrics();
+    //Info::logMetrics();
 ?>

Copied: plog/trunk/js/tinymce/plugins/more (from rev 4380, plog/tags/lifetype-1.1.3/js/tinymce/plugins/more)

Deleted: plog/trunk/js/tinymce/plugins/more/editor_plugin.js
===================================================================
--- plog/tags/lifetype-1.1.3/js/tinymce/plugins/more/editor_plugin.js	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/js/tinymce/plugins/more/editor_plugin.js	2006-12-06 17:41:38 UTC (rev 4381)
@@ -1,224 +0,0 @@
-/* Import plugin specific language pack */
-tinyMCE.importPluginLanguagePack('more');
-
-var TinyMCE_MorePlugin = {
-	getInfo : function() {
-		return {
-			longname : 'More',
-			author : 'Jon Daley (based on the WordPress plugin)',
-			authorurl : 'http://jon.limedaley.com',
-			infourl : 'N/A',
-			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
-		};
-	},
-
-    initInstance : function(inst) {
-        if (!tinyMCE.settings['more_skip_plugin_css']){
-            tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL +  
-                              "/plugins/more/more.css");
-        }
-    },
-
-    getControlHTML : function(control_name) {
-        switch (control_name) {
-            case "more":
-            return tinyMCE.getButtonHTML(control_name, 
-                                         'lang_more_more_button', 
-                                         '{$pluginurl}/images/more.gif', 
-                                         'mcemoremore');
-        }
-
-        return '';
-    },
-
-    _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).toLowerCase();
-
-                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;
-    },
-
-    execCommand : function(editor_id, element, command, user_interface, value){
-        var inst = tinyMCE.getInstanceById(editor_id);
-        var focusElm = inst.getFocusElement();
-        var doc = inst.getDoc();
-
-        function getAttrib(elm, name) {
-            return elm.getAttribute(name) ? elm.getAttribute(name) : "";
-        }
-
-            // Handle commands
-        switch (command) {
-			case "mcemoremore":
-            var flag = "";
-            var template = new Array();
-            var altMore = tinyMCE.getLang('lang_more_more_alt');
-
-				// Is selection a image
-            if (focusElm != null && focusElm.nodeName.toLowerCase() == "img"){
-                flag = getAttrib(focusElm, 'class');
-	
-                if (flag != 'mce_plugin_more_more') // Not a more
-                    return true;
-	
-                action = "update";
-            }
-	
-            html = ''
-            + '<img src="' + (tinyMCE.getParam("theme_href") + 
-                              "/images/spacer.gif") + '" '
-            + ' width="100%" height="10px" '
-            + 'alt="'+altMore+'" title="'+altMore+'" '
-            + 'class="mce_plugin_more_more" name="mce_plugin_more_more" />';
-            tinyMCE.execCommand("mceInsertContent",true,html);
-            tinyMCE.selectedInstance.repaint();
-            return true;
-        }
-
-            // Pass to next handler in chain
-        return false;
-    },
-
-    cleanup : function(type, content) {
-        switch (type) {
-	
-            case "insert_to_editor":
-			var startPos = 0;
-			var altMore = tinyMCE.getLang('lang_more_more_alt');
-
-                // Parse all [@more@] tags and replace them with images
-			while ((startPos = content.indexOf('[@more@]', startPos)) != -1) {
-                    // Insert image
-				var contentAfter = content.substring(startPos + 11);
-				content = content.substring(0, startPos);
-				content += '<img src="' + (tinyMCE.getParam("theme_href") + 
-                                           "/images/spacer.gif") + '" ';
-				content += ' width="100%" height="10px" ';
-				content += 'alt="'+altMore+'" title="'+altMore+'" ';
-                content += 'class="mce_plugin_more_more" />';
-				content += contentAfter;
-
-				startPos++;
-			}
-
-                // It's supposed to be WYSIWYG, right?
-			content = content.replace(new RegExp('&', 'g'), '&amp;');
-
-			break;
-
-            case "get_from_editor":
-                // Parse all img tags and replace them with [@more@]
-			var startPos = -1;
-			while ((startPos = content.indexOf('<img', startPos+1)) != -1) {
-				var endPos = content.indexOf('/>', startPos);
-				var attribs = this._parseAttributes(
-                    content.substring(startPos + 4, endPos));
-
-				if (attribs['class'] == "mce_plugin_more_more") {
-					endPos += 2;
-	
-					var embedHTML = '[@more@]';
-	
-                        // Insert embed/object chunk
-					chunkBefore = content.substring(0, startPos);
-					chunkAfter = content.substring(endPos);
-					content = chunkBefore + embedHTML + chunkAfter;
-				}
-			}
-
-                // If it says & in the WYSIWYG editor, 
-                // it should say &amp; in the html.
-			content = content.replace(new RegExp('&', 'g'), '&amp;');
-			content = content.replace(new RegExp('&amp;nbsp;', 'g'), '&nbsp;');
-
-                // Remove anonymous, empty paragraphs.
-			content = content.replace(new RegExp('<p>(\\s|&nbsp;)*</p>', 'mg'), '');
-
-                // Handle table badness.
-			content = content.replace(new RegExp('<(table( [^>]*)?)>.*?<((tr|thead)( [^>]*)?)>', 'mg'), '<$1><$3>');
-			content = content.replace(new RegExp('<(tr|thead|tfoot)>.*?<((td|th)( [^>]*)?)>', 'mg'), '<$1><$2>');
-			content = content.replace(new RegExp('</(td|th)>.*?<(td( [^>]*)?|th( [^>]*)?|/tr|/thead|/tfoot)>', 'mg'), '</$1><$2>');
-			content = content.replace(new RegExp('</tr>.*?<(tr|/table)>', 'mg'), '</tr><$1>');
-			content = content.replace(new RegExp('<(/?(table|tbody|tr|th|td)[^>]*)>(\\s*|(<br ?/?>)*)*', 'g'), '<$1>');
-
-                // Pretty it up for the source editor.
-			var blocklist = 'blockquote|ul|ol|li|table|thead|tr|th|td|div|h\\d|pre|p';
-			content = content.replace(new RegExp('\\s*</('+blocklist+')>\\s*', 'mg'), '</$1>\n');
-			content = content.replace(new RegExp('\\s*<(('+blocklist+')[^>]*)>\\s*', 'mg'), '\n<$1>');
-			content = content.replace(new RegExp('<((li|/?tr|/?thead|/?tfoot)( [^>]*)?)>', 'g'), '\t<$1>');
-			content = content.replace(new RegExp('<((td|th)( [^>]*)?)>', 'g'), '\t\t<$1>');
-			content = content.replace(new RegExp('\\s*<br ?/?>\\s*', 'mg'), '<br />\n');
-			content = content.replace(new RegExp('^\\s*', ''), '');
-			content = content.replace(new RegExp('\\s*$', ''), '');
-
-			break;
-        }
-
-            // Pass through to next handler in chain
-        return content;
-    },
-
-    handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
-        function getAttrib(elm, name) {
-            return elm.getAttribute(name) ? elm.getAttribute(name) : "";
-        }
-
-        tinyMCE.switchClass(editor_id + '_more_more', 'mceButtonNormal');
-
-        if (node == null)
-		return;
-
-        do {
-            if (node.nodeName.toLowerCase() == "img" && 
-                getAttrib(node, 'class').indexOf('mce_plugin_more_more') == 0)
-            {
-                tinyMCE.switchClass(editor_id + '_more_more', 
-                                    'mceButtonSelected');
-            }
-        } while ((node = node.parentNode));
-
-        return true;
-    }
-};
-
-tinyMCE.addPlugin("more", TinyMCE_MorePlugin);

Copied: plog/trunk/js/tinymce/plugins/more/editor_plugin.js (from rev 4380, plog/tags/lifetype-1.1.3/js/tinymce/plugins/more/editor_plugin.js)

Copied: plog/trunk/js/tinymce/plugins/more/images (from rev 4380, plog/tags/lifetype-1.1.3/js/tinymce/plugins/more/images)

Deleted: plog/trunk/js/tinymce/plugins/more/images/help.gif
===================================================================
(Binary files differ)

Copied: plog/trunk/js/tinymce/plugins/more/images/help.gif (from rev 4380, plog/tags/lifetype-1.1.3/js/tinymce/plugins/more/images/help.gif)

Deleted: plog/trunk/js/tinymce/plugins/more/images/more.gif
===================================================================
(Binary files differ)

Copied: plog/trunk/js/tinymce/plugins/more/images/more.gif (from rev 4380, plog/tags/lifetype-1.1.3/js/tinymce/plugins/more/images/more.gif)

Deleted: plog/trunk/js/tinymce/plugins/more/images/more_bug.gif
===================================================================
(Binary files differ)

Copied: plog/trunk/js/tinymce/plugins/more/images/more_bug.gif (from rev 4380, plog/tags/lifetype-1.1.3/js/tinymce/plugins/more/images/more_bug.gif)

Copied: plog/trunk/js/tinymce/plugins/more/langs (from rev 4380, plog/tags/lifetype-1.1.3/js/tinymce/plugins/more/langs)

Deleted: plog/trunk/js/tinymce/plugins/more/langs/en.js
===================================================================
--- plog/tags/lifetype-1.1.3/js/tinymce/plugins/more/langs/en.js	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/js/tinymce/plugins/more/langs/en.js	2006-12-06 17:41:38 UTC (rev 4381)
@@ -1,6 +0,0 @@
-// EN lang variables
-
-tinyMCE.addToLang('',{
-more_more_button : 'Split post with More tag',
-more_more_alt : 'More...',
-});

Copied: plog/trunk/js/tinymce/plugins/more/langs/en.js (from rev 4380, plog/tags/lifetype-1.1.3/js/tinymce/plugins/more/langs/en.js)

Deleted: plog/trunk/js/tinymce/plugins/more/more.css
===================================================================
--- plog/tags/lifetype-1.1.3/js/tinymce/plugins/more/more.css	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/js/tinymce/plugins/more/more.css	2006-12-06 17:41:38 UTC (rev 4381)
@@ -1,10 +0,0 @@
-.mce_plugin_more_more {
-	border: 0px;
-	border-top: 1px dotted #aaa;
-	display:block;
-	background-color: #ffffff;
-	margin-top:15px;
-	background-image: url(images/more_bug.gif);
-	background-repeat: no-repeat;
-	background-position: right top;
-}

Copied: plog/trunk/js/tinymce/plugins/more/more.css (from rev 4380, plog/tags/lifetype-1.1.3/js/tinymce/plugins/more/more.css)

Modified: plog/trunk/js/tinymce/tiny_mce-plog.js
===================================================================
--- plog/trunk/js/tinymce/tiny_mce-plog.js	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/js/tinymce/tiny_mce-plog.js	2006-12-06 17:41:38 UTC (rev 4381)
@@ -7,8 +7,8 @@
 	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,insertvideo,emotions,separator,hr,insertdate,inserttime,separator,code",
+	theme_advanced_buttons1 : "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,insertvideo,emotions,separator,hr,insertdate,inserttime,separator,fullscreen,separator,code",
 	theme_advanced_buttons3 : "",
 	fullscreen_settings : {
                 theme_advanced_buttons3 : "tablecontrols"
@@ -277,4 +277,4 @@
 	+"var[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
 	  +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
 	  +"|title]"	
-});
\ No newline at end of file
+});

Modified: plog/trunk/js/ui/common.js
===================================================================
--- plog/trunk/js/ui/common.js	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/js/ui/common.js	2006-12-06 17:41:38 UTC (rev 4381)
@@ -450,3 +450,52 @@
     eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); 
     if (restore) selObj.selectedIndex=0; 
 }
+
+function getPostEditFormElements( formId )
+{
+	var formData = '';
+	
+	form = document.getElementById( formId );
+	
+	for(i = 0; i < form.elements.length; i++ ) {
+		itemName = form.elements[i].name;
+		itemValue = form.elements[i].value;
+		
+		if( itemName != "op" ) {
+			// we don't want to send more than one "op" parameter... do we?
+			if( itemName == "postCategories[]" ) {
+				// we need to have a special case for this one because it's a list that
+				// allows multiple selection... only using the "value" attribute will
+				// return one of the items and we would like to have them all
+				for (var j = 0; j < form.elements[i].options.length; j++) {
+					if (form.elements[i].options[j].selected) 
+						formData = formData + itemName + "=" + form.elements[i].options[j].value + "&";
+				}
+			}
+			else if( itemName == "postText" && htmlAreaEnabled ) {
+			    if ( blogLocale == "UTF-8" ) {
+				    formData = formData + itemName + "=" + encodeURIComponent(tinyMCE.getContent('postText')) + "&";
+				} else {
+				    formData = formData + itemName + "=" + escape(tinyMCE.getContent('postText')) + "&";
+				}
+			}
+			else if( itemName == "postExtendedText" && htmlAreaEnabled ) {
+				if ( blogLocale == "UTF-8" ) {
+				    formData = formData + itemName + "=" + encodeURIComponent(tinyMCE.getContent('postExtendedText')) + "&";
+			    } else {
+				    formData = formData + itemName + "=" + escape(tinyMCE.getContent('postExtendedText')) + "&";
+                }
+			}
+			else {
+				// for all other elements, normal handling
+				if ( blogLocale == "UTF-8" ) {
+				    formData = formData + itemName + "=" + encodeURIComponent(itemValue) + "&";
+				} else {
+				    formData = formData + itemName + "=" + escape(itemValue) + "&";
+			    }
+			}
+		}
+    }	
+    
+    return formData;
+}

Modified: plog/trunk/js/ui/summary.js
===================================================================
--- plog/trunk/js/ui/summary.js	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/js/ui/summary.js	2006-12-06 17:41:38 UTC (rev 4381)
@@ -1,6 +1,7 @@
 function checkUserNameAjax()
 {
 	var userName = $F('userName');
+	userName = userName.toLowerCase();
 	if (userName != '')
 	{
 		var url = plogSummaryBaseUrl;

Copied: plog/trunk/plugins/.htaccess (from rev 4380, plog/tags/lifetype-1.1.3/plugins/.htaccess)

Modified: plog/trunk/resserver.php
===================================================================
--- plog/trunk/resserver.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/resserver.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -1,5 +1,7 @@
 <?php
 
+	
+
     /**
      * Implementation of a very simple resource server.
      *

Modified: plog/trunk/runtests.php
===================================================================
--- plog/trunk/runtests.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/runtests.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -1,7 +1,14 @@
 <?php
 
+    define("DISABLE_TESTS", true);
+
 	define( "INCLUDE_PLUGIN_TESTS", true );
 
+    if(defined("DISABLE_TESTS")){
+        print "You must enable tests at the top of runtests, since it could represent a security risk";
+        die;
+    }
+
 	if (!defined( "PLOG_CLASS_PATH" )) {
 	   define( "PLOG_CLASS_PATH", dirname(__FILE__)."/");
 	}

Modified: plog/trunk/templates/LifeType/en_UK/strings.txt
===================================================================
--- plog/trunk/templates/LifeType/en_UK/strings.txt	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/templates/LifeType/en_UK/strings.txt	2006-12-06 17:41:38 UTC (rev 4381)
@@ -1,568 +1,555 @@
-ltTagline = """LifeType is an open-source blogging platform with support for multiple blogs and users
-in a single installation."""
-
-frontPageLeft = """The latest stable version of LifeType is <b>1.1</b>. Click the link below to download.<br/>
-Take a look at the <a href="http://www.lifetype.net/blog.php/lifetype_development_journal/page/downloads">Downloads</a> section for more download packages,
-additional template sets and plugins."""
-
-frontPageRight = """LifeType supports multiple blogs and users, media management,
-generation of standard content, clean URLs and support for subdomains.
-<br/>
-LifeType is released under the GPL license, and requires PHP and MySQL to work."""
-
-Features = """<div class="toc">
-<span class="toc-title">Features</span>
-<ul>
-<li><a href="#bloggers_love_it">Bloggers love it</a></li>
-<li><a href="#administrators_trust_it">Administrators trust it</a></li>
-<li><a href="#geeks_need_it">Geeks need it</a></li>
-<li><a href="#demo">Demo Site</a></li>
-<li><a href="#requirements">Requirements and License</a></li>
-</ul>
-</div>
-
-
-<h2>Bloggers love it</h2>
-<a name="bloggers_love_it"></a>
-
-<h4>User Friendly Interface</h4>
-<p>Writing articles is comfortable with the included state of the art <a href="http://en.wikipedia.org/wiki/WYSIWYG">WYSIWYG</a> editor.
-Adding pictures and sound files (for <a href="http://en.wikipedia.org/wiki/Podcasting">Podcasting</a>) is just a matter of browse and click.<br/>
-The Dashboard provides you with all the information you need every time you log in.
-Recent articles, comments and <a href="http://en.wikipedia.org/wiki/Trackback">trackback</a> as well as brief statistics get you updated about your blog immediately.</p>
-
-<h4>Integrated Media Management</h4>
-<p>Podcasting, automatic thumbnail generation, mass uploading of files, a filebrowser and custom
-descriptions for each file is supported through the administration interface</p>
-
-<h4>Choose your Style</h4>
-<p>Looking for a nice design for your weblog? Go check out the over 60 freely available
-<a href="http://www.lifetype.net/blog.php/lifetype_development_journal/page/downloads#templates">templates</a>.
-Installation is as easy as uploading a file through your administration interface!</p>
-
-<h4>Add a Feature</h4>
-<p>If you're looking for a feature not available with the standard installation,
-you will probably find it in the <a href="http://www.lifetype.net/blog.php/lifetype_development_journal/page/downloads#plugins">plugins section</a>,
-providing you with over 60 features for you to add in no time.<br />
-Some of the most popular are: <a href="http://wiki.lifetype.net/index.php/PLog_1.0/Plugins/moblog">Moblogging</a>,
-<a href="http://wiki.lifetype.net/index.php/PLog_1.0/Plugins/templateeditor">Template Editor</a> und
-<a href="http://wiki.lifetype.net/index.php/PLog_1.0/Plugins/nestedcomments">Nested Comments</a>.</p>
-
-<h4>Anti-spam Filter</h4>
-<p>The built-in bayesian spam filter keeps comments and trackbacks in you blog clean.
-And comment moderation, <a href="http://en.wikipedia.org/wiki/Captcha">Captchas</a> and trackback validation
-is available through plugins.</p>
-
-<h4>Support for Trackbacks</h4>
-<p>Trackback blogs you read by simply linking to them!
-LifeType will automatically find the trackback URL of the blog you are linking to.</p>
-
-<h4>Multiple Users per Blog</h4>
-<p>You can easily give your friends permissions to write in your weblog, making collaborative
-web sites even easier!</p>
-
-<h4>Easy Installation</h4>
-<p>The installation wizard will take you through the installation - it's a breeze! And there's no need to edit
-configuration files, you can control all the settings through the administration interface</p>
-
-<h4>Mobile features</h4>
-<p>Are you into moblogging? Do you need to blog wherever you are? Do you need to easily provide low bandwidth  versions of your site for mobile devices? Using the appropiate plugins, LifeType becomes the first mobile-ready application of its kind with seamless integration for publishing to and accessing blogs.</p>
-
-
-<h2>Administrators trust it</h2>
-<a name="administrators_trust_it"></a>
-
-<h4>Multiple Blogs in one Installation</h4>
-<p>With it's multi blog, multi user setup and strict separation of single weblog administration
-and overall administration LifeType is idealy suited for <a href="http://www.blogger.com">blog hosting</a>.
-It's all provided through a single installation and one single database.</p>
-
-<h4>Central Page for Communities</h4>
-<p>Easy 4 step registration for new weblogs, an overwiev of newest and most popular blogs as well as a
-user and blog index, everything ready to go with your intallation of LifeType.</p>
-
-<h4>Subdomains</h4>
-<p>Provide your users with nice <a href="http://wiki.lifetype.net/index.php/PLog_1.0/Admin/Support_for_Subdomains">subdomains</a>
-like username.yourdomain.com or blogname.yourdomain.com. (you need to be able to set up wildcards
-on your domain to use this feature)</p>
-
-<h4>Easily Localizable</h4>
-<p>Localization is done on a per blog basis. Through just one single file you may translate in any language you like.
-But before you start your translation make sure it's not already done! LifeType supports any encoding
-and the latest version has been translated to French, German, Spanish, Japanese (both using EUC-JP and
-UTF-8 encodings) and many more.</p>
-
-<h4>Performance</h4>
-<p>Template caching, data object caching and serious code refactoring to improve performance and keep the system load
-as minimal as possible make LifeType fast and reliable even with very large and busy communites. </p>
-
-
-<h2>Geeks need it</h2>
-<a name="geeks_need_it"></a>
-
-<h4>Nice Looking URLs</h4>
-<p>Creat your own <a href="http://wiki.lifetype.net/index.php/PLog_1.0/Admin/Customizing_URLs">customized URLs</a>
-for <a href="http://en.wikipedia.org/wiki/SEO">SEO</a> or to adapt your them to your language. Toggle a setting in the configuration of the site and LifeType
-will automatically use cruft-free URLs instead of the old style, raw ones.</p>
-
-<h4>Nice and Clean Code</h4>
-<p>LifeType is based on a <a href="http://wiki.lifetype.net/index.php/Model-View-Controller_in_pLog">Model-View-Controller</a>
-framework providing flexibility and scalability. Documentation is generated with Doxigen and the
-<a href="http://lifetype.net/api/">most recent API</a> is always available.</p>
-
-<h4>Clean Content</h4>
-<p>The default templates included in LifeType are <a href="http://www.w3.org/TR/xhtml1/">XHTML 1.0</a> Strict, and so is the content generated by
-LifeType. Worried about generating correct and standard mark-up? Worry no longer!</p>
-
-<h4>Powerful Plugin Framework</h4>
-<p>The <a href="http://wiki.lifetype.net/index.php/PLog_1.0/Plugins">impressive plugin capabilities</a>
-let's you add about any feature you like. With filters, events, registration of new actions, localization,
-MVC support (self-contained), perfect integration into the administration interface and template support
-you can add about any functionality you can think off.</p>
-
-<h4>Smarty Templates</h4>
-<p>Don't like any of the existing templates? No worries!<br/>
-LifeType is built on top of the fantastic <a href="http://smarty.php.net">Smarty template engine</a>, providing unprecedented
-power to template developers without compromising security, since Smarty templates do not
-allow by default to add potentially dangerous PHP code to our templates. This is specially
-important if you use LifeType to provide a blogging service to a community.</p>
-
-<h4>XMLRPC</h4>
-<p>LifeType supports an <a href="http://www.xmlrpc.com/">XMLRPC</a> interface for remote creating and editing articles. And of course you may ping as
-many directories as you like with the inbuilt XMLRPC ping service. XMLRPC pings are enabled/disabled per article.</p>
-
-<h2>Demo Site</h2>
-<a name="demo"></a>
-<p>
-The kind folks at <a href="http://www.opensourcecms.com">OpenSourceCMS.com</a> have installed a
-demo version of LifeType that is available to everyone: <a href="http://www.opensourcecms.com/index.php?option=content&task=view&id=330&Itemid=159">click to visit the demo site</a>.
-</p>
-
-
-<h2>Requirements and License</h2>
-<a name="requirements"></a>
-
-<p>LifeType requires at least <a href="http://www.php.net">PHP</a> 4.3.0 and <a href="http://www.mysql.com">MySQL</a>
-3.23 to run. Regarding PHP, it is recommended to run the most recent version of either the PHP4 (4.4.0) or PHP5
-branches (PHP 5.1.0). <a href="http://www.apache.org">Apache</a> is the preferred web server but LifeType should run
-fine under any web server as long as PHP is supported (including Microsoft Internet Information Services)</p>
-
-<p>LifeType has been built on and for Linux and Unix servers, but it will run on the Windows platform without any problem
-(both under Apache and Microsoft Internet Information Services)</p>
-
-<p>If you are planning to use advanced features such as customized URLs you will need support for
-ForceType in your Apache configuration. If you are planning to use the subdomains feature, you will need
-a domain configured to accept wildcard subdomains as well as a correctly configured Apache server.</p>
-
-<p>LifeType is licensed under the <a href="http://www.fsf.org/licensing/licenses/gpl.html">GNU General Public License</a>.</p>
-"""
-
-Development = """
-
-<div class="toc">
-<span class="toc-title">Development</span>
-<ul>
-<li><a href="#documentation">Documentation</a></li>
-<li><a href="#joining_the_team">Joining the team</a></li>
-<li><a href="#beta_releases">Beta releases</a></li>
-<li><a href="#subversion_repository">Subversion repository</a></li>
-<li><a href="#keeping_in_touch">Keeping in touch</a></li>
-</ul>
-</div>
-
-
-
-<h2>Documentation</h2>
-<a name="documentation"></a>
-<p>
-The whole LifeType API is available for developers at <a href="http://www.lifetype.net/api">http://www.lifetype.net/api</a>. This
-documentation was generated by <a href="http://www.doxygen.org">Doxygen</a> based on the comments in the code by the
-developers. The documentation is organized in packages in which classes that share a certain functionality are grouped.
-The class documentation is also cross-referenced with the actual PHP code
-</p>
-
-<h2>Joining the Team</h2>
-<a name="joining_the_team"></a>
-<p>
-For those users wishing to help the project grow, you may want to contribute with some of your time.
-There is no need to be a developer or an HTML expert, there are lots of other ways to contribute
-to the LifeType project! We need translators, artists, designers, people lending a hand in the forums and
-of course, developers. If you think you can help, please drop us a line at
-<a href="mailto:contact at lifetype.net">contact_AT_LifeType.net</a> or in the forums. If you want to join
-the team as a developer and don't know where to start, take a look at the
-<a href="http://www.lifetype.org/api">API documentation</a> and at our
-<a href="http://bugs.lifetype.org">bug-tracking system</a> (<a href="http://www.lifetype.net/blog.php/lifetype_development_journal/page/support#bug_tracker">more...</a>)
-</p>
-
-<h2>Beta releases</h2>
-<a name="beta_releases"></a>
-<p>
-Beta version of LifeType are released on a per-needed basis, usually in the last steps of a new release.
-</p>
-<p>
-Users interested in running the latest development version of LifeType can also download and update the code from
-the <a href="#subversion_repository">Subversion repository</a>.
-</p>
-
-<h2>The Subversion repository</h2>
-<a name="subversion_repository"></a>
-<h4>Getting a client</h4>
-<p>
-The LifeType project uses <a href="http://subversion.tigris.org/">Subversion</a> as its source control system.
-Subversion is a free version control system and there are clients available for the most common platforms. In Linux and
-Mac OS X and the BSD systems, it is possible to install the default command line client <b>svn</b>. Please check the
-packages of your distribution for Linux, Fink for OS X and the ports for the BSD systems. For Windows users,
-<a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a> is a good choice.
-</p>
-
-<h4>Structure of the repository</h4>
-<p>
-The repository is organized in the following different modules:
-<b>plog</b>, <b>plugins</b> and <b>templates</b>. All these modules follow the same structure:
-</p>
-
-<pre>
-plog/
-plog/
-trunk/
-branches/
-tags/
-plugins/
-trunk/
-branches/
-tags/
-templates/
-trunk/
-branches/
-tags/
-</pre>
-
-<ul>
-<li><b>trunk</b>: is the main folder and it will usually contain the most recent version of the data.</li>
-<li><b>branches</b>: contains any code that was branched from the main trunk. Beta versions and maintenance releases are
-usually developed as <i>branches</i>, so development code will be placed here from time to time.</li>
-<li><b>tags</b> Whenever a new release is made, a new tag will be created in this folder.
-A <i>tag</i> is a snapshot of the repository at a certain point in time. This allows to easily retrieve previous versions of
-pLog</li>
-</ul>
-
-<h4>Checking out and updating the code</h4>
-
-<p>
-The following command will checkout the code from the trunk/ folder:
-</p>
-<pre>
-svn checkout http://devel.lifetype.net/svn/plog/plog/trunk
-</pre>
-
-<p>If you wish to check out a certain branch or tag, replace /trunk with /branch/branch-name or /tags/tag-name:</p>
-<pre>
-svn checkout http://devel.lifetype.net/svn/plog/plog/tags/lifetype-1.1
-</pre>
-
-
-<p>In order to update your local copy of the repository, run the following command in the same folder where the
-code was checked for the first time:</p>
-<pre>
-svn update
-</pre>
-
-<p>
-Please see <a href="http://wiki.lifetype.net/index.php/Subversion_Repository">the wiki page on Subversion</a> for more
-details and information.
-</p>
-
-<h2>Keeping in Touch</h2>
-<a name="keeping_in_touch"></a>
-<p>
-The best way to keep in touch with the developer is to join the project <a href="http://www.lifetype.net/blog.php/lifetype_development_journal/page/support#mailing_lists">mailing lists</a>.
-If you are also interested in getting a message every time a change is made to the Subversion repository,
-it is highly recommended that you join the <a href="">plog-svn</a> mailing list.
-</p>"""
-
-
-Downloads = """
-<div class="toc">
-<span class="toc-title">Downloads</span>
-<ul>
-<li><a href="#lifetype_packages">LifeType Packages</a></li>
-<li><a href="#plugins">Plugins</a></li>
-<li><a href="#templates">Template Sets</a></li>
-<li><a href="#development_versions">Development Versions</a></li>
-<li><a href="#others">Other Downloads</a></li>
-</ul>
-</div>
-
-<h2>LifeType Packages</h2>
-<a name="lifetype_packages"></a>
-
-<p>
-These are the official downloadable packages containing the most recent stable version. Packages
-are available compressed in either .tar.gz or .zip, and are provided via SourceForge.net.
-<br/><br/>
-<a href="http://prdownloads.sourceforge.net/lifetype/lifetype-1.1.tar.gz?download">LifeType 1.1 (tar.gz format)</a><br/>
-<a href="http://prdownloads.sourceforge.net/lifetype/lifetype-1.1.tar.bz2?download">LifeType 1.1 (tar.bz2 format)</a><br/>
-<a href="http://prdownloads.sourceforge.net/lifetype/lifetype-1.1.zip?download">LifeType 1.1 (zip format)</a><br/>
-</p>
-
-<h2>Plugins</h2>
-<a name="plugins"></a>
-
-<p>Please visit the <a href="http://wiki.lifetype.net/index.php/Plugins">plugins overview</a> in the wiki. All available plugins are documented and downloadable there. For LifeType 1.1 there is a <a href="http://wiki.lifetype.net/index.php/Plugin_Compatibility_List_LifeType_1.1">compatibility list</a> available.</p>
-
-<h2>Template Sets</h2>
-<a name="templates"></a>
-
-<p>While the official <a href="http://wiki.lifetype.net/index.php/Templates">template overview</a> is still under construction, you may get the templates directly from the <a href="http://sourceforge.net/project/showfiles.php?group_id=83964&package_id=100435">sourceforge donwload directory</a>.</p>
-
-<h2>Development Versions</h2>
-<a name="development_versions"></a>
-<p>
-The current development version is <b>LifeType 1.1</b>. The only way to take the current development version for a spin
-is via our Subversion repository. Since the code is not quite stable, we have not created packages for public consumption yet.
-</p>
-<p>
-If interested, please take a look at the instructions provided
-<a href="http://www.lifetype.net/blog.php/lifetype_development_journal/page/development#subversion_repository">here</a> for
-more information regarding how to fetch a development version from our repository.
-</p>
-
-<h2>Other Downloads</h2>
-<a name="others"></a>
-
-<p>
-The <a href="http://www.lifetype.net/blog.php/lifetype_development_journal/page/downloads">LifeType CommsKit</a> includes official logos, buttons, slide and document
-templates to be used for all public communications. These are the only project-approved items.<br/><br/>
-<a href="http://www.lifetype.net/resserver.php?blogId=1&amp;resource=lt_buttons.zip" style="border:0px">
-<img src="http://www.lifetype.net/templates/grey-sf/images/lt_button51.png" alt="LifeType" />
-</a><br /><br />
-The <a href="http://www.lifetype.net/resserver.php?blogId=1&amp;resource=lt_buttons.zip">LifeType Buttons</a> package contains several small-size buttons that can be placed
-in web-sites. Please provide a link back to LifeType.net when placing these buttons in sites.
-</p>
-"""
-
-
-
-Support = """
-<div class="toc">
-<span class="toc-title">Support</span>
-<ul>
-<li><a href="#faq">Frequently Asked Questions</a></li>
-<li><a href="#forums">Forums</a></li>
-<li><a href="#bug_tracker">Bug-tracker</a></li>
-<li><a href="#wiki">Wiki</a></li>
-<li><a href="#mailing_lists">Mailing Lists</a></li>
-</ul>
-</div>
-
-<h2>Frequently Asked Questions</h2>
-<a name="faq"></a>
-<p>
-There is a list with the most frequently asked questions
-<a href="http://wiki.lifetype.net/index.php/FAQ">available in the wiki</a>. Please check if your problem
-has already been answered there, it will save us time if we don't have to answer the same question over
-and over again.
-</p>
-<ol>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#.27When_trying_to_run_the_wizard_during_installation.2C_it_doesn.27t_work_and_I_get_lots_of_messages_like_.22fopen.28..2Ftmp.2F3f4c7de95a680.29:_failed_to_open_stream:_Permission_denied.22.2C_.22Smarty_error:_problem_writing_temporary_file_.27..2Ftmp.2F3f4c7de95a680.27.22_or_.22touch.28.29:_Unable_to_create_file_..2Ftmp.2Fwizard.5Eintro.template_because_Permission_denied.22._What_can_I_do.3F">When trying to run the wizard during installation, it doesn't work and I get lots of messages like "fopen(./tmp/3f4c7de95a680): failed to open stream: Permission denied", "Smarty error: problem writing temporary file './tmp/3f4c7de95a680'" or "touch(): Unable to create file ./tmp/wizard^intro.template because Permission denied". What can I do?</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#How_can_I_recover_my_password.3F">How can I recover my password?</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#I_can.27t_see_the_icons_in_the_visual_HTML_editor_after_installing.21">I can't see the icons in the visual HTML editor after installing!</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#How_can_users_register_a_Blog_on_my_System.3F">How can users register a Blog on my System?</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#Why_can.27t_I_add_new_template_files.3F">Why can't I add new template files?</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#I_get_.22There_was_no_resource_file_uploaded.22_when_adding_a_new_resource">I get "There was no resource file uploaded" when adding a new resource</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#I_cannot_see_the_graphical_editor_of_posts_even_though_I_have_set__.22Enable_WYSIWYG_edition_of_texts.22__to_yes_in_my_blog_settings">I cannot see the graphical editor of posts even though I have set _"Enable WYSIWYG edition of texts"_ to yes in my blog settings</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#When_I_try_to_add_a_link_using_the_graphical_editor_of_posts_by_clicking_the_button_with_the_anchor_icon.2C_I_get_a_pop-up_window_asking_me_for_a_URL_but_then_nothing_is_added_to_the_text.">When I try to add a link using the graphical editor of posts by clicking the button with the anchor icon, I get a pop-up window asking me for a URL but then nothing is added to the text.</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#The_wizard_throws_the_following_error_when_I_move_to_step_number_two">The wizard throws the following error when I move to step number two</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#How_can_I_use_.22https:.2F.2F.22_URLs_with_pLog.3F">How can I use "https://" URLs with pLog?</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#Locales_with_access_do_not_work">Locales with access do not work</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#How_can_I_configure_.22Search_Engine_friendly.22_URLs.3F">How can I configure "Search Engine friendly" URLs?</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#Where_is_the_administration_panel.3F">Where is the administration panel?</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#No_thumbnail_is_generated_at_all_when_uploading_GIF_files.21">No thumbnail is generated at all when uploading GIF files!</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#After_installing_pLog_in_my_RH9.2FFedora_Core_server_the_texts_are_all_messed_up.21">After installing pLog in my RH9/Fedora Core server the texts are all messed up!</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#How_do_I_set_summary.php_as_the_front_page_of_my_site.3F">How do I set summary.php as the front page of my site?</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#My_PHP_is_running_out_of_memory.2FI_can.27t_see_anything_in_my_pages">My PHP is running out of memory/I can't see anything in my pages</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#I_am_getting_an_allowed_memory_size_of_XXX_bytes_exhausted_error">I am getting an allowed memory size of XXX bytes exhausted error</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#When_subdomains_are_enabled.2C_www.mysite.com_says_that_the_blog_doesn.27t_exist.21">When subdomains are enabled, www.mysite.com says that the blog doesn't exist!</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#How_Can_I_display_my_pLog_blog_in_non-pLog_pages.3F">How Can I display my pLog blog in non-pLog pages?</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#How_do_I_configure_support_for_subdomains.3F">How do I configure support for subdomains?</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#How_do_I_configure_custom_URLs.3F">How do I configure custom URLs?</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#I_am_using_subdomains.2C_can_I_remove_.2Fblog.2F_from_URLs.3F">I am using subdomains, can I remove /blog/ from URLs?</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#I_am_getting_an_error_in_file_XXX_line_YYY_right_after_installation.2C_why_do_you_guys_have_broken_code.3F">I am getting an error in file XXX line YYY right after installation, why do you guys have broken code?</a></li>
-<li><a href="http://wiki.lifetype.net/index.php/FAQ#Tables_don.27t_exist_on_Fresh_Install">Tables don't exist on Fresh Install</a></li>
-</ol>
-
-<h2>Forums</h2>
-<a name="forums"></a>
-<p>
-Most of the support in the LifeType project is handled via the forums avaliable at
-<a href="http://forums.lifetype.net">forums.lifetype.net</a>. Make sure to read the
-<a href="http://wiki.lifetype.net">FAQ</a> available in the wiki project to make sure
-that your answer has not been already answered before.
-</p>
-
-<h2>Bug-tracker</h2>
-<a name="bug_tracker"></a>
-<p>
-Should you find any bug in a stable or development release of LifeType, please help the project
-by reporting it via the project's <a href="http://bugs.lifetype.net">bug tracking system</a>.
-</p>
-
-<h2>Wiki</h2>
-<a name="wiki"></a>
-<p>
-The documentation of the project is maintained in the <a href="http://wiki.lifetype.net">project wiki</a>.
-The wiki is a collaborative project open to every one, please feel free to fill in incomplete sections
-and/or create new ones within the current structure.
-</p>
-
-<h2>Mailing Lists</h2>
-<a name="mailing_lists"></a>
-<p>
-Mailing lists are the preferred way to communicate with the developers, although they should not
-be used for support questions but insted, to discuss other aspects of the project such as new
-ideas, development issues and so on. Currently there are two public mailing lists available
-to everyone:
-</p>
-<ul>
-<li><a href="http://devel.lifetype.net/mailman/listinfo/plog-general">plog-general</a></li>
-<li><a href="http://devel.lifetype.net/mailman/listinfo/plog-svn">plog-svn</a></li>
-</ul>
-<p>
-Click the links above to sign up for any of them, follow the instructions and don't forget to
-reply to the confirmation mail necessary to finish the registration process.
-</p>
-
-<h2>Additional Resources</h2>
-<p>
-These are additional links related to installing and configuring certain features of LifeType:<br/><br/>
-<a href="http://www.php.net/manual/en/install.php">Installing and configuring PHP</a>.<br/>
-<a href="http://steinsoft.net/index.php?site=Programming/Articles/apachewildcarddomain">Configuring DNS and Apache to support subdomains</a>.<br/>
-<a href="http://httpd.apache.org/docs/1.3/mod/mod_mime.html#forcetype">Apache documentation on ForceType</a>.<br/>
-</p>
-"""
-
-AboutUs = """
-
-<div class="toc">
-<span class="toc-title">Support</span>
-<ul>
-<li><a href="#project_statement">Project Statement</a></li>
-<li><a href="#history">History</a></li>
-<li><a href="#lifetype_and_plog">Relationship between LifeType and pLog</a></li>
-<li><a href="#project_members">Project Members</a></li>
-<li><a href="#contributors">Contributors</a></li>
-<li><a href="#sponsors">Sponsors</a></li>
-<li><a href="#contact_us">Contact Us</a></li>
-</ul>
-</div>
-
-<h4>Project Statement</h4>
-<a name="project_statement"></a>
-<p>
-The goal of the LifeType project is to create a stable multi-user and multi-blogging platform, to strengthen
-the concept of communities around blogs.
-</p>
-
-<h4>History</h4>
-<a name="history"></a>
-<p>
-The LifeType project started in February 2003 when its leader, Oscar Renalias, needed a set of dynamic
-scripts for his personal web page. Even though he did not know about the idea of weblogs back then,
-the outcome of the first iteration of the project already resembled one. A few weeks later Francesc,
-another one of the founding members, suggested that developing a blog with support for multiple users
-and blogs could be a better idea, and so pLog 0.1 was released on the 2nd of September 2003 featuring
-most of the features that are still part of the core features nowadays: multi-user and multi-blog from
-the ground up, template engine, localizable and extensible via plugins.
-</p>
-<p>
-pLog 0.2 was released on the 9th of November, sporting new search engine-friendly URLS, speed
-improvements, a better plugin interface and changes in the administration interface. At this point is
-where pLog started to gather some interest from the community and when pLog 0.3 was released later on
-March 2004, it was warmly received by the community: it still is the most downloaded pLog/LifeType release
-ever. pLog 0.3 introduced the concept of "resources" and the integration of media files with
-articles, time differences, an integrated RSS parser and a Bayesian anti spam filter.
-</p>
-<p>
-LifeType 1.0 was released in April 2005, with LifeType 1.0.6 being the last maintenance release of the 1.0.x
-branch in June 2006. LifeType 1.0 has so far been the most successful LifeType release ever, although it is still
-early to say how well LifeType 1.1 will do.
-</p>
-<p>
-The most recent version of LifeType is 1.1, which is the first main release of LifeType since April 2005
-and includes a major set of new features and improvements specially in the performance and memory
-consumption areas.
-</p>
-
-<h4>Relationship between LifeType and pLog</h4>
-<a name="lifetype_and_plog"></a>
-<p>
-Amazon.com has been holding the "plog" trademark much longer than the project has been around, so the
-project was kindly asked to change its name.
-</p>
-<p>
-On behalf of the LifeType project, we would like to thank
-the attitude of Amazon.com towards the LifeType project. Where others would have decided to sue an
-open source project, Amazon.com decided to work together with us so that we could
-find a solution that would suit all of us. And this is how the pLog project became the
-LifeType project.
-</p>
-
-<h4>Project Members</h4>
-<a name="project_members"></a>
-
-<ul>
-<li><a href="http://www.renalias.net">Oscar Renalias</a>: Lead developer and founding developer.</li>
-<li><a href="http://www.francesc.net">Francesc Pla</a>: Main project advisor and project co-founder.</li>
-<li><a href="http://blog.markplace.net/">Mark Wu</a>: Lead co-developer, expert in encoding
-and localization issues and current maintainer of the LifeType site for the <a href="http://wwww.lifetype.org.tw">Chinese-speaking
-community</a>.</li>
-<li><a href="http://jon.limedaley.com/plog/">Jon Daley</a>: Developer and main helping
-hand in the forums and bug-tracking system.</li>
-<li><a href="http://www.lifetype.de">Michael Erdmann</a>: Responsible for marketing and promotion
-activities mainly in the European area and responsible for the<br /> <a href="http://www.lifetype.de">LifeType.de</a>
-site for German users.</li>
-<li><a href="http://ork.orkland.de/">Benjamin Krause</a>: Main ideologist and developer behind the
-speed improvements during the 1.0 and 1.1 series.</li>
-<li><a href="http://hugi.to/blog/">Reto Hugi</a>: Developer and responsible for marketing and promotion in Switzerland.</li>
-</ul>
-
-
-<h4>Contributors</h4>
-<a name="contributors"></a>
-<ul>
-<li><a href="http://www.paulstimesink.com/">Paul Westbrook</a></li>
-<li><a href="http://linux.bloghome.cn/">Su Baochen</a></li>
-<li><a href="http://www.bliang.com/.site/show/page/archive">Bradley Liang</a></li>
-<li><a href="http://www.wumingxiaoxia.com/">Allan Sun</a></li>
-</ul>
-
-<h4>Partners Sponsors</h4>
-<a name="sponsors"></a>
-<p>
-Current hosting services of all LifeType.net sites is provided by Ferca.<br/>
-<a href="http://www.ferca.com" style="border:0px">
-<img src="http://www.lifetype.net/templates/grey-sf/images/partner_ferca.jpg" alt="Ferca" />
-</a>
-</p>
-<p>
-qDevel has the greatest LifeType-related knowledge, with some of its employees being
-current or former members of the LifeType projects. Please get in touch with them if you need
-any consulting services related to LifeType.
-<br/>
-<br/>
-<a href="http://www.qdevel.com" style="border:0px">
-<img src="http://www.lifetype.net/templates/grey-sf/images/partner_qdevel.jpg" alt="qDevel" />
-</a>
-</p>
-
-<h4>Contact Us</h4>
-<a name="contact_us"></a>
-Please contact us at any of the email addresses below should you have any more questions
-related to the project:
-<ul>
-<li>General enquiries: <a href="mailto:contact at lifetype.net">contact at lifetype.net</a></li>
-<li>Marketing, press &amp; interviews: <a href="mailto:press at lifetype.net">press at lifetype.net</a></li>
-<li>German enquiries: <a href="mailto:de at lifetype.net">de at lifetype.net</a></li>
-<li>Taiwan enquiries: <a href="mailto:tw at lifetype.net">tw at lifetype.net</a></li>
-</ul>
+ltTagline = """LifeType is an open-source blogging platform with support for multiple blogs and users
+in a single installation."""
+
+frontPageLeft = """The latest stable version of LifeType is <b>1.1.2</b>. Click the link below to download.<br/>
+Take a look at the <a href="http://www.lifetype.net/blog.php/lifetype-development-journal/page/downloads">Downloads</a> section for more download packages,
+additional template sets and plugins."""
+
+frontPageRight = """LifeType supports multiple blogs and users, media management,
+generation of standard content, clean URLs and support for subdomains.
+<br/>
+LifeType is released under the GPL license, and requires PHP and MySQL to work."""
+
+Features = """<div class="toc">
+<span class="toc-title">Features</span>
+<ul>
+<li><a href="#bloggers_love_it">Bloggers love it</a></li>
+<li><a href="#administrators_trust_it">Administrators trust it</a></li>
+<li><a href="#geeks_need_it">Geeks need it</a></li>
+<li><a href="#demo">Demo Site</a></li>
+<li><a href="#requirements">Requirements and License</a></li>
+</ul>
+</div>
+
+
+<h2>Bloggers love it</h2>
+<a name="bloggers_love_it"></a>
+
+<h4>User Friendly Interface</h4>
+<p>Writing articles is comfortable with the included state of the art <a href="http://en.wikipedia.org/wiki/WYSIWYG">WYSIWYG</a> editor.
+Adding pictures and sound files (for <a href="http://en.wikipedia.org/wiki/Podcasting">Podcasting</a>) is just a matter of browse and click.<br/>
+The Dashboard provides you with all the information you need every time you log in.
+Recent articles, comments and <a href="http://en.wikipedia.org/wiki/Trackback">trackback</a> as well as brief statistics get you updated about your blog immediately.</p>
+
+<h4>Integrated Media Management</h4>
+<p>Podcasting, automatic thumbnail generation, mass uploading of files, a filebrowser and custom
+descriptions for each file is supported through the administration interface</p>
+
+<h4>Choose your Style</h4>
+<p>Looking for a nice design for your weblog? Go check out the many freely available
+<a href="http://wiki.lifetype.net/index.php/Templates">templates</a>.
+Installation is as easy as uploading a file through your administration interface!</p>
+
+<h4>Add a Feature</h4>
+<p>If you're looking for a feature not available with the standard installation,
+you will probably find it in the <a href="http://wiki.lifetype.net/index.php/Plugins">wiki plugins overview</a>,
+providing you with over 60 features for you to add in no time.<br />
+Some of the most popular are: <a href="http://wiki.lifetype.net/index.php/Plugin_moblog">Moblogging</a>,
+<a href="http://wiki.lifetype.net/index.php/Plugin_templateeditor">Template Editor</a> und
+<a href="http://wiki.lifetype.net/index.php/Plugin_nestedcomments">Nested Comments</a>.</p>
+
+<h4>Built-in anti-spam Filter</h4>
+<p>The built-in bayesian spam filter keeps comments and trackbacks in you blog clean.
+And <a href="http://wiki.lifetype.net/index.php/Plugin_moderate">comment moderation</a>, <a href="http://wiki.lifetype.net/index.php/Plugin_authimage">Captchas</a> and <a href="http://wiki.lifetype.net/index.php/Plugin_validatetrackback">trackback validation</a>
+is available through plugins.</p>
+
+<h4>Support for Trackbacks</h4>
+<p>Trackback blogs you read by simply linking to them!
+LifeType will automatically find the trackback URL of the blog you are linking to.</p>
+
+<h4>Multiple Users per Blog</h4>
+<p>You can easily give your friends permissions to write in your weblog, making collaborative
+web sites even easier!</p>
+
+<h4>Easy Installation</h4>
+<p>The installation wizard will take you through the installation - it's a breeze! And there's no need to edit
+configuration files, you can control all the settings through the administration interface</p>
+
+<h4>Mobile features</h4>
+<p>Are you into moblogging? Do you need to blog wherever you are? Do you need to easily provide low bandwidth  versions of your site for mobile devices? Using the appropiate plugins, LifeType becomes the first mobile-ready application of its kind with seamless integration for publishing to and accessing blogs.</p>
+
+
+<h2>Administrators trust it</h2>
+<a name="administrators_trust_it"></a>
+
+<h4>Multiple Blogs in one Installation</h4>
+<p>With it's multi blog, multi user setup and strict separation of single weblog administration
+and overall administration LifeType is idealy suited for <a href="http://www.blogger.com">blog hosting</a>.
+It's all provided through a single installation and one single database.</p>
+
+<h4>Central Page for Communities</h4>
+<p>Easy 4 step registration for new weblogs, an overwiev of newest and most popular blogs as well as a
+user and blog index, everything ready to go with your intallation of LifeType.</p>
+
+<h4>Subdomains</h4>
+<p>Provide your users with nice <a href="http://wiki.lifetype.net/index.php/Support_for_Subdomains">subdomains</a>
+like username.yourdomain.com or blogname.yourdomain.com. (you need to be able to set up wildcards
+on your domain to use this feature) If that's not enough, LifeType is also able to serve several different domains with one single installation!</p>
+
+<h4>Easily Localizable</h4>
+<p>Localization is done on a per blog basis. Through just one single file you may translate in any language you like.
+But before you start your translation make sure it's not already done! LifeType supports any encoding
+and the latest version has been translated to <a href="http://wiki.lifetype.net/index.php/I18n">many languages</a> including French, German, Spanish, chinese and many more.</p>
+
+<h4>Performance</h4>
+<p>Template caching, data object caching and serious code refactoring to improve performance and keep the system load
+as minimal as possible make LifeType fast and reliable even with very large and busy communites. </p>
+
+<h2>Geeks need it</h2>
+<a name="geeks_need_it"></a>
+
+<h4>Nice Looking URLs</h4>
+<p>Creat your own <a href="http://wiki.lifetype.net/index.php/Custom_URLs">customized URLs</a>
+for <a href="http://en.wikipedia.org/wiki/SEO">SEO</a> or to adapt your them to your language. Toggle a setting in the configuration of the site and LifeType
+will automatically use cruft-free URLs instead of the old style, raw ones.</p>
+
+<h4>Nice and Clean Code</h4>
+<p>LifeType is based on a <a href="http://wiki.lifetype.net/index.php/Model-View-Controller_in_LifeType">Model-View-Controller</a>
+framework providing flexibility and scalability. Documentation is generated with Doxygen and the
+<a href="http://lifetype.net/api/">most recent API</a> is always available.</p>
+
+<h4>Clean Content</h4>
+<p>The default templates included in LifeType are <a href="http://www.w3.org/TR/xhtml1/">XHTML 1.0</a> Strict, and so is the content generated by
+LifeType. Worried about generating correct and standard mark-up? Worry no longer!</p>
+
+<h4>Powerful Plugin Framework</h4>
+<p>The <a href="http://wiki.lifetype.net/index.php/Plugin_Development">impressive plugin capabilities</a>
+let's you add about any feature you like. With filters, events, registration of new actions, localization,
+MVC support (self-contained), perfect integration into the administration interface and template support
+you can add about any functionality you can think off.</p>
+
+<h4>Smarty Templates</h4>
+<p>Don't like any of the existing templates? No worries!<br/>
+LifeType is built on top of the fantastic <a href="http://smarty.php.net">Smarty template engine</a>, providing unprecedented
+power to template developers without compromising security, since Smarty templates do not
+allow by default to add potentially dangerous PHP code to our templates. This is specially
+important if you use LifeType to provide a blogging service to a community.</p>
+
+<h4>XMLRPC</h4>
+<p>LifeType supports an <a href="http://www.xmlrpc.com/">XMLRPC</a> interface for remote creating and editing articles. And of course you may ping as many directories as you like with the inbuilt XMLRPC ping service. XMLRPC pings are enabled/disabled per article.</p>
+
+<h2>Demo Site</h2>
+<a name="demo"></a>
+<p>
+The kind folks at <a href="http://www.opensourcecms.com">OpenSourceCMS.com</a> have installed a
+demo version of LifeType that is available to everyone: <a href="http://www.opensourcecms.com/index.php?option=content&task=view&id=330&Itemid=159">click to visit the demo site</a>.
+</p>
+
+
+<h2>Requirements and License</h2>
+<a name="requirements"></a>
+
+<p>LifeType requires at least <a href="http://www.php.net">PHP</a> 4.3.0 and <a href="http://www.mysql.com">MySQL</a>
+3.23 to run. Regarding PHP, it is recommended to run the most recent version of either the PHP4 (4.4.0) or PHP5
+branches (PHP 5.1.0). <a href="http://www.apache.org">Apache</a> is the preferred web server but LifeType should run
+fine under any web server as long as PHP is supported (including Microsoft Internet Information Services)</p>
+
+<p>LifeType has been built on and for Linux and Unix servers, but it will run on the Windows platform without any problem
+(both under Apache and Microsoft Internet Information Services)</p>
+
+<p>If you are planning to use advanced features such as customized URLs you will need support for
+ForceType in your Apache configuration. If you are planning to use the subdomains feature, you will need
+a domain configured to accept wildcard subdomains as well as a correctly configured Apache server.</p>
+
+<p>LifeType is licensed under the <a href="http://www.fsf.org/licensing/licenses/gpl.html">GNU General Public License</a>.</p>
+"""
+
+Development = """
+
+<div class="toc">
+<span class="toc-title">Development</span>
+<ul>
+<li><a href="#documentation">Documentation</a></li>
+<li><a href="#joining_the_team">Joining the team</a></li>
+<li><a href="#beta_releases">Beta releases</a></li>
+<li><a href="#subversion_repository">Subversion repository</a></li>
+<li><a href="#keeping_in_touch">Keeping in touch</a></li>
+</ul>
+</div>
+
+
+
+<h2>Documentation</h2>
+<a name="documentation"></a>
+<p>
+The LifeType API is available for developers at <a href="http://www.lifetype.net/api/">http://www.lifetype.net/api</a>. This
+documentation was generated by <a href="http://www.doxygen.org">Doxygen</a> based on the comments in the code by the
+developers. The documentation is organized in packages in which classes that share a certain functionality are grouped.
+The class documentation is also cross-referenced with the actual PHP code.
+</p>
+
+<h2>Joining the Team</h2>
+<a name="joining_the_team"></a>
+<p>
+For those users wishing to help the project grow, you may want to contribute with some of your time.
+There is no need to be a developer or an HTML expert, there are lots of other ways to contribute
+to the LifeType project! We need translators, artists, designers, people lending a hand in the forums and
+of course, developers. If you think you can help, please drop us a line at
+<a href="mailto:contact at lifetype.net">contact_AT_LifeType.net</a> or in the forums. If you want to join
+the team as a developer and don't know where to start, take a look at the
+<a href="http://www.lifetype.net/api/">API documentation</a> and at our
+<a href="http://bugs.lifetype.net">bug-tracking system</a> (<a href="http://www.lifetype.net/blog.php/lifetype-development-journal/page/support#bug_tracker">more...</a>)
+</p>
+
+<h2>Beta releases</h2>
+<a name="beta_releases"></a>
+<p>
+Beta versions of LifeType are released on a per-needed basis, usually in the last steps of a new release.
+</p>
+<p>
+Users interested in running the latest development version of LifeType can also download and update the code from
+the <a href="#subversion_repository">Subversion repository</a>.
+</p>
+
+<h2>The Subversion repository</h2>
+<a name="subversion_repository"></a>
+<h4>Getting a client</h4>
+<p>
+The LifeType project uses <a href="http://subversion.tigris.org/">Subversion</a> as its source control system.
+Subversion is a free version control system and there are clients available for the most common platforms. In Linux and
+Mac OS X and the BSD systems, it is possible to install the default command line client <b>svn</b>. Please check the
+packages of your distribution for Linux, Fink for OS X and the ports for the BSD systems. For Windows users,
+<a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a> is a good choice.
+</p>
+
+<h4>Structure of the repository</h4>
+<p>
+The repository is organized in the following different modules:
+<b>plog</b><sup>1</sup>, <b>plugins</b> and <b>templates</b>. All these modules follow the same structure:
+</p>
+
+<pre>
+plog/
+plog/
+branches/
+tags/
+trunk/
+plugins/
+branches/
+tags/
+trunk/
+templates/
+branches/
+tags/
+trunk/
+</pre>
+
+<ul>
+<li><b>trunk</b>: is the main folder and it will usually contain the most recent version of the data.</li>
+<li><b>branches</b>: contains any code that was branched from the main trunk. Beta versions and maintenance releases are
+usually developed as <i>branches</i>.</li>
+<li><b>tags</b> Whenever a new release is made, a new tag will be created in this folder.
+A <i>tag</i> is a snapshot of the repository at a certain point in time. This allows to easily retrieve previous versions of
+LifeType</li>
+</ul>
+
+<h4>Checking out and updating the code</h4>
+<p>
+The following command will checkout the code from the trunk/ folder:
+</p>
+<pre>
+svn checkout http://devel.lifetype.net/svn/plog/plog/trunk
+</pre>
+
+<p>If you wish to check out a certain branch or tag, replace /trunk with /branch/branch-name or /tags/tag-name:</p>
+<pre>
+svn checkout http://devel.lifetype.net/svn/plog/plog/tags/lifetype-1.1.2
+</pre>
+
+
+<p>In order to update your local copy of the repository, run the following command in the same folder where the
+code was checked for the first time:</p>
+<pre>
+svn update
+</pre>
+
+<p>
+Please see <a href="http://wiki.lifetype.net/index.php/Subversion_Repository">the wiki page on Subversion</a> for more
+information.
+</p>
+
+<h2>Keeping in Touch</h2>
+<a name="keeping_in_touch"></a>
+<p>
+The best way to keep in touch with the developer is to join the project <a href="http://www.lifetype.net/blog.php/lifetype-development-journal/page/support#mailing_lists">mailing lists</a>.
+If you are also interested in getting a message every time a change is made to the Subversion repository,
+it is highly recommended that you join the plog-svn mailing list.
+</p>
+<p>
+<sup>1</sup>LifeType was once called pLog, hence the word pLog is still around here and there. <a href="http://www.lifetype.net/blog.php/lifetype-development-journal/page/aboutus#lifetype_and_plog">Read why the project changed its name</a>.
+</p>"""
+
+
+Downloads = """
+<div class="toc">
+<span class="toc-title">Downloads</span>
+<ul>
+<li><a href="#lifetype_packages">LifeType Packages</a></li>
+<li><a href="#plugins">Plugins</a></li>
+<li><a href="#templates">Template Sets</a></li>
+<li><a href="#development_versions">Development Versions</a></li>
+<li><a href="#others">Other Downloads</a></li>
+</ul>
+</div>
+
+<h2>LifeType Packages</h2>
+<a name="lifetype_packages"></a>
+
+<p>
+These are the official downloadable packages containing the most recent stable version. Packages
+are available compressed in either .tar.gz or .zip, and are provided via SourceForge.net.
+<br/><br/>
+<a href="http://prdownloads.sourceforge.net/lifetype/lifetype-1.1.2.tar.gz?download">LifeType 1.1.2 (tar.gz format)</a><br/>
+<a href="http://prdownloads.sourceforge.net/lifetype/lifetype-1.1.2.tar.bz2?download">LifeType 1.1.2 (tar.bz2 format)</a><br/>
+<a href="http://prdownloads.sourceforge.net/lifetype/lifetype-1.1.2.zip?download">LifeType 1.1.2 (zip format)</a><br/>
+</p>
+
+<h2>Plugins</h2>
+<a name="plugins"></a>
+
+<p>Please visit the <a href="http://wiki.lifetype.net/index.php/Plugins">plugins overview</a> in the wiki. All available plugins are documented and downloadable there.
+
+<h2>Template Sets</h2>
+<a name="templates"></a>
+
+<p>While we maintain a <a href="http://wiki.lifetype.net/index.php/Templates">template overview</a> in the wiki, you may find other sources for LifeType templates or like to <a href="http://wiki.lifetype.net/index.php/Category:Template_Development">design your own</a>.</p>
+
+<h2>Development Versions</h2>
+<a name="development_versions"></a>
+<p>
+The current development version is <b>LifeType 1.2</b>. To take the current development version for a spin you may get one of the <a href="http://lifetype.net/snapshots/">daily snapshots</a> or check out the code via our <a href="http://www.lifetype.net/blog.php/lifetype-development-journal/page/development#subversion_repository">Subversion repository</a>. Keep in mind, that the development version is not ment for use in production and any snapshot may or may not work out of the box.
+</p>
+
+
+<h2>Other Downloads</h2>
+<a name="others"></a>
+
+<p>
+Spread the word! Spread LifeType! <img src="http://www.lifetype.net/blog.php/lifetype-development-journal/resource/lifetype_comms_kit/lifetype.png" alt="LifeType" /><br/>
+This is a list of promotional buttons, grafics, presentations etc. Please feel free to use them to promote LifeType on your Website or in your presentations:</p>
+<ul>
+<li><a href="http://www.lifetype.net/resserver.php?blogId=1&amp;resource=lt_buttons.zip">LifeType Buttons</a></li>
+<li><a href="http://www.lifetype.net/previews/1.1/lt-1.1-preview.htm">Flash demo of some of the features in 1.1 and above</a></li>
+</ul>
+"""
+
+
+
+Support = """
+<div class="toc">
+<span class="toc-title">Support</span>
+<ul>
+<li><a href="#faq">Frequently Asked Questions</a></li>
+<li><a href="#forums">Forums</a></li>
+<li><a href="#wiki">Wiki</a></li>
+<li><a href="#bug_tracker">Bug-tracker</a></li>
+<li><a href="#mailing_lists">Mailing Lists</a></li>
+</ul>
+</div>
+
+<h2>Frequently Asked Questions</h2>
+<a name="faq"></a>
+<p>
+There is a list with the most frequently asked questions
+<a href="http://wiki.lifetype.net/index.php/FAQ">available in the wiki</a>. Please check if your problem
+has already been answered there, it will save us time if we don't have to answer the same question over
+and over again.
+</p>
+<ol>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#.27When_trying_to_run_the_wizard_during_installation.2C_it_doesn.27t_work_and_I_get_lots_of_messages_like_.22fopen.28..2Ftmp.2F3f4c7de95a680.29:_failed_to_open_stream:_Permission_denied.22.2C_.22Smarty_error:_problem_writing_temporary_file_.27..2Ftmp.2F3f4c7de95a680.27.22_or_.22touch.28.29:_Unable_to_create_file_..2Ftmp.2Fwizard.5Eintro.template_because_Permission_denied.22._What_can_I_do.3F">When trying to run the wizard during installation, it doesn't work and I get lots of messages like "fopen(./tmp/3f4c7de95a680): failed to open stream: Permission denied", "Smarty error: problem writing temporary file './tmp/3f4c7de95a680'" or "touch(): Unable to create file ./tmp/wizard^intro.template because Permission denied". What can I do?</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#How_can_I_recover_my_password.3F">How can I recover my password?</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#I_can.27t_see_the_icons_in_the_visual_HTML_editor_after_installing.21">I can't see the icons in the visual HTML editor after installing!</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#How_can_users_register_a_Blog_on_my_System.3F">How can users register a Blog on my System?</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#Why_can.27t_I_add_new_template_files.3F">Why can't I add new template files?</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#I_get_.22There_was_no_resource_file_uploaded.22_when_adding_a_new_resource">I get "There was no resource file uploaded" when adding a new resource</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#I_cannot_see_the_graphical_editor_of_posts_even_though_I_have_set__.22Enable_WYSIWYG_edition_of_texts.22__to_yes_in_my_blog_settings">I cannot see the graphical editor of posts even though I have set _"Enable WYSIWYG edition of texts"_ to yes in my blog settings</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#When_I_try_to_add_a_link_using_the_graphical_editor_of_posts_by_clicking_the_button_with_the_anchor_icon.2C_I_get_a_pop-up_window_asking_me_for_a_URL_but_then_nothing_is_added_to_the_text.">When I try to add a link using the graphical editor of posts by clicking the button with the anchor icon, I get a pop-up window asking me for a URL but then nothing is added to the text.</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#The_wizard_throws_the_following_error_when_I_move_to_step_number_two">The wizard throws the following error when I move to step number two</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#How_can_I_use_.22https:.2F.2F.22_URLs_with_pLog.3F">How can I use "https://" URLs with pLog?</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#Locales_with_access_do_not_work">Locales with access do not work</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#How_can_I_configure_.22Search_Engine_friendly.22_URLs.3F">How can I configure "Search Engine friendly" URLs?</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#Where_is_the_administration_panel.3F">Where is the administration panel?</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#No_thumbnail_is_generated_at_all_when_uploading_GIF_files.21">No thumbnail is generated at all when uploading GIF files!</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#After_installing_pLog_in_my_RH9.2FFedora_Core_server_the_texts_are_all_messed_up.21">After installing pLog in my RH9/Fedora Core server the texts are all messed up!</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#How_do_I_set_summary.php_as_the_front_page_of_my_site.3F">How do I set summary.php as the front page of my site?</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#My_PHP_is_running_out_of_memory.2FI_can.27t_see_anything_in_my_pages">My PHP is running out of memory/I can't see anything in my pages</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#I_am_getting_an_allowed_memory_size_of_XXX_bytes_exhausted_error">I am getting an allowed memory size of XXX bytes exhausted error</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#When_subdomains_are_enabled.2C_www.mysite.com_says_that_the_blog_doesn.27t_exist.21">When subdomains are enabled, www.mysite.com says that the blog doesn't exist!</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#How_Can_I_display_my_pLog_blog_in_non-pLog_pages.3F">How Can I display my pLog blog in non-pLog pages?</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#How_do_I_configure_support_for_subdomains.3F">How do I configure support for subdomains?</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#How_do_I_configure_custom_URLs.3F">How do I configure custom URLs?</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#I_am_using_subdomains.2C_can_I_remove_.2Fblog.2F_from_URLs.3F">I am using subdomains, can I remove /blog/ from URLs?</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#I_am_getting_an_error_in_file_XXX_line_YYY_right_after_installation.2C_why_do_you_guys_have_broken_code.3F">I am getting an error in file XXX line YYY right after installation, why do you guys have broken code?</a></li>
+<li><a href="http://wiki.lifetype.net/index.php/FAQ#Tables_don.27t_exist_on_Fresh_Install">Tables don't exist on Fresh Install</a></li>
+</ol>
+
+<h2>Forums</h2>
+<a name="forums"></a>
+<p>
+Most of the support in the LifeType project is handled via the forums avaliable at
+<a href="http://forums.lifetype.net">forums.lifetype.net</a>.</p>
+
+<h2>Wiki</h2>
+<a name="wiki"></a>
+<p>
+The documentation of the project is maintained in the <a href="http://wiki.lifetype.net">project wiki</a>.
+</p>
+
+<h2>Bug-tracker</h2>
+<a name="bug_tracker"></a>
+<p>
+Should you find any bug in a stable or development release of LifeType, please help the project
+by reporting it via the project's <a href="http://bugs.lifetype.net">bug tracking system</a>.
+</p>
+
+<h2>Mailing Lists</h2>
+<a name="mailing_lists"></a>
+<p>
+Mailing lists are the preferred way to communicate with the developers, although they should not
+be used for support questions but insted, to discuss other aspects of the project such as new
+ideas, development issues and so on. Currently there are two public mailing lists available
+to everyone:
+</p>
+<ul>
+<li><a href="http://devel.lifetype.net/mailman/listinfo/plog-general">plog-general</a></li>
+<li><a href="http://devel.lifetype.net/mailman/listinfo/plog-svn">plog-svn</a></li>
+</ul>
+<p>
+Click the links above to sign up for any of them, follow the instructions and don't forget to
+reply to the confirmation mail necessary to finish the registration process.
+</p>
+
+<h2>Additional Resources</h2>
+<p>
+These are additional links related to installing and configuring certain features of LifeType:<br/><br/>
+<a href="http://www.php.net/manual/en/install.php">Installing and configuring PHP</a>.<br/>
+<a href="http://steinsoft.net/index.php?site=Programming/Articles/apachewildcarddomain">Configuring DNS and Apache to support subdomains</a>.<br/>
+<a href="http://httpd.apache.org/docs/1.3/mod/mod_mime.html#forcetype">Apache documentation on ForceType</a>.<br/>
+</p>
+"""
+
+AboutUs = """
+
+<div class="toc">
+<span class="toc-title">Support</span>
+<ul>
+<li><a href="#project_statement">Project Statement</a></li>
+<li><a href="#history">History</a></li>
+<li><a href="#lifetype_and_plog">Relationship between LifeType and pLog</a></li>
+<li><a href="#project_members">Project Members</a></li>
+<li><a href="#contributors">Contributors</a></li>
+<li><a href="#sponsors">Sponsors</a></li>
+<li><a href="#contact_us">Contact Us</a></li>
+</ul>
+</div>
+
+<h4>Project Statement</h4>
+<a name="project_statement"></a>
+<p>
+The goal of the LifeType project is to create a stable multi-user and multi-blogging platform, to strengthen
+the concept of communities around blogs.
+</p>
+
+<h4>History</h4>
+<a name="history"></a>
+<p>
+The LifeType project started in February 2003 when its leader, Oscar Renalias, needed a set of dynamic
+scripts for his personal web page. Even though he did not know about the idea of weblogs back then,
+the outcome of the first iteration of the project already resembled one. A few weeks later Francesc,
+another one of the founding members, suggested that developing a blog with support for multiple users
+and blogs could be a better idea, and so pLog 0.1 was released on the 2nd of September 2003 featuring
+most of the features that are still part of the core features nowadays: multi-user and multi-blog from
+the ground up, template engine, localizable and extensible via plugins.
+</p>
+<p>
+pLog 0.2 was released on the 9th of November, sporting new search engine-friendly URLS, speed
+improvements, a better plugin interface and changes in the administration interface. At this point is
+where pLog started to gather some interest from the community and when pLog 0.3 was released later on
+March 2004, it was warmly received by the community: it still is the most downloaded pLog/LifeType release
+ever. pLog 0.3 introduced the concept of "resources" and the integration of media files with
+articles, time differences, an integrated RSS parser and a Bayesian anti spam filter.
+</p>
+<p>
+LifeType 1.0 was released in April 2005, with LifeType 1.0.6 being the last maintenance release of the 1.0.x
+branch in June 2006. LifeType 1.0 has so far been the most successful LifeType release ever, although it is still
+early to say how well LifeType 1.1.x will do.
+</p>
+<p>
+The most recent version of LifeType is 1.1.2, which is the second maintenance release the 1.1.x stable branch. LifeType 1.1 was the first major release since April 2005
+and includes a major set of new features and improvements specially in the performance and memory
+consumption areas.
+</p>
+
+<h4>Relationship between LifeType and pLog</h4>
+<a name="lifetype_and_plog"></a>
+<p>
+Amazon.com has been holding the "plog" trademark much longer than the project has been around, so the
+project was kindly asked to change its name.
+</p>
+<p>
+On behalf of the LifeType project, we would like to thank
+the attitude of Amazon.com towards the LifeType project. Where others would have decided to sue an
+open source project, Amazon.com decided to work together with us so that we could
+find a solution that would suit all of us. And this is how the pLog project became the
+LifeType project.
+</p>
+
+<h4>Project Members</h4>
+<a name="project_members"></a>
+
+<ul>
+<li><a href="http://www.renalias.net">Oscar Renalias</a>: Lead developer and founding developer.</li>
+<li><a href="http://www.francesc.net">Francesc Pla</a>: Main project advisor and project co-founder.</li>
+<li><a href="http://blog.markplace.net/">Mark Wu</a>: Lead co-developer, expert in encoding
+and localization issues and current maintainer of the LifeType site for the <a href="http://wwww.lifetype.org.tw">Chinese-speaking
+community</a>.</li>
+<li><a href="http://jon.limedaley.com/plog/">Jon Daley</a>: Developer and main helping
+hand in the forums and bug-tracking system.</li>
+<li><a href="http://www.lifetype.de">Michael Erdmann</a>: Responsible for marketing and promotion
+activities mainly in the European area and responsible for the<br /> <a href="http://www.lifetype.de">LifeType.de</a>
+site for German users.</li>
+<li><a href="http://hugi.to/blog/">Reto Hugi</a>: Developer and responsible for marketing and promotion in Switzerland.</li>
+</ul>
+
+
+<h4>Contributors</h4>
+<a name="contributors"></a>
+<ul>
+<li><a href="http://ork.orkland.de/">Benjamin Krause</a>: developer behind the
+speed improvements during the 1.0 and 1.1 series.</li>
+<li><a href="http://www.paulstimesink.com/">Paul Westbrook</a>: Author of some of the most popular plugins (e.g. ValidateTrackback, Akismet, sociable etc.)</li>
+<li><a href="http://linux.bloghome.cn/">Su Baochen</a></li>
+<li><a href="http://www.bliang.com/.site/show/page/archive">Bradley Liang</a></li>
+<li><a href="http://www.wumingxiaoxia.com/">Allan Sun</a></li>
+</ul>
+
+<h4>Partners Sponsors</h4>
+<a name="sponsors"></a>
+<p>
+Current hosting services of all LifeType.net sites is provided by Ferca.<br/>
+<a href="http://www.ferca.com" style="border:0px">
+<img src="http://www.lifetype.net/templates/LifeType/images/partner_ferca.jpg" alt="Ferca" />
+</a>
+</p>
+<p>
+qDevel has the greatest LifeType-related knowledge, with some of its employees being
+current or former members of the LifeType projects. Please get in touch with them if you need
+any consulting services related to LifeType.
+<br/>
+<br/>
+<a href="http://www.qdevel.com" style="border:0px">
+<img src="http://www.lifetype.net/templates/LifeType/images/partner_qdevel.jpg" alt="qDevel" />
+</a>
+</p>
+
+<h4>Contact Us</h4>
+<a name="contact_us"></a>
+Please contact us at any of the email addresses below should you have any more questions
+related to the project:
+<ul>
+<li>General enquiries: <a href="mailto:contact at lifetype.net">contact at lifetype.net</a></li>
+<li>Marketing, press &amp; interviews: <a href="mailto:press at lifetype.net">press at lifetype.net</a></li>
+<li>German enquiries: <a href="mailto:de at lifetype.net">de at lifetype.net</a></li>
+<li>Taiwan enquiries: <a href="mailto:tw at lifetype.net">tw at lifetype.net</a></li>
+</ul>
 """
\ No newline at end of file

Modified: plog/trunk/templates/admin/dashboard.template
===================================================================
--- plog/trunk/templates/admin/dashboard.template	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/templates/admin/dashboard.template	2006-12-06 17:41:38 UTC (rev 4381)
@@ -79,6 +79,7 @@
                             <td>
                                 <div class="list_action_button">
                                 <a href="?op=blogSelect&amp;blogId={$blog->getId()}&amp;action=deleteComment&amp;commentId={$comment->getId()}&amp;articleId={$article->getId()}"><img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" /></a>
+								{if $bayesian_filter_enabled}
                                 {if $comment->getStatus() == 0}
                                     <a href="?op=blogSelect&amp;blogId={$blog->getId()}&amp;action=markComment&amp;mode=1&amp;articleId={$comment->getArticleId()}&amp;commentId={$comment->getId()}">
                                      <img src="imgs/admin/icon_spam-16.png" alt="{$locale->tr("mark_as_spam")}" />
@@ -88,6 +89,7 @@
                                      <img src="imgs/admin/icon_nospam-16.png" alt="{$locale->tr("mark_as_no_spam")}" />
                                     </a>
                                 {/if}
+								{/if}
                                 {if $comment->getUserUrl()}
                                   <a href="{$comment->getUserUrl()}">
                                    <img src="imgs/admin/icon_url-16.png" alt="{$locale->tr("url")}" />
@@ -130,6 +132,7 @@
                             <td>
                                 <div class="list_action_button">
                                  <a href="?op=blogSelect&amp;blogId={$blog->getId()}&amp;action=deleteTrackback&amp;articleId={$article->getId()}&amp;trackbackId={$trackback->getId()}"><img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete_trackback")}" /></a>
+								{if $bayesian_filter_enabled}
                                   {if $trackback->getStatus() == 0}
                                     <a href="?op=blogSelect&amp;blogId={$blog->getId()}&amp;action=markTrackback&amp;mode=1&amp;articleId={$trackback->getArticleId()}&amp;trackbackId={$trackback->getId()}">
                                      <img src="imgs/admin/icon_spam-16.png" alt="{$locale->tr("mark_as_spam")}" />
@@ -139,6 +142,7 @@
                                      <img src="imgs/admin/icon_nospam-16.png" alt="{$locale->tr("mark_as_no_spam")}" />
                                     </a>
                                   {/if}
+								{/if}
                                   {if $trackback->getUserUrl()}
                                     <a href="{$trackback->getUserUrl()}">
                                      <img src="imgs/admin/icon_url-16.png" alt="{$locale->tr("url")}" />

Modified: plog/trunk/templates/admin/editcomments.template
===================================================================
--- plog/trunk/templates/admin/editcomments.template	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/templates/admin/editcomments.template	2006-12-06 17:41:38 UTC (rev 4381)
@@ -102,14 +102,16 @@
                             <a href="?op=deleteComment&amp;commentId={$comment->getId()}&amp;articleId={if $post}{$post->getId()}{else}0{/if}" title="{$locale->tr("delete")}">
                             	<img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" />
                             </a>
-							{if $comment->getStatus() == 0}
-							    <a href="?op=markComment&amp;mode=1&amp;articleId={if $post}{$comment->getArticleId()}{else}0{/if}&amp;commentId={$comment->getId()}" title="{$locale->tr("mark_as_spam")}">
-								 <img src="imgs/admin/icon_spam-16.png" alt="{$locale->tr("mark_as_spam")}" />
-								</a>
-							{elseif $comment->getStatus() == 1}
-								<a href="?op=markComment&amp;mode=0&amp;articleId={if $post}{$comment->getArticleId()}{else}0{/if}&amp;commentId={$comment->getId()}" title="{$locale->tr("mark_as_no_spam")}">
-								 <img src="imgs/admin/icon_nospam-16.png" alt="{$locale->tr("mark_as_no_spam")}" />
-								</a>
+							{if $bayesian_filter_enabled}
+								{if $comment->getStatus() == 0}
+								    <a href="?op=markComment&amp;mode=1&amp;articleId={if $post}{$comment->getArticleId()}{else}0{/if}&amp;commentId={$comment->getId()}" title="{$locale->tr("mark_as_spam")}">
+									 <img src="imgs/admin/icon_spam-16.png" alt="{$locale->tr("mark_as_spam")}" />
+									</a>
+								{elseif $comment->getStatus() == 1}
+									<a href="?op=markComment&amp;mode=0&amp;articleId={if $post}{$comment->getArticleId()}{else}0{/if}&amp;commentId={$comment->getId()}" title="{$locale->tr("mark_as_no_spam")}">
+									 <img src="imgs/admin/icon_nospam-16.png" alt="{$locale->tr("mark_as_no_spam")}" />
+									</a>
+								{/if}
 							{/if}
 							{/check_perms}
 							{if $comment->getUserUrl()}
@@ -140,7 +142,7 @@
 		            <select name="commentStatus" id="commentStatus">
 		              <option value="-1">-{$locale->tr("select")}-</option>
 		              {foreach from=$commentstatusWithoutAll key=name item=status}
-		                <option value="{$status}">{$locale->tr($name)}</option>
+						{if ($status != 0 && $status != 1) || $bayesian_filter_enabled}<option value="{$status}">{$locale->tr($name)}</option>{/if}
 		              {/foreach}
 		            </select>
 		            <input type="button" name="changeCommentsStatus" value="{$locale->tr("change_status")}" class="submit" onClick="javascript:submitCommentsList('changeCommentsStatus');" /> 

Modified: plog/trunk/templates/admin/edittrackbacks.template
===================================================================
--- plog/trunk/templates/admin/edittrackbacks.template	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/templates/admin/edittrackbacks.template	2006-12-06 17:41:38 UTC (rev 4381)
@@ -97,14 +97,16 @@
                              <a href="?op=deleteTrackback&amp;articleId={if $post}{$post->getId()}{else}0{/if}&amp;trackbackId={$trackback->getId()}" title="{$locale->tr("delete_trackback")}">
                              	<img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete_trackback")}" />
                              </a>
-							{if $trackback->getStatus() == 0}
-							    <a href="?op=markTrackback&amp;mode=1&amp;articleId={if $post}{$post->getId()}{else}0{/if}&amp;trackbackId={$trackback->getId()}" title="{$locale->tr("mark_as_spam")}">
-								 <img src="imgs/admin/icon_spam-16.png" alt="{$locale->tr("mark_as_spam")}" />
-								</a>
-							{elseif $trackback->getStatus() == 1}
-								<a href="?op=markTrackback&amp;mode=0&amp;articleId={if $post}{$post->getId()}{else}0{/if}&amp;trackbackId={$trackback->getId()}" title="{$locale->tr("mark_as_no_spam")}">
-								 <img src="imgs/admin/icon_nospam-16.png" alt="{$locale->tr("mark_as_no_spam")}" />
-								</a>
+							{if $bayesian_filter_enabled}
+								{if $trackback->getStatus() == 0}
+								    <a href="?op=markTrackback&amp;mode=1&amp;articleId={if $post}{$post->getId()}{else}0{/if}&amp;trackbackId={$trackback->getId()}" title="{$locale->tr("mark_as_spam")}">
+									 <img src="imgs/admin/icon_spam-16.png" alt="{$locale->tr("mark_as_spam")}" />
+									</a>
+								{elseif $trackback->getStatus() == 1}
+									<a href="?op=markTrackback&amp;mode=0&amp;articleId={if $post}{$post->getId()}{else}0{/if}&amp;trackbackId={$trackback->getId()}" title="{$locale->tr("mark_as_no_spam")}">
+									 <img src="imgs/admin/icon_nospam-16.png" alt="{$locale->tr("mark_as_no_spam")}" />
+									</a>
+								{/if}
 							{/if}
 							{/check_perms}
                             {if $trackback->getUserUrl()}
@@ -135,7 +137,7 @@
 		            <select name="trackbackStatus" id="trackbackStatus">
 		              <option value="-1">-{$locale->tr("select")}-</option>
 		              {foreach from=$commentstatusWithoutAll key=name item=status}
-		                <option value="{$status}">{$locale->tr($name)}</option>
+		                {if ($status != 0 && $status != 1) || $bayesian_filter_enabled}<option value="{$status}">{$locale->tr($name)}</option>{/if}
 		              {/foreach}
 		            </select>
 		            <input type="button" name="changeTrackbacksStatus" value="{$locale->tr("change_status")}" class="submit" onClick="javascript:submitTrackbacksList('changeTrackbacksStatus');" /> 

Modified: plog/trunk/templates/admin/newpost.template
===================================================================
--- plog/trunk/templates/admin/newpost.template	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/templates/admin/newpost.template	2006-12-06 17:41:38 UTC (rev 4381)
@@ -199,15 +199,15 @@
 		 {/if}
       </div>
 
+	  <!-- checkbox custom fields -->
+	   {include file="$admintemplatepath/newpost_customfields.template" type=3 fields=$customfields}
+
       <div class="field">
        	<br /><label for="bookmarklet">{$locale->tr("bookmarklet")}</label>
        	<div class="formHelp">{$locale->tr("bookmarklet_help")}</div>
 		<a href="javascript:bm=document.selection?document.selection.createRange().text:document.getSelection();void(plogbm=window.open('{$url->getAdminUrl()}?op=newPost&sendTrackbacks=1&postText='+encodeURIComponent('&lt;p&gt;'+bm+' ... '+'&lt;a href=&quot;'+window.location.href+'&quot;&gt;'+'{$locale->tr("original_post")}'+'&lt;/a&gt;&lt;/p&gt;'),'plogbm','toolbar=1,status=1,location=1,scrollbars=1,menubar=1,resizable=1'))" onclick="window.alert('{$locale->tr("bookmarklet_help")}');">{$locale->tr("blogit_to_lifetype")}</a> 
       </div>
 	  
-	  <!-- checkbox custom fields -->
-	   {include file="$admintemplatepath/newpost_customfields.template" type=3 fields=$customfields}	  
-	  
 	</div>
 	</fieldset>
     <div class="buttons">

Modified: plog/trunk/templates/summary/registerstep2.template
===================================================================
--- plog/trunk/templates/summary/registerstep2.template	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/templates/summary/registerstep2.template	2006-12-06 17:41:38 UTC (rev 4381)
@@ -57,10 +57,6 @@
   </fieldset>
   <div class="buttons">
     <input type="submit" name="{$locale->tr("register_next")}" value="{$locale->tr("register_next")} &raquo;"/>
-    <input type="hidden" name="userName" value="{$userName}"/>
-    <input type="hidden" name="userFullName" value="{$userFullName}"/>
-    <input type="hidden" name="userPassword" value="{$userPassword}"/>
-    <input type="hidden" name="userEmail" value="{$userEmail}"/>
   </div>  
  </form>
 {include file="summary/footer.template"}

Modified: plog/trunk/templates/summary/registerstep3.template
===================================================================
--- plog/trunk/templates/summary/registerstep3.template	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/templates/summary/registerstep3.template	2006-12-06 17:41:38 UTC (rev 4381)
@@ -28,14 +28,6 @@
   </fieldset>  
   <div class="buttons">
     <input type="submit" name="{$locale->tr("register_next")}" value="{$locale->tr("register_next")} &raquo;"/>
-    <input type="hidden" name="userName" value="{$userName}"/>
-    <input type="hidden" name="blogDomain" value="{$blogDomain}"/>
-    <input type="hidden" name="userFullName" value="{$userFullName}"/>
-    <input type="hidden" name="userPassword" value="{$userPassword}"/>
-    <input type="hidden" name="userEmail" value="{$userEmail}"/>
-    <input type="hidden" name="blogName" value="{$blogName}"/>
-    <input type="hidden" name="blogCategoryId" value="{$blogCategoryId}"/>
-    <input type="hidden" name="blogLocale" value="{$blogLocale}"/>
   </div>  
  </form>
 {include file="summary/footer.template"}

Modified: plog/trunk/templates/summary/registerstep4.template
===================================================================
--- plog/trunk/templates/summary/registerstep4.template	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/templates/summary/registerstep4.template	2006-12-06 17:41:38 UTC (rev 4381)
@@ -45,16 +45,6 @@
   <div class="buttons">
    <input type="submit" name="done" value="{$locale->tr("create")}" />
   </div>
-
-   <input type="hidden" name="userName" value="{$userName}"/>
-   <input type="hidden" name="blogDomain" value="{$blogDomain}"/>
-   <input type="hidden" name="userFullName" value="{$userFullName}"/>
-   <input type="hidden" name="userPassword" value="{$userPassword}"/>
-   <input type="hidden" name="userEmail" value="{$userEmail}"/>
-   <input type="hidden" name="blogName" value="{$blogName}"/>
-   <input type="hidden" name="blogCategoryId" value="{$blogCategoryId}"/>
-   <input type="hidden" name="blogLocale" value="{$blogLocale}"/>
-   <input type="hidden" name="templateId" value="{$templateId}"/>
  </form> 
 
 </div>

Copied: plog/trunk/tools/.htaccess (from rev 4380, plog/tags/lifetype-1.1.3/tools/.htaccess)

Modified: plog/trunk/tools/generateData.php
===================================================================
--- plog/trunk/tools/generateData.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/tools/generateData.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -4,17 +4,19 @@
     define( "PLOG_CLASS_PATH", dirname(__FILE__)."/");
 }
 
-include_once( PLOG_CLASS_PATH."class/config/configfilestorage.class.php" );
-include_once( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );
-include_once( PLOG_CLASS_PATH."class/dao/users.class.php" );
-include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
-include_once( PLOG_CLASS_PATH."class/dao/bloginfo.class.php" );
-include_once( PLOG_CLASS_PATH."class/dao/blogsettings.class.php" );
-include_once( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
-include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );
-include_once( PLOG_CLASS_PATH."class/dao/article.class.php" );
-include_once( PLOG_CLASS_PATH."class/dao/articlecomments.class.php" );
-include_once( PLOG_CLASS_PATH."class/dao/usercomment.class.php" );
+lt_include( PLOG_CLASS_PATH."class/config/configfilestorage.class.php" );
+lt_include( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );
+lt_include( PLOG_CLASS_PATH."class/dao/users.class.php" );
+lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
+lt_include( PLOG_CLASS_PATH."class/dao/bloginfo.class.php" );
+lt_include( PLOG_CLASS_PATH."class/dao/blogsettings.class.php" );
+lt_include( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
+lt_include( PLOG_CLASS_PATH."class/dao/articles.class.php" );
+lt_include( PLOG_CLASS_PATH."class/dao/article.class.php" );
+lt_include( PLOG_CLASS_PATH."class/dao/articlecomments.class.php" );
+lt_include( PLOG_CLASS_PATH."class/dao/usercomment.class.php" );
+include_once( PLOG_CLASS_PATH."class/dao/trackbacks.class.php" );
+include_once( PLOG_CLASS_PATH."class/dao/trackback.class.php" );
 
 // check whether we're being run from the command line
 $commandLine = is_array( $argv );
@@ -30,7 +32,8 @@
                   "numCategoriesPerBlog" => 10,
                   "numCategoriesPerPost" => 3,
                   "numUsersPerBlog" => 2,
-                  "numCommentsPerArticle" => 10 );
+                  "numCommentsPerArticle" => 10,
+                  "numTrackbacksPerArticle" => 10);
 
 // to keep track of users
 $userPool = Array();
@@ -200,7 +203,27 @@
                 $userComments->addComment( $userComment );
                 $l++;
             }
-
+            
+            // add the trackbakcs per article
+            $m = 0;
+            $trackbacksPerArticle = rand(1,$params["numTrackbacksPerArticle"] );
+            $tb = new Trackbacks();
+            while( $m < $trackbacksPerArticle ) {
+                $url = 'http://www.'.generateRandomWord(10).'.com/'.generateRandomWord(4).'/'.generateRandomWord(15).'.html';
+                $articleTrackback = new Trackback ( 
+                                                $url, // url
+                                                generateRandomWords(rand(1,3)), // title
+                                                $article->getId(),   // art id
+                                                $blog->getId(), // blog id
+                                                generateRandomParagraph(), //excerpt
+                                                generateRandomWords(rand(1,2)), // blog name
+                                                generateRandomDate(), // date
+                                                '127.0.0.1' // client ip
+                                                ); 
+                $tb->addTrackback( $articleTrackback );
+                $m++;
+            }
+             
             $k++;
         }
 	print("Blog $i added {$nl}");

Modified: plog/trunk/tools/genloadtestdata.php
===================================================================
--- plog/trunk/tools/genloadtestdata.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/tools/genloadtestdata.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -3,12 +3,12 @@
     /**
      * number of requests to perform
      */
-    define( "NUM_REQUESTS", 10 );
+    define( "NUM_REQUESTS", 25 );
     
     /**
      * base url for these tests
      */
-    define( "BASE_URL", "http://devel.lifetype.net/" );
+    define( "BASE_URL", "http://localhost/trunk/" );
 
 	/**
 	 * proportion of GET requests
@@ -149,4 +149,4 @@
     }
     return $text;
 }
-?>
\ No newline at end of file
+?>

Modified: plog/trunk/trackback.php
===================================================================
--- plog/trunk/trackback.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/trackback.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -19,4 +19,4 @@
 	
 	lt_include( PLOG_CLASS_PATH."index.php" );
 
-?>
\ No newline at end of file
+?>

Modified: plog/trunk/updatedbschema.php
===================================================================
--- plog/trunk/updatedbschema.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/updatedbschema.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -9,9 +9,9 @@
     define( "PLOG_CLASS_PATH", dirname(__FILE__)."/");
 }
 
-include_once( PLOG_CLASS_PATH."class/database/db.class.php" );
-include_once( PLOG_CLASS_PATH."class/config/configfilestorage.class.php" );
-include_once( PLOG_CLASS_PATH."install/dbschemas.properties.php" );
+lt_include( PLOG_CLASS_PATH."class/database/db.class.php" );
+lt_include( PLOG_CLASS_PATH."class/config/configfilestorage.class.php" );
+lt_include( PLOG_CLASS_PATH."install/dbschemas.properties.php" );
 
 $config = new ConfigFileStorage();
 // open a connection to the database

Modified: plog/trunk/version.php
===================================================================
--- plog/trunk/version.php	2006-12-06 14:13:40 UTC (rev 4380)
+++ plog/trunk/version.php	2006-12-06 17:41:38 UTC (rev 4381)
@@ -1,3 +1,3 @@
 <?php
-$version = 'LIFETYPE_1_1_DEV';
+$version = 'LIFETYPE_1_2_DEV';
 ?>



More information about the pLog-svn mailing list