[pLog-svn] r4147 - in plugins/branches/lifetype-1.1: . shoutbox shoutbox/class shoutbox/class/action shoutbox/class/dao shoutbox/locale shoutbox/templates shoutbox/templates-sample shoutbox/templates-sample/standard

oscar at devel.lifetype.net oscar at devel.lifetype.net
Sat Oct 21 21:41:32 GMT 2006


Author: oscar
Date: 2006-10-21 21:41:32 +0000 (Sat, 21 Oct 2006)
New Revision: 4147

Added:
   plugins/branches/lifetype-1.1/shoutbox/
   plugins/branches/lifetype-1.1/shoutbox/README.txt
   plugins/branches/lifetype-1.1/shoutbox/class/
   plugins/branches/lifetype-1.1/shoutbox/class/action/
   plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxaction.class.php
   plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxconfigaction.class.php
   plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxdeleteshoutsaction.class.php
   plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxhistoryaction.class.php
   plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxnewshoutaction.class.php
   plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxquickdeleteaction.class.php
   plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxsetupaction.class.php
   plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxupdateconfigaction.class.php
   plugins/branches/lifetype-1.1/shoutbox/class/dao/
   plugins/branches/lifetype-1.1/shoutbox/class/dao/shoutbox.class.php
   plugins/branches/lifetype-1.1/shoutbox/class/dao/shoutboxInstaller.class.php
   plugins/branches/lifetype-1.1/shoutbox/locale/
   plugins/branches/lifetype-1.1/shoutbox/locale/locale_en_UK.php
   plugins/branches/lifetype-1.1/shoutbox/locale/locale_it_IT.php
   plugins/branches/lifetype-1.1/shoutbox/pluginshoutbox.class.php
   plugins/branches/lifetype-1.1/shoutbox/templates-sample/
   plugins/branches/lifetype-1.1/shoutbox/templates-sample/.htaccess
   plugins/branches/lifetype-1.1/shoutbox/templates-sample/standard/
   plugins/branches/lifetype-1.1/shoutbox/templates-sample/standard/footer.template
   plugins/branches/lifetype-1.1/shoutbox/templates-sample/standard/info.template
   plugins/branches/lifetype-1.1/shoutbox/templates-sample/standard/shoutbox.template
   plugins/branches/lifetype-1.1/shoutbox/templates-sample/standard/shoutbox_history.template
   plugins/branches/lifetype-1.1/shoutbox/templates/
   plugins/branches/lifetype-1.1/shoutbox/templates/shoutbox.template
   plugins/branches/lifetype-1.1/shoutbox/templates/shoutboxConfig.template
   plugins/branches/lifetype-1.1/shoutbox/templates/shoutbox_newshout.template
Log:
added an updated version of the shoutbox plugin


Added: plugins/branches/lifetype-1.1/shoutbox/README.txt
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/README.txt	2006-10-21 21:40:35 UTC (rev 4146)
+++ plugins/branches/lifetype-1.1/shoutbox/README.txt	2006-10-21 21:41:32 UTC (rev 4147)
@@ -0,0 +1,123 @@
+++++++++++++++++++++++++++++++++++++++++++++++++
+Readme for the "Shoutbox Plugin" 
+version 1.0a
+a plugin for LifeType (v1.1 and 1.0)
+Developed by Palantir, radar at netpalantir.it
+
+See the plugin in action at my blog:
+http://www.netpalantir.it
+
+This plugin is released under the terms of the LGPL
+
+++++++++++++++++++++++++++++++++++++++++++++++++
+Warning: Use at your own risk. It may work, but
+it may also kill your blog.  BACK   UP   FIRST!!
+++++++++++++++++++++++++++++++++++++++++++++++++
+
+WHAT IT IS
+A shoutbox is an object of your page that allows your visitors to leave a comment. It differs from the usual comments that users can leave, because shoutbox items are not bound to a post, rather they are visible in every page of the site.
+
+WHAT THE PACKAGE PROVIDES (features)
+ * It's a LifeType plugin, so it benefits from the LifeType archietecture and is completely integrated into the administration area
+ * Full control on the shoutbox in the admin area: browse through posts and delete any of them
+ * Nickname protection: you can set a password so no one ca use your nickname
+ * Internationalized
+ * NEW Email alerts with a link to immediately delete the post
+ * NEW Can be temporarily disabled
+ * NEW history: lets your users browse through all the past messages
+ * Customized parts of the 'standard' template so that the plugin can be used right away. Please see the template files in the templates-sample/ folder.
+
+
+HOW TO INSTALL (from scratch)
+=== A: admin side
+1. Unpack the archive
+2. Locate the installation directory of LifeType
+3. Copy the whole "shoutbox" directory into the plugins directory
+4. Change the permissions/ownership of all the files, according to your setup.
+   If you transfer files via FTP this should be unneccessary. All the files must 
+   be readable by the web server.
+5. Point your browser to your blog administration page, log in, click on: 
+   Control Center > Plugin center (lifetype 1.0) or Administration > Plugin center (lifetype 1.1). The shoutbox plugin should be on your list. If it is not, try updating the page a few times, it seems to help ;)
+6. Click on the Shoutbox tab on top of the plugin center section (lifetype 1.0) or    click on Control center > Shoutbox (lifetype 1.1)
+7. The first time you access it, the plugin should autodetect if any change has to
+   be done to the database and apply them, so to make it ready to use.
+8. *IMPORTANT* enter the configuration area, review the default settings, and SAVE
+
+=== B: user side
+First, integrate the plugin into the template.
+The easiest way is to modify the footer template to add the shoutbox on the right column. This procedure refers to the Standard theme, if you use your customized one, please make the according adjustments. On a multi-blog environment, you will need to customize each theme your bloggers have.
+
+1. Find the theme directory you are using. It's located in templates/
+2. Copy the following files into it, and customize them:
+   shoutbox.template
+   shotbox_history.template
+   info.template
+3. Open the footer template, find the place where the plugin needs to be placed, and include it. For example, change the standard footer template, so it looks like this:
+
+      ... (continues) ...
+      <li><a title="RSS 2.0" href="{$url->rssLink("rss20")}">RSS 2.0</a></li>
+      <li><a title="Atom" href="{$url->rssLink("rss20")}">Atom</a></li>
+      </ul>
+      </div>
+
+      <h2>{$locale->tr("Shoutbox")}</h2>
+        <div id="Shoutbox">
+          {include file="standard/shoutbox.template"}
+        </div>  
+      </div>
+      ... (continues) ...
+
+
+HOW TO USE IT
+After the first setup, customize the options at the bottom of the page. Then, 
+wait for people to leave messages. If you have enabled email notifications, 
+you will receive the shouts directly into your mailbox. You can delete shouts 
+from the admin interface, by selecting them and clicking the delete button, or using the link that is sent in the notification.
+You can protect one or more nicknames, by adding them into the protected nicks 
+box. Separate them using spaces. Then, when you want to use them, simply enter
+the nickname followed by : and the password. Password is case sensitive.
+
+HOW TO UPGRADE
+Remove the old plugins/shoutbox directory and replace it with the new one. Then try to follow the changes on the templates. Updating from 0.13 will migrate your data automatically. Upgrading from earlier versions is not supported. Your data will not be lost however.
+
+DOESN'T WORK? BUGS? WISHES? WHO TO CONTACT
+Please, use the LifeType's bug reporting system. It's located at:
+http://bugs.lifetype.net
+Otherwise, send me a mail: radar at netpalantir.it
+I must admit I don't read LifeType forum regularly, so if you post there, please
+let me know by mail as well.
+
++++++++++++++++++++++++++++++++++++++++++++++++
+
+TODO:
+- Restore the validation of the fields in the admin interface
+- Flooding protection
+- Spam protection
+- CAPTCHAs optional support
+
++++++++++++++++++++++++++++++++++++++++++++++++
+
+CHANGELOG:
+v 1.0a
+- Finally 100% LifeType architecture compliant
+- Ported to LifeType 1.1
+- Added locale
+- Added shoutbox history mode
+- Now fully supports cached blogs
+- Quick delete with links in the email notification (using a public blogaction and an auth link)
+- Added the possibility to temporarily disable the shoutbox
+
+v0.13
+- Fixed password bug
+- Fixed error messages
+
+v0.12
+- Porting of the whole thing to the new pLog 1 framework. Costed A LOT of work
+so it's not such a _minor_ release ;-)
+
+v0.11x
+- Nickname password protection
+- Admin section: shout list divided in pages
+
+v0.1
+Initial release
\ No newline at end of file

Added: plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxaction.class.php
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxaction.class.php	2006-10-21 21:40:35 UTC (rev 4146)
+++ plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxaction.class.php	2006-10-21 21:41:32 UTC (rev 4147)
@@ -0,0 +1,89 @@
+<?php
+
+    include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
+    include_once( PLOG_CLASS_PATH."class/view/admin/adminplugintemplatedview.class.php" );
+    include_once( PLOG_CLASS_PATH."class/view/admin/adminmessageview.class.php" );
+    include_once( PLOG_CLASS_PATH."plugins/shoutbox/class/dao/shoutbox.class.php" );
+
+    /**
+     * shows a form with the current configuration
+    */
+    class PluginShoutboxAction extends AdminAction {
+        
+        function PluginShoutboxAction( $actionInfo, $request ) {
+            $this->AdminAction( $actionInfo, $request );
+        }
+        
+        function perform() {
+        
+            // load some configuration settings
+            $blogSettings = $this->_blogInfo->getSettings();
+
+            /*
+            if(!$blogSettings->getValue("plugin_shoutbox_dbok") || $blogSettings->getValue( "plugin_shoutbox_version") != '0.12') {
+                header('Location: admin.php?op=setupShoutbox');
+                exit();
+            }
+            */
+
+            // Get the shoutbox entries
+            $s = new Shoutbox($this->_blogInfo->getId(), $blogSettings);
+            
+            // Check the setup of the box
+            $message = $s->setup();
+            if($message !== true) {
+              $this->_view = new AdminMessageView($this->_blogInfo);
+              $this->_view->setMessage($message);
+              $this->setCommonData();
+              return true;
+            }
+            // Check if defaults have ever been set for this blog
+            if(!$blogSettings->getValue("plugin_shoutbox_defaultsset"))
+              $this->setDefaults();
+            
+            // create a view and export the settings to the template
+            $this->_view = new AdminPluginTemplatedView( $this->_blogInfo, "shoutbox", "shoutbox", true );
+            $this->_view->setValue( "pluginEnabled", $pluginEnabled );
+
+            $this->_view->setValue( "shouts", $s->getShoutsArray());
+            
+            if($s->mail_alert)
+                $mail_alert_checked = "checked";
+            
+            $this->_view->setValue("mail_alert_checked", $mail_alert_checked);
+            $this->_view->setValue("max_length", $s->max_length);
+            $this->_view->setValue("shouts_per_view", $s->shouts_per_view);
+            $this->_view->setValue("default_nick", $s->default_nick);
+            $this->_view->setValue("default_shout", $s->default_shout);
+            $this->_view->setValue("protected_nicks", $s->protected_nicks);
+            $this->_view->setValue("protection_password", $s->protection_password);
+            $this->_view->setValue("current_page", $s->current_page);
+
+            $this->setCommonData();
+            
+            return true;
+        }
+        
+          function setDefaults() {
+            $blogSettings = $this->_blogInfo->getSettings();
+            
+            $blogSettings->setValue( "plugin_shoutbox_defaultsset", 1);
+            
+            $blogSettings->setValue( "plugin_shoutbox_shout_enabled", 1);
+            $blogSettings->setValue( "plugin_shoutbox_mail_alert", 1);
+            $blogSettings->setValue( "plugin_shoutbox_quick_delete", 0);
+            $blogSettings->setValue( "plugin_shoutbox_max_length", 400);
+            $blogSettings->setValue( "plugin_shoutbox_shouts_per_view", 15);
+            
+            $blogSettings->setValue( "plugin_shoutbox_protected_nicks", "ExampleNick");
+            $blogSettings->setValue( "plugin_shoutbox_protection_password", "");
+            
+            $blogSettings->setValue( "plugin_shoutbox_default_nick", "Your nickname");
+            $blogSettings->setValue( "plugin_shoutbox_default_shout", "Your shout here");
+            
+            $this->_blogInfo->setSettings( $blogSettings );
+            $this->_session->setValue( "blogInfo", $this->_blogInfo );
+            $this->saveSession();
+        }
+}
+?>
\ No newline at end of file

Added: plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxconfigaction.class.php
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxconfigaction.class.php	2006-10-21 21:40:35 UTC (rev 4146)
+++ plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxconfigaction.class.php	2006-10-21 21:41:32 UTC (rev 4147)
@@ -0,0 +1,50 @@
+<?php
+
+    include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
+    include_once( PLOG_CLASS_PATH."class/view/admin/adminplugintemplatedview.class.php" );
+
+    include_once( PLOG_CLASS_PATH."plugins/shoutbox/class/dao/shoutbox.class.php" );
+
+    /**
+     * shows a form with the current configuration
+    */
+    class PluginShoutboxConfigAction extends AdminAction {
+        
+        function PluginShoutboxConfigAction( $actionInfo, $request ) {
+            $this->AdminAction( $actionInfo, $request );
+        }
+        
+        function perform() {
+            // load some configuration settings
+            $blogSettings = $this->_blogInfo->getSettings();
+
+            // Get the shoutbox entries
+            $s = new Shoutbox($this->_blogInfo->getId(), $blogSettings);
+            
+            // create a view and export the settings to the template
+            $this->_view = new AdminPluginTemplatedView( $this->_blogInfo, "shoutbox", "shoutboxConfig" );
+            
+            if($s->shout_enabled)
+                $shout_enabled_checked = "checked";
+            if($s->mail_alert)
+                $mail_alert_checked = "checked";
+            if($s->quick_delete)
+                $quick_delete_checked = "checked";
+            
+            $this->_view->setValue("shout_enabled_checked", $shout_enabled_checked);
+            $this->_view->setValue("mail_alert_checked", $mail_alert_checked);
+            $this->_view->setValue("quick_delete_checked", $quick_delete_checked);
+            $this->_view->setValue("max_length", $s->max_length);
+            $this->_view->setValue("shouts_per_view", $s->shouts_per_view);
+            $this->_view->setValue("default_nick", $s->default_nick);
+            $this->_view->setValue("default_shout", $s->default_shout);
+            $this->_view->setValue("protected_nicks", $s->protected_nicks);
+            $this->_view->setValue("protection_password", $s->protection_password);
+            $this->_view->setValue("current_page", $s->current_page);
+                    
+            $this->setCommonData();
+            
+            return true;
+        }
+}
+?>
\ No newline at end of file

Added: plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxdeleteshoutsaction.class.php
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxdeleteshoutsaction.class.php	2006-10-21 21:40:35 UTC (rev 4146)
+++ plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxdeleteshoutsaction.class.php	2006-10-21 21:41:32 UTC (rev 4147)
@@ -0,0 +1,49 @@
+<?php
+
+    include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
+    include_once( PLOG_CLASS_PATH."class/view/admin/adminerrorview.class.php" );
+    include_once( PLOG_CLASS_PATH."class/view/admin/adminmessageview.class.php" );
+
+    include_once( PLOG_CLASS_PATH."plugins/shoutbox/class/dao/shoutbox.class.php" );
+    
+    /**
+     * updates the plugin configuration
+     */
+    class PluginShoutboxDeleteShoutsAction extends AdminAction
+    {
+    
+        var $_pluginEnabled;
+        var $_Shoutboxet;
+        
+        function PluginShoutboxDeleteShoutsAction( $actionInfo, $request )
+        {
+            $this->AdminAction( $actionInfo, $request );
+        }
+  
+
+        function perform()
+        {
+            $backLink = "<br><br><a href='admin.php?op=shoutbox'>Back to the shoutbox</a>";
+        
+            // and check which smiley set we should be using, or if none, then the default one
+            $blogSettings = $this->_blogInfo->getSettings();
+
+            if(is_array($this->_request->getValue('del')) ) {
+                $endMessage = "Shouts successfully deleted.";
+                $s = new Shoutbox($this->_blogInfo->getId(), $blogSettings);
+                foreach($this->_request->getValue('del') as $k => $v) {
+                    //echo("Delete $k<br>");
+                    $s->deleteShout($k);
+                }
+            }
+            else
+                $endMessage = "Nothing to do (no shouts selected).";
+
+            $this->_view = new AdminMessageView( $this->_blogInfo );
+            $this->_view->setMessage($endMessage . $backLink);
+            $this->setCommonData();
+
+            return true;
+        }
+    }
+?>
\ No newline at end of file

Added: plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxhistoryaction.class.php
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxhistoryaction.class.php	2006-10-21 21:40:35 UTC (rev 4146)
+++ plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxhistoryaction.class.php	2006-10-21 21:41:32 UTC (rev 4147)
@@ -0,0 +1,50 @@
+<?php
+
+    include_once( PLOG_CLASS_PATH."class/action/blogaction.class.php" );
+    include_once( PLOG_CLASS_PATH."class/view/plugintemplatedview.class.php" );
+
+    include_once( PLOG_CLASS_PATH."plugins/shoutbox/class/dao/shoutbox.class.php" );
+
+    /**
+     * shows a form with the current configuration
+    */
+    class PluginShoutboxHistoryAction extends BlogAction {
+        
+        function PluginShoutboxHistoryAction( $actionInfo, $request ) {
+            $this->BlogAction( $actionInfo, $request );
+        }
+        
+        function perform() {
+            // load some configuration settings
+            $blogSettings = $this->_blogInfo->getSettings();
+
+            // Get the shoutbox entries
+            $s = new Shoutbox($this->_blogInfo->getId(), $blogSettings);
+            
+            // create a view and export the settings to the template
+            //$this->_view = new PluginTemplatedView($this->_blogInfo, "shoutbox", "shoutbox_history" );
+            $this->_view = new BlogView($this->_blogInfo, "shoutbox_history" );
+            $this->_view->setValue( "pluginEnabled", $pluginEnabled );
+            //$this->_view->setValue( "Shoutboxet", $Shoutboxet );
+
+            $reqPage = (int)$this->_request->getValue('page');
+            if($reqPage < 1)
+              $reqPage = 1;
+            
+            if($reqPage > 1)
+              $this->_view->setValue("prev_page", $reqPage - 1);
+            
+            if($reqPage <= $s->getLastPage())
+              $this->_view->setValue("next_page", $reqPage + 1);
+
+            $this->_view->setValue("shoutsHistory", $s->getShoutsArray($reqPage));
+
+
+            $this->setCommonData();
+            
+            CacheControl::resetBlogCache($this->_blogInfo->getId());
+            
+            return true;
+        }
+}
+?>
\ No newline at end of file

Added: plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxnewshoutaction.class.php
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxnewshoutaction.class.php	2006-10-21 21:40:35 UTC (rev 4146)
+++ plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxnewshoutaction.class.php	2006-10-21 21:41:32 UTC (rev 4147)
@@ -0,0 +1,139 @@
+<?php
+
+include_once( PLOG_CLASS_PATH."class/action/blogaction.class.php" );
+include_once( PLOG_CLASS_PATH."class/view/plugintemplatedview.class.php" );
+
+include_once( PLOG_CLASS_PATH."plugins/shoutbox/class/dao/shoutbox.class.php" );
+include_once( PLOG_CLASS_PATH."class/view/errorview.class.php" );
+
+/**
+  * shows a form with the current configuration
+*/
+class PluginShoutboxNewShoutAction extends BlogAction {
+    
+  function PluginShoutboxNewShoutAction( $actionInfo, $request ) {
+      $this->BlogAction( $actionInfo, $request );
+  }
+  
+  function perform() {  
+    // load some configuration settings
+    $blogSettings = $this->_blogInfo->getSettings();
+    
+    $locale = Locales::getPluginLocale('shoutbox', $blogSettings->getValue('locale'));
+
+    // Get the shoutbox entries
+    $s = new Shoutbox($this->_blogInfo->getId(), $blogSettings);
+    
+    $error = false;
+    if(!$s->shout_enabled) {
+      $error = $locale->tr("temp_disabled");
+    }
+
+    //$nickname = $this->_request->getValue('nickname');
+    $nickname = $_POST['shoutbox_nickname'];
+    $nickname = strip_tags($nickname);
+    $protected_nicks = $s->protected_nicks;
+    $protection_password = $s->protection_password;
+  
+    //echo("Controllo :$protection_password contro $nickname<br>");
+    $usesProtectedNick = false;
+    $parts = explode(' ', $s->protected_nicks);
+    //echo("PN: $protected_nicks <pre>" . print_r($parts) ."</pre>");
+  
+    foreach($parts as $part) {
+        //echo("Controllo $part contro $nickname<br>");
+        if(preg_match("/$part/i", $nickname)) {
+            $usesProtectedNick = true;
+            continue;
+        }
+    }
+  
+    if($usesProtectedNick && !$error) {
+        if(!preg_match("/:$protection_password\$/", $nickname)) {
+            $error = $locale->tr("nickname_is_protected");
+            if($s->mail_alert) {
+                $s->notifyUser($nickname, $shoutText, "alert");
+            }
+        }
+        else {
+            $nickname = preg_replace("/:$protection_password\$/", "", $nickname);
+        }
+    }
+    
+  
+    //$shoutText = $this->_request->getValue('shoutText');
+    $shoutText = $_POST['shoutbox_text'];
+    $shoutText = strip_tags($shoutText, '<a><br><b><i><strong>');
+    if (!get_magic_quotes_gpc()) {
+        $nickname = addslashes($nickname);
+        $shoutText = addslashes($shoutText);
+    }
+    if(strlen($nickname) == 0 || strlen($shoutText) == 0) {
+        if(!$error)
+          $error = $locale->tr("missing_content");
+    }
+    else if($nickname == $s->default_nick || $shoutText == $s->default_shout) {
+        if(!$error)
+          $error = $locale->tr("default_shouted");
+    }
+    else if(strlen($shoutText) > $s->max_length) {
+        if(!$error)
+          $error = $locale->tr("too_long_shout");
+    }
+    else if(strlen($nickname) > 20) {
+        if(!$error)
+          $error = $locale->tr("too_long_nick");
+    }
+
+    
+    if($error) {
+      $this->_view = new ErrorView($this->_blogInfo );
+      $this->_view->setErrorMessage($error);
+      $this->setCommonData();
+      return true;
+    }
+
+    $s->addShout($nickname, $shoutText);
+    
+    // create a view and export the settings to the template
+    /*
+    $this->_view = new PluginTemplatedView($this->_blogInfo, "shoutbox", "shoutbox_newshout" );
+    $this->_view->setValue("returnPage", $_POST['shoutbox_return']);
+    */
+    
+    $this->_view = new InfoView($this->_blogInfo );
+    $this->_view->setInfoMessage("shout added");
+      
+    
+    $this->setCommonData();
+    
+    // Now reset this blog's cache
+    CacheControl::resetBlogCache($this->_blogInfo->getId());
+    
+    return true;
+  }
+}
+
+
+define( "INFO_TEMPLATE", "info" );
+class InfoView extends BlogView  {
+  function InfoView( $blogInfo, $message = null ) {
+      $this->BlogView( $blogInfo, INFO_TEMPLATE, SMARTY_VIEW_CACHE_DISABLED );
+
+        $this->_message = $message;
+    }
+
+  function setInfoMessage( $message ) {
+    $this->setValue( "message", $message );
+    
+    return( parent::setErrorMessage( $message ));
+  }
+
+  function render() {
+      if(!empty($this->_message))
+        $this->setValue( "message", $this->_message );
+    
+    parent::render();
+  }
+}
+?>
\ No newline at end of file

Added: plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxquickdeleteaction.class.php
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxquickdeleteaction.class.php	2006-10-21 21:40:35 UTC (rev 4146)
+++ plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxquickdeleteaction.class.php	2006-10-21 21:41:32 UTC (rev 4147)
@@ -0,0 +1,55 @@
+<?php
+
+    include_once( PLOG_CLASS_PATH."class/action/blogaction.class.php" );
+    include_once( PLOG_CLASS_PATH."class/view/plugintemplatedview.class.php" );
+    include_once( PLOG_CLASS_PATH."class/template/cachecontrol.class.php" );
+    
+    include_once( PLOG_CLASS_PATH."plugins/shoutbox/class/dao/shoutbox.class.php" );
+    include_once( PLOG_CLASS_PATH."class/view/errorview.class.php" );
+
+    /**
+     * shows a form with the current configuration
+    */
+    class PluginShoutboxQuickDeleteAction extends BlogAction {
+        
+        function PluginShoutboxQuickDeleteAction( $actionInfo, $request ) {
+            $this->BlogAction( $actionInfo, $request );
+        }
+        
+        function perform() {
+            // load some configuration settings
+            $blogSettings = $this->_blogInfo->getSettings();
+              
+
+            // Get the shoutbox entries
+            $s = new Shoutbox($this->_blogInfo->getId(), $blogSettings);
+            $shoutId = (int)$this->_request->getValue('shoutId');
+            $auth = $this->_request->getValue('auth');
+            if($shoutId < 1 || !preg_match('/^[a-zA-Z0-9]+$/', $auth)) {
+              $this->_view = new ErrorView($this->_blogInfo );
+              $this->_view->setErrorMessage("Invalid parameters. Have you copied the link entirely?");
+              $this->setCommonData();
+              return true;
+            }
+            else if($blogSettings->getValue("plugin_shoutbox_quick_delete") == 1) {
+              $s->deleteShout($shoutId, $auth);
+              
+              // Now reset this blog's cache
+              CacheControl::resetBlogCache($this->_blogInfo->getId());
+            }
+            
+            // create a view and export the settings to the template
+            $this->_view = new PluginTemplatedView($this->_blogInfo, "shoutbox", "shoutbox_history" );
+            $this->_view->setValue( "pluginEnabled", $pluginEnabled );
+            //$this->_view->setValue( "Shoutboxet", $Shoutboxet );
+
+            $reqPage = 1;
+            if($reqPage <= $s->getLastPage())
+              $this->_view->setValue("next_page", $reqPage + 1);
+            $this->_view->setValue("shoutsHistory", $s->getShoutsArray($reqPage));
+
+            $this->setCommonData();
+            return true;
+        }
+}
+?>
\ No newline at end of file

Added: plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxsetupaction.class.php
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxsetupaction.class.php	2006-10-21 21:40:35 UTC (rev 4146)
+++ plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxsetupaction.class.php	2006-10-21 21:41:32 UTC (rev 4147)
@@ -0,0 +1,120 @@
+<?php
+include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
+include_once( PLOG_CLASS_PATH."class/view/admin/adminerrorview.class.php" );
+include_once( PLOG_CLASS_PATH."class/view/admin/adminmessageview.class.php" );
+
+include_once( PLOG_CLASS_PATH."plugins/shoutbox/class/dao/shoutbox.class.php" );
+include_once( PLOG_CLASS_PATH."plugins/shoutbox/class/dao/shoutboxInstaller.class.php" );
+
+/**
+* creates or upgrades the shoutbox
+*/
+class PluginShoutboxSetupAction extends AdminAction
+{
+
+  var $_pluginEnabled;
+  
+  function PluginShoutboxSetupAction($actionInfo, $request) {
+      $this->AdminAction( $actionInfo, $request );
+  }
+  
+  function perform() {
+      $blogSettings = $this->_blogInfo->getSettings();
+      
+      $dbOk = $blogSettings->getValue("plugin_shoutbox_dbok");
+      $version = $blogSettings->getValue( "plugin_shoutbox_version");
+  
+      if($dbOk && $version == '0.2')
+          return true;
+      else if($dbOk && $version < 0.2) {
+          $this->confirmSetup();
+          $this->finalSaveSettings();
+          $this->_view = new AdminMessageView( $this->_blogInfo );
+          $this->_view->setMessage("Shoutbox successfully upgraded from previous version");
+          $this->setCommonData();
+      }
+      else if($dbOk && $version > 0.2) {
+          $this->_view = new AdminErrorView( $this->_blogInfo );
+          $this->_view->setValue( "message", "It seems that you are downgrading the shoutbox from version $version. Operation not supported. Maybe you have hit a bug?");
+          $this->setCommonData();
+      }
+      else {
+          $s = new Shoutbox($this->_blogInfo->getId(), $blogSettings);
+      
+          $tableExists = $s->checkTableExists();
+          if(!$tableExists)
+              $s->createTable();
+          $this->setDefaults();
+          $this->confirmSetup();
+          $this->finalSaveSettings();
+  
+          if($tableExists) {
+              $this->_view = new AdminErrorView( $this->_blogInfo );
+              $this->_view->setValue( "message", "You have hit a (known) bug. Your shouts are intact, but the configuration options are gone. You will have to set them again :( Sorry for the inconvenience");
+              $this->setCommonData();
+          }
+          else {
+              $this->_view = new AdminMessageView( $this->_blogInfo );
+              $this->_view->setMessage("Shoutbox options successfully updated");
+              $this->setCommonData();
+          }
+      }
+  
+      return true;
+  }
+  
+  
+  function setDefaults() {
+      $blogSettings = $this->_blogInfo->getSettings();
+      
+      $blogSettings->setValue( "plugin_shoutbox_shout_enabled", 1);
+      $blogSettings->setValue( "plugin_shoutbox_mail_alert", 1);
+      $blogSettings->setValue( "plugin_shoutbox_quick_delete", 0);
+      $blogSettings->setValue( "plugin_shoutbox_max_length", 400);
+      $blogSettings->setValue( "plugin_shoutbox_shouts_per_view", 15);
+      
+      $blogSettings->setValue( "plugin_shoutbox_protected_nicks", "ExampleNick");
+      $blogSettings->setValue( "plugin_shoutbox_protection_password", "");
+      
+      $blogSettings->setValue( "plugin_shoutbox_default_nickname", "Your nickname");
+      $blogSettings->setValue( "plugin_shoutbox_default_shout", "Your shout here");
+  
+      $this->_blogInfo->setSettings( $blogSettings );
+  }
+  
+  function confirmSetup() {
+      $blogSettings = $this->_blogInfo->getSettings();
+      
+      $blogSettings->setValue( "plugin_shoutbox_dbok", true);
+      $blogSettings->setValue( "plugin_shoutbox_version", '0.12');
+  
+      $this->_blogInfo->setSettings( $blogSettings );
+  }
+  
+  function finalSaveSettings() {
+      $blogSettings = $this->_blogInfo->getSettings();
+  
+      // save the blogs settings
+      $blogs = new Blogs();
+      include(PLOG_CLASS_PATH ."/version.php");
+      if(!preg_match('/lifetype-1.1/', $version))
+        $updateResult = $blogs->updateBlog( $this->_blogInfo->getId(), $this->_blogInfo );
+      else
+        $updateResult = $blogs->updateBlog($this->_blogInfo);
+      
+      if( !$updateResult) {
+          $this->_view = new AdminErrorView( $this->_blogInfo );
+          $this->_view->setValue( "message", "An error occurred while saving the shoutbox options");
+          $this->setCommonData();
+  
+          return false;
+      }
+      
+      // if everything went ok...
+      $this->_blogInfo->setSettings( $blogSettings );
+      $this->_session->setValue( "blogInfo", $this->_blogInfo );
+      $this->saveSession();
+  }
+    
+}
+?>
\ No newline at end of file

Added: plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxupdateconfigaction.class.php
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxupdateconfigaction.class.php	2006-10-21 21:40:35 UTC (rev 4146)
+++ plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxupdateconfigaction.class.php	2006-10-21 21:41:32 UTC (rev 4147)
@@ -0,0 +1,99 @@
+<?php
+
+    include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
+    include_once( PLOG_CLASS_PATH."class/view/admin/adminerrorview.class.php" );
+    include_once( PLOG_CLASS_PATH."class/view/admin/adminmessageview.class.php" );
+
+    include_once( PLOG_CLASS_PATH."plugins/shoutbox/class/dao/shoutbox.class.php" );
+    
+    /**
+     * updates the plugin configuration
+     */
+    class PluginShoutboxUpdateConfigAction extends AdminAction
+    {
+    
+        var $_pluginEnabled;
+        var $_Shoutboxet;
+        
+        function PluginShoutboxUpdateConfigAction( $actionInfo, $request )
+        {
+            $this->AdminAction( $actionInfo, $request );
+        }
+  
+        function validate()
+		{
+            $this->_pluginEnabled = $this->_request->getValue( "pluginEnabled" );
+            $this->_pluginEnabled = ($this->_pluginEnabled != "" );
+            $this->_Shoutboxet = $this->_request->getValue( "setId" );
+            if( $Shoutboxet == "" )
+                $Shoutboxet = DEFAULT_SMILEY_SET;
+			
+			return true;
+        }
+
+
+        function perform()
+        {
+            $endMessage = "Configuration successfully updated.";
+            $backLink = "<br><br><a href='admin.php?op=shoutbox'>Back to the shoutbox</a><br>" .
+                        "<a href='admin.php?op=shoutboxConfig'>Back to the shoutbox config page</a><br>";
+        
+            // and check which smiley set we should be using, or if none, then the default one
+            $blogSettings = $this->_blogInfo->getSettings();
+
+            if(strlen($this->_request->getValue('shout_enabled')) > 0)
+              $blogSettings->setValue("plugin_shoutbox_shout_enabled", 1);
+            else
+              $blogSettings->setValue("plugin_shoutbox_shout_enabled", 0);
+
+            if(strlen($this->_request->getValue('mail_alert')) > 0)
+                $blogSettings->setValue( "plugin_shoutbox_mail_alert", 1);
+            else
+                $blogSettings->setValue( "plugin_shoutbox_mail_alert", 0);
+                
+            if(strlen($this->_request->getValue('quick_delete')) > 0)
+              $blogSettings->setValue("plugin_shoutbox_quick_delete", 1);
+            else
+              $blogSettings->setValue("plugin_shoutbox_quick_delete", 0);
+            
+            $blogSettings->setValue( "plugin_shoutbox_max_length", $this->_request->getValue('max_length'));
+            $blogSettings->setValue( "plugin_shoutbox_shouts_per_view", $this->_request->getValue('shouts_per_view'));
+            
+            $blogSettings->setValue( "plugin_shoutbox_default_nick", $this->_request->getValue('default_nick'));
+            $blogSettings->setValue( "plugin_shoutbox_default_shout", $this->_request->getValue('default_shout'));
+            
+            $blogSettings->setValue( "plugin_shoutbox_protected_nicks", $this->_request->getValue('protected_nicks'));
+            $blogSettings->setValue( "plugin_shoutbox_protection_password", $this->_request->getValue('protection_password'));
+            
+            $this->_blogInfo->setSettings($blogSettings );
+        
+            // save the blogs settings
+            $blogs = new Blogs();
+            
+            include(PLOG_CLASS_PATH ."/version.php");
+            if(!preg_match('/lifetype-1.1/', $version))
+              $updateResult = $blogs->updateBlog($this->_blogInfo->getId(), $this->_blogInfo);
+            else
+              $updateResult = $blogs->updateBlog($this->_blogInfo);
+              
+            if( !$updateResult) {
+                $this->_view = new AdminErrorView( $this->_blogInfo );
+                $this->_view->setValue( "message", "An error occurred! " . $backLink);
+                $this->setCommonData();
+
+                return false;
+            }
+            
+            // if everything went ok...
+            $this->_blogInfo->setSettings( $blogSettings );
+            $this->_session->setValue( "blogInfo", $this->_blogInfo );
+            $this->saveSession();
+            
+            $this->_view = new AdminMessageView( $this->_blogInfo );
+            $this->_view->setMessage($endMessage . $backLink);
+            $this->setCommonData();
+
+            return true;
+        }
+    }
+?>
\ No newline at end of file

Added: plugins/branches/lifetype-1.1/shoutbox/class/dao/shoutbox.class.php
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/class/dao/shoutbox.class.php	2006-10-21 21:40:35 UTC (rev 4146)
+++ plugins/branches/lifetype-1.1/shoutbox/class/dao/shoutbox.class.php	2006-10-21 21:41:32 UTC (rev 4147)
@@ -0,0 +1,208 @@
+<?php
+
+include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
+include_once( PLOG_CLASS_PATH."class/template/cachecontrol.class.php" );
+include_once( PLOG_CLASS_PATH."class/mail/emailmessage.class.php" );
+include_once( PLOG_CLASS_PATH."class/mail/emailservice.class.php" );
+
+include_once( PLOG_CLASS_PATH."plugins/shoutbox/class/dao/shoutboxInstaller.class.php" );
+
+
+class Shoutbox extends Model {
+    var $blogId;
+    
+    var $config;
+    
+    var $shout_enabled;
+    var $mail_alert;
+    var $quick_delete;
+    var $max_length;
+    var $shouts_per_view;
+    var $default_nick;
+    var $default_shout;
+    var $protected_nicks;
+    var $protection_password;
+    var $current_page;
+    
+    var $blogSettings;
+
+    function Shoutbox($blogId, $blogSettings) {
+        $this->blogSettings = $blogSettings;
+    
+        /* Modelize it! */
+        $this->Model();
+    
+        /* Initialization */
+        $this->blogId = $blogId;
+
+        $this->shout_enabled = $blogSettings->getValue("plugin_shoutbox_shout_enabled");
+        $this->mail_alert = $blogSettings->getValue("plugin_shoutbox_mail_alert");
+        $this->mail_alert = $blogSettings->getValue("plugin_shoutbox_mail_alert");
+        $this->quick_delete = $blogSettings->getValue("plugin_shoutbox_quick_delete");
+        $this->max_length = $blogSettings->getValue( "plugin_shoutbox_max_length");
+        $this->shouts_per_view = $blogSettings->getValue( "plugin_shoutbox_shouts_per_view");
+
+        $this->default_nick = $blogSettings->getValue( "plugin_shoutbox_default_nick");
+        $this->default_shout = $blogSettings->getValue( "plugin_shoutbox_default_shout");
+
+        $this->protected_nicks = $blogSettings->getValue( "plugin_shoutbox_protected_nicks");
+        $this->protection_password = $blogSettings->getValue( "plugin_shoutbox_protection_password");
+
+        //Connections and blog data
+        //$this->connectDb();
+        //$this->blogSettings = new Config();
+        //$this->dbPrefix = $this->blogSettings->getValue( "db_prefix" );
+        //$this->blogId = $this->blogInfo->getId();
+    }
+    
+    function setup() {
+      $si = new ShoutboxInstaller($this->blogId, $this->blogSettings);
+      return $si->checkShoutbox();
+    }
+    
+
+    function getShoutsArray($page = false) {
+      $sql =  "SELECT * FROM " . $this->getPrefix() . "shoutbox_shouts ";
+      $sql .= "WHERE blog_id =  {$this->blogId} ORDER BY shout_date DESC ";
+      
+      if($page)
+        $offset = ($page-1) * $this->shouts_per_view;
+      else
+        $offset = 0;
+
+      $sql .= "LIMIT $offset, " . $this->shouts_per_view;
+      
+      $this->shoutsResult = $this->Execute($sql);
+      if(!$this->shoutsResult)
+          return array();
+
+      while($shout = $this->shoutsResult->FetchRow()) {
+        $shout['shout_date'] = Date("d/m/Y G:i", strtotime($shout['shout_date']));
+        $shouts[] = $shout;
+      }
+
+      return $shouts;
+    }
+
+    function addShout($nickname, $shoutText) {
+        //die("Cool :D Adding shout <b>$shoutText</b> by $nickname ");
+        $auth = "";
+        for($i=0; $i < 12; $i++) {
+            $auth .= chr((mt_rand(1, 36) <= 26) ? mt_rand(97, 122) : mt_rand(48, 57));
+        }
+
+        $sql =  "INSERT INTO " . $this->getPrefix() . "shoutbox_shouts (nickname, shout_text, blog_id, shout_date, auth) VALUES" .
+                "('$nickname', '$shoutText',  {$this->blogId}, '".Date('Y-m-d H:i:s')."', '$auth')";
+        $result = $this->Execute($sql);
+
+        //die("<pre>$sql</pre>");
+
+        if(!$result) {
+            echo('Sorry, coud not add your shout.');
+            return false;
+        }
+        
+        $shoutId = $this->_db->Insert_ID();
+        
+        if($this->mail_alert) {
+          $params = array('id' => $shoutId, 'auth' => $auth);
+          $this->notifyUser($nickname, $shoutText, 'new', $params);
+        }
+        
+        return true;
+    }
+
+    function deleteShout($id, $auth = false) {
+        $sql = "DELETE FROM " . $this->getPrefix() . "shoutbox_shouts WHERE shout_id = $id";
+        if($auth)
+          $sql .= " AND auth = '$auth' AND shout_date >= DATE_SUB(CURDATE(),INTERVAL 3 DAY)";
+        //echo($sql);
+        $result = $this->Execute($sql);
+        if(!$result) {
+          return false;
+        }
+        return true;
+    }
+
+    function alterShout($id, $nickname, $shoutText) {
+        $sql = "UPDATE " . $this->getPrefix() . "shoutbox_shouts SET nickname = '$nickname' , shout_text = '$shoutText' WHERE shout_id = $id";
+        $result = $this->Execute($sql);
+        if(!$result) {
+            die('Could not slter the shout!');
+            return false;
+        }
+        return true;
+    }
+
+    function getLastPage() {
+        $sql =  "SELECT COUNT(*) as cnt FROM " . $this->getPrefix() . "shoutbox_shouts ";
+        $res = $this->Execute($sql);
+        if(!$res)
+            return 0;
+        $cnt = $res->FetchRow();
+        if($cnt['cnt'] > 0)
+            $cnt = floor($cnt['cnt'] / $this->shouts_per_view);
+        return $cnt;
+    }
+
+    ####################################################
+    # Extra functions
+    function notifyUser($nickname, $shout_text, $whichMail = "new", $params = false) {
+        $users = new Users();
+        $userInfos = $users->getBlogUsers($this->blogId);
+        
+        foreach($userInfos as $userInfo) {
+            $message = new EmailMessage();
+            $message->setFrom("LifeType Shoutbox Plugin");
+            $message->addTo( $userInfo->getEmail());
+            
+            if($whichMail == "new") {
+                $message->setSubject( "LifeType Notification system: new shout in shoutbox" );
+                $body = <<<END
+There is a new shout in your shoutbox.
+From: $nickname
+Text: $shout_text
+END;
+            
+            if($this->quick_delete) {
+              $body .= <<<END
+
+
+You can delete this shout by clicking on this link:
+XXX http://www.netpalantir.it/index.php?op=shoutboxQuickDelete&shoutId={$params['id']}&auth={$params['auth']} XXX
+Remember there is no undo.
+END;
+            }
+            
+            }
+            else if($whichMail == "alert") {
+                $message->setSubject( "LifeType Notification system: shoutbox nickname protection alert" );
+                $body = <<<END
+Someone has tried to use your nickname in the shoutbox. The following message has been discarded:
+Text: $shout_text
+END;
+            }
+            
+            $message->setBody($body);
+
+            $service = new EmailService();
+            $service->sendMessage( $message );
+            //echo('Sent mail to ' . $userInfo->getEmail() . '<br>');
+        }
+    }
+
+    ####################################################
+    # Public section.
+    function thinkAndDo() {
+        return $this->getShoutsArray();
+    }
+    
+    function defaultNick() {
+        return $this->default_nick;
+    }
+    
+    function defaultShout() {
+        return $this->default_shout;
+    }
+}
+?>

Added: plugins/branches/lifetype-1.1/shoutbox/class/dao/shoutboxInstaller.class.php
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/class/dao/shoutboxInstaller.class.php	2006-10-21 21:40:35 UTC (rev 4146)
+++ plugins/branches/lifetype-1.1/shoutbox/class/dao/shoutboxInstaller.class.php	2006-10-21 21:41:32 UTC (rev 4147)
@@ -0,0 +1,86 @@
+<?php
+
+include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
+include_once( PLOG_CLASS_PATH."class/template/cachecontrol.class.php" );
+
+class ShoutboxInstaller extends Model {
+
+  function ShoutboxInstaller($blogId, $blogSettings) {
+    $this->blogSettings = $blogSettings;
+    
+    /* Modelize it! */
+    $this->Model();
+    
+    /* Initialization */
+    $this->blogId = $blogId;
+  }
+  
+  function checkShoutbox() {  
+    $dbPrefix = $this->getPrefix();
+    
+    $version = "1.0";
+  
+    $sql =  "SELECT * FROM " . $this->getPrefix() . "shoutbox_shouts ";
+    $this->shoutsResult = $this->Execute($sql);
+    if(!$this->shoutsResult) {
+        $version = "no";
+    }
+    else {
+      $sql = "SELECT auth FROM " . $this->getPrefix() . "shoutbox_shouts ";
+      $this->shoutsResult = $this->Execute($sql);
+      if(!$this->shoutsResult)
+          $version = "0.x";
+    }
+    
+    if($version == "no")
+      return $this->createTable();
+    else if($version == "0.x")
+      return $this->upgrade_0x_100();
+
+    return true;
+  }
+
+  function createTable() {
+    $dbPrefix = $this->getPrefix();
+
+    $sql = "SELECT * FROM {$dbPrefix}shoutbox_shouts";
+    if(!$this->_db->Execute($sql)) {
+      // Make new setup
+      $sql = "
+CREATE TABLE {$dbPrefix}shoutbox_shouts (
+    shout_id INT(11) NOT NULL auto_increment,
+    blog_id INT(11) NOT NULL,
+    nickname TEXT NOT NULL,
+    shout_text TEXT NOT NULL,
+    shout_date DATETIME NOT NULL,
+    auth CHAR(12),
+    UNIQUE KEY cashout_id (shout_id)
+)
+";
+      if( !$this->_db->Execute($sql) ) {
+        $message = "An error occurred while trying to create the table {$dbPrefix}shoutbox_shouts. Please, create it manually. Start you favorite database manager (like phpmyadmin) and run the following code:<br><pre>$sql</pre>";
+        return $message;
+      }
+    }
+    
+    return true;
+  }
+      
+  // Upgrade from 0.x version to 1.0.0
+  function upgrade_0x_100() {
+    $dbPrefix = $this->getPrefix();
+
+    $sql = "SELECT auth FROM {$dbPrefix}shoutbox_shouts";
+    if( !$this->_db->Execute($sql) ) {
+      // Make new setup
+      $sql = "ALTER TABLE {$dbPrefix}shoutbox_shouts ADD COLUMN auth CHAR(12)";
+      if( !$this->_db->Execute($sql) ) {
+        $message = "An error occurred while trying to update the table {$dbPrefix}shoutbox_shouts. Please, update it manually. Start you favorite database manager (like phpmyadmin) and run the following code:<br><pre>$sql</pre>";
+        return $message;
+      }
+    }
+    
+    return true;
+  }
+}
+?>
\ No newline at end of file

Added: plugins/branches/lifetype-1.1/shoutbox/locale/locale_en_UK.php
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/locale/locale_en_UK.php	2006-10-21 21:40:35 UTC (rev 4146)
+++ plugins/branches/lifetype-1.1/shoutbox/locale/locale_en_UK.php	2006-10-21 21:41:32 UTC (rev 4147)
@@ -0,0 +1,44 @@
+<?
+$messages["an_error_occurred"] = "An error occurred";
+
+// public template (appears on the blog)
+$messages["shoutbox"] = "The Shoutbox";
+$messages["shoutbox_history"] = "Shoutbox History";
+$messages["shoutbox_disabled"] = "Shouting is temporarily disabled";
+
+// shoutbox.template
+$messages["nickname"] = "Nickname";
+$messages["select"] = "Select";
+$messages["configure_shoutbox"] = "Configure the shoutbox";
+$messages["delete"] = "Delete";
+
+// shoutbox history
+$messages["prev_page"] = "Previous page";
+$messages["next_page"] = "Next page";
+
+// shoutbox newshout
+$messages["shout_added"] = "Your shout has been added.";
+$messages["go_back"] = "Return to the previous page";
+
+//phuginsshoutboxnewshoutaction.class.php
+$messages["temp_disabled"] = "The shoutbox is temporary disabled. Try again later";
+$messages["nickname_is_protected"] = "This nickname is reserved. Please, use another one";
+$messages["missing_content"] = "You need to insert a nickname and a message.";
+$messages["default_shouted"] = "Shout something more original ;-)";
+$messages["too_long_shout"] = "Your shout is too long!";
+$messages["too_long_nick"] = "Your nickname is too long!";
+
+/*
+$messages[""] = "";
+$messages[""] = "";
+$messages[""] = "";
+$messages[""] = "";
+$messages[""] = "";
+$messages[""] = "";
+$messages[""] = "";
+$messages[""] = "";
+$messages[""] = "";
+$messages[""] = "";
+*/
+
+?>
\ No newline at end of file

Added: plugins/branches/lifetype-1.1/shoutbox/locale/locale_it_IT.php
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/locale/locale_it_IT.php	2006-10-21 21:40:35 UTC (rev 4146)
+++ plugins/branches/lifetype-1.1/shoutbox/locale/locale_it_IT.php	2006-10-21 21:41:32 UTC (rev 4147)
@@ -0,0 +1,28 @@
+<?
+$messages["shoutbox"] = "Scatoletta";
+
+$messages["an_error_occurred"] = "E' avvenuto un errore";
+
+// shoutbox.template
+$messages["nickname"] = "Nickname";
+$messages["select"] = "Seleziona";
+$messages["configure_shoutbox"] = "Configura la shoutbox";
+$messages["delete"] = "Cancella";
+
+// shoutbox history
+$messages["prev_page"] = "Pagina precedente";
+$messages["next_page"] = "Pagina successiva";
+
+// shoutbox newshout
+$messages["shout_added"] = "Il messaggio �stato aggiunto";
+$messages["go_back"] = "Torna alla pagina precedente";
+
+//phuginsshoutboxnewshoutaction.class.php
+$messages["temp_disabled"] = "La shoutbox �momentaneamente disabilitata. Riprova pi tardi";
+$messages["nickname_is_protected"] = "Questo nickname �riservato. Scegline un altro";
+$messages["missing_content"] = "Inserisci un messaggio ed un nickname";
+$messages["default_shouted"] = "Scrivi qualcosa di pi originale ;-)";
+$messages["too_long_shout"] = "Il messaggio �troppo lungo";
+$messages["too_long_nick"] = "Il nickname �troppo lungo";
+
+?>
\ No newline at end of file

Added: plugins/branches/lifetype-1.1/shoutbox/pluginshoutbox.class.php
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/pluginshoutbox.class.php	2006-10-21 21:40:35 UTC (rev 4146)
+++ plugins/branches/lifetype-1.1/shoutbox/pluginshoutbox.class.php	2006-10-21 21:41:32 UTC (rev 4147)
@@ -0,0 +1,72 @@
+<?php
+
+// -- plugin manager stuff
+include_once( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
+//include_once( PLOG_CLASS_PATH."class/plugin/eventpluginbase.class.php" );
+include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
+
+// -- for the public side action
+include_once( PLOG_CLASS_PATH."class/action/blogaction.class.php" );
+include_once( PLOG_CLASS_PATH."class/view/errorview.class.php" );
+
+// -- for the admin side action
+include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
+include_once( PLOG_CLASS_PATH."class/view/admin/adminerrorview.class.php" );
+
+include_once( PLOG_CLASS_PATH."plugins/shoutbox/class/dao/shoutbox.class.php" );
+
+class PluginShoutbox extends PluginBase  {
+    var $s;
+
+    function PluginShoutbox()
+    {
+        $this->PluginBase();
+
+        $this->desc    = "Shoutbox plugin: unleash your visitors";
+        $this->author  = "Palantir (radar at netpalantir.it)";
+        $this->id      = "shoutbox";
+        $this->locales = Array( "en_UK", "it_IT");
+
+        $this->registerAdminAction("shoutbox", "PluginShoutboxAction" );
+        $this->registerAdminAction("shoutboxConfig", "PluginShoutboxConfigAction" );
+        $this->registerAdminAction("updateShoutboxConfig", "PluginShoutboxUpdateConfigAction" );
+        $this->registerAdminAction("deleteShouts", "PluginShoutboxDeleteShoutsAction" );
+        
+        $this->registerBlogAction("shoutboxHistory", "PluginShoutboxHistoryAction" );
+        $this->registerBlogAction("shoutboxQuickDelete", "PluginShoutboxQuickDeleteAction" );
+        $this->registerBlogAction("shoutboxNewShout", "PluginShoutboxNewShoutAction" );
+        
+        $this->addMenuEntry("/menu/controlCenter/manageSettings", "Shoutbox", "?op=shoutbox", "" );
+    }
+
+    function process( $eventType, $params )
+    {
+        // return the content as it came, as the caller class probably expected us to do
+        // something with it...
+        return $params;
+    }
+
+    function thinkAndDo() {
+        if(!$this->s)
+            $this->s = new Shoutbox($this->blogInfo->getId(), $this->blogSettings, $this->config);
+        return $this->s->thinkAndDo();
+    }
+
+    function getDefaultNick() {
+        if(!$this->s)
+            $this->s = new Shoutbox($this->blogInfo->getId(), $this->blogSettings, $this->config);
+        return $this->s->default_nick;
+    }
+
+    function getDefaultShout() {
+        if(!$this->s)
+            $this->s = new Shoutbox($this->blogInfo->getId(), $this->blogSettings, $this->config);
+        return $this->s->default_shout;
+    }
+    
+    function isShoutboxEnabled() {
+        if(!$this->s)
+            $this->s = new Shoutbox($this->blogInfo->getId(), $this->blogSettings, $this->config);
+        return $this->s->shout_enabled;
+    }
+}
\ No newline at end of file

Added: plugins/branches/lifetype-1.1/shoutbox/templates/shoutbox.template
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/templates/shoutbox.template	2006-10-21 21:40:35 UTC (rev 4146)
+++ plugins/branches/lifetype-1.1/shoutbox/templates/shoutbox.template	2006-10-21 21:41:32 UTC (rev 4147)
@@ -0,0 +1,53 @@
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=Shoutbox title=$locale->tr("Shoutbox")}
+
+{literal}
+<SCRIPT>
+var submitUsed = '';
+function doConfirm() {
+    if(submitUsed == 'del')
+        if(!confirm('Are you sure to delete? There is NO undo!')) 
+            return false;
+    return true;
+}
+</SCRIPT>
+{/literal}
+
+<FORM method="POST" onSubmit="return doConfirm()">
+    <input type="hidden" name="op" value="deleteShouts" />
+
+
+    <input type="hidden" name="currentPage" value="{$this->current_page}" />
+    
+<table class="info">
+    <thead>
+        <tr>
+            <!-- 775 -->
+            <th style="width:140px;">{$locale->tr("nickname")}</th>
+            <th>Text</th>
+            <th style="width:10px;">{$locale->tr("select")}</th>
+        </tr>
+    </thead>
+    
+    <tbody>
+
+{foreach from=$shouts item=shout key=shoutId}
+    <tr>
+    <td>{$shout.nickname}</td>
+    <td>{$shout.shout_text}</td>
+    <td><INPUT type='checkbox' name=del[{$shout.shout_id}]/></td>
+    </tr>
+{/foreach}
+
+</table>
+
+<br/>
+<INPUT type="submit" name="delShouts" value="{$locale->tr("delete")} selected" onFocus="submitUsed = 'del'"/>
+</FORM>
+
+<br/>
+
+<a href="admin.php?op=shoutboxConfig">{$locale->tr("configure_shoutbox")}</a>
+
+{include file="$admintemplatepath/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Added: plugins/branches/lifetype-1.1/shoutbox/templates/shoutboxConfig.template
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/templates/shoutboxConfig.template	2006-10-21 21:40:35 UTC (rev 4146)
+++ plugins/branches/lifetype-1.1/shoutbox/templates/shoutboxConfig.template	2006-10-21 21:41:32 UTC (rev 4147)
@@ -0,0 +1,94 @@
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=Shoutbox title=$locale->tr("Shoutbox")}
+
+<FORM method="POST">
+
+<fieldset class="inputField">
+    <input type="hidden" name="op" value="updateShoutboxConfig" />
+    <input type="hidden" name="pluginId" value="shoutboxPlugin" />
+
+    <legend>Shoutbox Settings</legend>
+        <div class="field">
+        <label for="shout_enabled">Posting enabled</label>
+        <div class="formHelp">
+            <input type="checkbox" id="shout_enabled" name="shout_enabled" {$shout_enabled_checked} value="12345" />
+            Uncheck this if you want to temporary disable the posting. The shoutbox will still be displayed,
+            but nobody will be able to add new shouts.
+        </div> 
+        </div>
+    
+
+        <div class="field">
+        <label for="mail_alert">Mail Alert</label>
+        <div class="formHelp">
+            <input type="checkbox" id="mail_alert" name="mail_alert" {$mail_alert_checked} value="12345" />
+            Alert me whenever a new shout is added
+        </div> 
+        </div>
+        
+        <div class="field">
+        <label for="quick_delete">Quick delete</label>
+        <div class="formHelp">
+            <input type="checkbox" id="quick_delete" name="quick_delete" {$quick_delete_checked} value="12345" />
+            Append a link to the notification emails, which allows to immediately delete the shout.
+            It works only if the Mail Alert is enabled.
+        </div> 
+        </div>
+
+        <div class="field">
+        <label for="max_length">Maximum shout length</label>
+        <div class="formHelp">
+            <input type="input" size="3" name="max_length" value="{$max_length}">
+            Maximum lenght of a shout (number of characters)
+        </div> 
+        </div>
+
+        <div class="field">
+        <label for="max_length">Visible Shouts number</label>
+        <div class="formHelp">
+            <input type="input" size="3" name="shouts_per_view" value="{$shouts_per_view}">
+            Number of shouts to be displayed on the page
+        </div> 
+        </div>
+
+        <div class="field">
+        <label for="max_length">Default Shout</label>
+        <div class="formHelp">
+            <input type="input" size="20" name="default_shout" value="{$default_shout}">
+            Text to be written in the shout field, like: "Your shout here"
+        </div> 
+        </div>
+
+        <div class="field">
+        <label for="max_length">Default Nickname</label>
+        <div class="formHelp">
+            <input type="input" size="20" name="default_nick" value="{$default_nick}">
+            Text to be written in the nickname field, like: "Your nickname here"
+        </div> 
+        </div>
+
+        <div class="field">
+        <label for="max_length">Protected Nicknames</label>
+        <div class="formHelp">
+            <input type="input" size="20" name="protected_nicks" value="{$protected_nicks}">
+            Nicks to be password protected. Separate them by spaces. They are case insensitive
+        </div> 
+        </div>
+
+        <div class="field">
+        <label for="max_length">Protection password</label>
+        <div class="formHelp">
+            <input type="password" size="20" name="protection_password" value="{$protection_password}">
+            Password for using nicks. To use a protected nick, write it like this: Palantir:MySecretPassword
+        </div> 
+        </div>
+</fieldset>
+
+    
+    <INPUT type="submit" name="updateOptions" value="Save options"/>
+</FORM>
+<br/>
+
+
+{include file="$admintemplatepath/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Added: plugins/branches/lifetype-1.1/shoutbox/templates/shoutbox_newshout.template
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/templates/shoutbox_newshout.template	2006-10-21 21:40:35 UTC (rev 4146)
+++ plugins/branches/lifetype-1.1/shoutbox/templates/shoutbox_newshout.template	2006-10-21 21:41:32 UTC (rev 4147)
@@ -0,0 +1,13 @@
+{assign var="mybase" value="http://localhost/linea/"}
+{assign var="mybase" value="http://www.netpalantir.it/"}
+
+{assign var="shoutbox_include" value="templates/palantir-tribal2/shoutbox.template"}
+
+{include file="templates/palantir-tribal2/header.template"}
+
+<br><br><br>
+
+{$locale->tr("shout_added")}
+<a href="{$returnPage}">{$locale->tr("go_back")}</a>
+
+{include file="templates/palantir-tribal2/footer.template"}
\ No newline at end of file

Added: plugins/branches/lifetype-1.1/shoutbox/templates-sample/.htaccess
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/templates-sample/.htaccess	2006-10-21 21:40:35 UTC (rev 4146)
+++ plugins/branches/lifetype-1.1/shoutbox/templates-sample/.htaccess	2006-10-21 21:41:32 UTC (rev 4147)
@@ -0,0 +1,6 @@
+# If you want to prevent someone stealing your templates,
+# you can unmark the following code to enable the protection.
+#
+# <Files *.template> 
+# deny from all 
+# </Files>
\ No newline at end of file

Added: plugins/branches/lifetype-1.1/shoutbox/templates-sample/standard/footer.template
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/templates-sample/standard/footer.template	2006-10-21 21:40:35 UTC (rev 4146)
+++ plugins/branches/lifetype-1.1/shoutbox/templates-sample/standard/footer.template	2006-10-21 21:41:32 UTC (rev 4147)
@@ -0,0 +1,104 @@
+ {pager style="links"}
+
+</div>
+
+<div id="Menu">
+
+{assign var=blogOwner value=$blog->getOwnerInfo()}
+{assign var=AboutMyself value=$blogOwner->getAboutMyself()}
+{if $blogOwner->hasPicture() && $AboutMyself}
+  
+  	<h2>{$locale->tr("about_myself")}</h2>
+  	<div id="AboutMyself">
+  	{assign var=picture value=$blogOwner->getPicture()}
+  	<img id="UserPicture" src="{$picture->getPreviewLink()}" alt="{$blogOwner->getUsername()}" />
+  	<p>{$AboutMyself}</p>
+  	<div class="clearer">&nbsp;</div>
+  	</div>
+{/if}
+
+
+
+  	<h2>{$locale->tr("menu")}</h2>
+    	<div id="Sections">
+    	<ul>
+    	<li><a title="{$locale->tr("main")}" href="{$url->blogLink()}">{$locale->tr("main")}</a></li>
+    	<li><a title="{$locale->tr("archives")}" href="{$url->templatePage("archives")}">{$locale->tr("archives")}</a></li>
+    	<li><a title="{$locale->tr("albums")}" href="{$url->albumLink()}">{$locale->tr("albums")}</a></li>
+    	
+    	 {foreach name=mylinkscategories from=$mylinkscategories item=panel_linkcategory}
+{if $smarty.foreach.mylinkscategories.first}
+   
+<li><a title="{$locale->tr("links")}" href="{$url->templatePage("links")}">{$locale->tr("links")}</a></li>{/if}
+    	{/foreach}
+    	</ul>
+    	</div>
+    	
+    	<h2>{$locale->tr("search")}</h2>
+	<div id="Search">
+	<form id="search_form" method="post" action="{$url->getIndexUrl()}">
+	<fieldset>
+	<label for="searchTerms"><input type="text" id="searchTerms" name="searchTerms" value="" /></label>
+	<input type="submit" name="Search" value="{$locale->tr("search_s")}" class="button" />
+	<input type="hidden" name="op" value="Search" />
+	<input type="hidden" name="blogId" value="{$blog->getId()}" />   
+	</fieldset>
+	</form>
+	</div> 
+	
+	<h2>{$locale->tr("calendar")}</h2>
+    	<div id="Calendar">
+    		{$calendar}
+    	</div>	
+  
+  	<h2>{$locale->tr("recently")}</h2>
+    	<div id="Recently">
+    	<ul>
+    		{foreach from=$recentposts item=post}
+        <li><a title="{$post->getTopic()}" href="{$url->postLink($post)}">{$post->getTopic()}</a></li>
+    		{/foreach}
+    	</ul>
+   	</div>
+    
+ 	<h2>{$locale->tr("categories")}</h2>
+    	<div id="Categories">
+    	<ul>
+    		{foreach from=$articlecategories item=articleCategory}
+    	<li><a title="{$articleCategory->getName()}" href="{$url->categoryLink($articleCategory)}">{$articleCategory->getName()} <abbr title="{$articleCategory->getNumArticles()} {$locale->tr("posts")}">[{$articleCategory->getNumArticles()}]</abbr></a></li>
+   		{/foreach}
+  	</ul>
+  	</div>
+  
+  	<h2>{$locale->tr("syndicate")}</h2>
+    	<div id="Syndicate">
+    	<ul>
+    	<li><a title="RSS 0.90" href="{$url->rssLink("rss090")}">RSS 0.90</a></li>
+    	<li><a title="RSS 1.0" href="{$url->rssLink("rss10")}">RSS 1.0</a></li>
+    	<li><a title="RSS 2.0" href="{$url->rssLink("rss20")}">RSS 2.0</a></li>
+    	<li><a title="Atom" href="{$url->rssLink("rss20")}">Atom</a></li>
+    	</ul>
+    	</div>
+      
+      
+    <h2>{$locale->tr("Shoutbox")}</h2>
+      <div id="Shoutbox">
+        {include file="standard/shoutbox.template"}
+      </div>  
+</div>
+
+<div class="clearer">&nbsp;</div> 
+
+
+
+</div>
+
+<div id="Bottommenu"><a href="http://www.w3.org/WAI/">Accessible</a> and Valid <a href="http://validator.w3.org/check/referer">XHTML 1.0 Strict</a> and <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></div>
+
+
+<!-- Please leave the credit intact. Thank you. -->
+<div id="Bottom">Powered by <a href="http://www.lifetype.net">LifeType</a> - Design by <a href="http://www.balearweb.com/">BalearWeb</a></div>
+
+</div>
+
+</body>
+</html>

Added: plugins/branches/lifetype-1.1/shoutbox/templates-sample/standard/info.template
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/templates-sample/standard/info.template	2006-10-21 21:40:35 UTC (rev 4146)
+++ plugins/branches/lifetype-1.1/shoutbox/templates-sample/standard/info.template	2006-10-21 21:41:32 UTC (rev 4147)
@@ -0,0 +1,5 @@
+		{include file="$blogtemplate/header.template"} 
+ 	<h2>{$locale->tr("info")}</h2>
+ 		<p>{$locale->tr($message)}</p>
+		<p><a href="javascript:history.go(-1)">{$locale->tr("back")}</a></p>
+		{include file="$blogtemplate/footer.template"} 

Added: plugins/branches/lifetype-1.1/shoutbox/templates-sample/standard/shoutbox.template
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/templates-sample/standard/shoutbox.template	2006-10-21 21:40:35 UTC (rev 4146)
+++ plugins/branches/lifetype-1.1/shoutbox/templates-sample/standard/shoutbox.template	2006-10-21 21:41:32 UTC (rev 4147)
@@ -0,0 +1,52 @@
+{assign var="deafultNick" value=$shoutbox->getDefaultNick()}
+{assign var="defaultShout" value=$shoutbox->getDefaultShout()}
+
+{assign var="shouts" value=$shoutbox->thinkAndDo()}
+{foreach from=$shouts item=shout}
+    &lt;<b>{$shout.nickname}</b>&gt;
+    {$shout.shout_text}<br />
+    ({$shout.shout_date})<br />
+{/foreach}   
+
+<p style="font-weight: bold;">
+<a href="{$smarty.server.PHP_SELF}?op=shoutboxHistory">
+Shoutbox History
+</a>
+</p>
+
+{literal}
+<script type="text/javascript">
+function shoutbox_clearField(el) {
+    if(el.name == 'shoutbox_text' && el.value == '{/literal}{$defaultShout}{literal}')
+        el.value = '';
+    else if(el.name == 'shoutbox_nickname' && el.value == '{/literal}{$deafultNick}{literal}')
+        el.value = '';
+}
+
+function shoutbox_resetField(el) {
+    var x = el.value;
+    if(el.name == 'shoutbox_text' && x.length == 0) {
+        el.value = '{/literal}{$defaultShout}{literal}';
+    }
+    else if(el.name == 'shoutbox_nickname' && el.value == '')
+        el.value = '{/literal}{$deafultNick}{literal}';
+}
+</script>
+{/literal}
+
+{assign var="shoutsEnabled" value=$shoutbox->isShoutboxEnabled()}
+{if $shoutsEnabled}
+<form method='post' action='index.php?op=shoutboxNewShout'>
+  <input type="hidden" name="shoutbox_return" value="{$smarty.server.PHP_SELF}" />
+  <textarea name="shoutbox_text" cols="15" rows="2" onfocus="shoutbox_clearField(this)" onblur="shoutbox_resetField(this)">{$defaultShout}</textarea>
+  <br />
+  <input type="text" name="shoutbox_nickname" value="{$deafultNick}" size="15" onfocus="shoutbox_clearField(this)" onblur="shoutbox_resetField(this)"/>
+  <br />
+  <input type="submit" name="shoutbox_submit" value="Shout!"/>
+</form>
+<br />
+{else}
+<p style='color: red;'>
+[shouting is temporarily disabled]
+</p>
+{/if}

Added: plugins/branches/lifetype-1.1/shoutbox/templates-sample/standard/shoutbox_history.template
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/templates-sample/standard/shoutbox_history.template	2006-10-21 21:40:35 UTC (rev 4146)
+++ plugins/branches/lifetype-1.1/shoutbox/templates-sample/standard/shoutbox_history.template	2006-10-21 21:41:32 UTC (rev 4147)
@@ -0,0 +1,32 @@
+{assign var="shoutbox_include" value="templates/palantir-tribal2/shoutbox.template"}
+
+{include file="standard/header.template"}
+
+<h1>Shoutbox History</h1>
+
+{if $prev_page}
+<a href='{$smarty.server.PHP_SELF}?op=shoutboxHistory&page={$prev_page}'>&#171; {$locale->tr("prev_page")}</a>
+&nbsp; &nbsp;
+{/if}
+{if $next_page}
+<a href='{$smarty.server.PHP_SELF}?op=shoutboxHistory&page={$next_page}'>{$locale->tr("next_page")} &#187;</a>
+{/if}
+<br /><br />
+
+{foreach from=$shoutsHistory item=shout}
+    [{$shout.shout_date}] &lt;<b>{$shout.nickname}</b>&gt;
+    {$shout.shout_text}<br />
+{/foreach}
+
+
+<p>
+{if $prev_page}
+<a href='{$smarty.server.PHP_SELF}?op=shoutboxHistory&page={$prev_page}'>&#171; {$locale->tr("prev_page")}</a>
+&nbsp; &nbsp;
+{/if}
+{if $next_page}
+<a href='{$smarty.server.PHP_SELF}?op=shoutboxHistory&page={$next_page}'>{$locale->tr("next_page")} &#187;</a>
+{/if}
+</p>
+
+{include file="standard/footer.template"}
\ No newline at end of file



More information about the pLog-svn mailing list