[pLog-svn] r3867 - in nonfree/plugins/trunk: . multiblogedit multiblogedit/class multiblogedit/class/action multiblogedit/class/view multiblogedit/templates

Oscar Renalias oscar at renalias.net
Sun Aug 13 15:46:27 GMT 2006


Too bad I am so thick sometimes :-), but this shouldn't have ended up  
here.

In any case, we'll give more information soon regarding 'nonfree'  
stuff. And don't worry, it won't be as bad as it sounds!

In the meantime, the code is copyrighted by the project and we do not  
allow anyone to use it... yet. Sorry about that, but I hope your  
understand.

On 13 Aug 2006, at 17:40, oscar at devel.lifetype.net wrote:

> Author: oscar
> Date: 2006-08-13 14:40:50 +0000 (Sun, 13 Aug 2006)
> New Revision: 3867
>
> Added:
>    nonfree/plugins/trunk/multiblogedit/
>    nonfree/plugins/trunk/multiblogedit/class/
>    nonfree/plugins/trunk/multiblogedit/class/action/
>    nonfree/plugins/trunk/multiblogedit/class/action/ 
> domultiblogeditaction.class.php
>    nonfree/plugins/trunk/multiblogedit/class/action/ 
> showmultiblogeditaction.class.php
>    nonfree/plugins/trunk/multiblogedit/class/view/
>    nonfree/plugins/trunk/multiblogedit/class/view/ 
> domultiblogeditview.class.php
>    nonfree/plugins/trunk/multiblogedit/class/view/ 
> showmultiblogeditview.class.php
>    nonfree/plugins/trunk/multiblogedit/locale/
>    nonfree/plugins/trunk/multiblogedit/pluginmultiblogedit.class.php
>    nonfree/plugins/trunk/multiblogedit/templates/
>    nonfree/plugins/trunk/multiblogedit/templates/doedit.template
>    nonfree/plugins/trunk/multiblogedit/templates/editform.template
> Log:
> This could be our first 'nonfree' content, a plugin that will allow  
> sites with lots of blogs to "mass edit" them. The plugin works by  
> displaying a list with all the properties that can be modified in a  
> blog (anything from the title to the resource quota) and then  
> processes all blogs and sets those fields that have been set (i.e.  
> it is possible to only change the template of all blogs) The plugin  
> currently works although it's a bit rough, and it is only capable  
> of processing all blogs. I am planning to add support for  
> processing for example all inactive blogs, or only the blogs  
> selected in the list on the right of the form. Additionally, this  
> plugin should detect if there are plugins installed and allow to  
> modify the settings of those plugins so that for example authimage  
> can be globally activated.
>
>
> Added: nonfree/plugins/trunk/multiblogedit/class/action/ 
> domultiblogeditaction.class.php
> ===================================================================
> --- nonfree/plugins/trunk/multiblogedit/class/action/ 
> domultiblogeditaction.class.php	2006-08-13 14:31:50 UTC (rev 3866)
> +++ nonfree/plugins/trunk/multiblogedit/class/action/ 
> domultiblogeditaction.class.php	2006-08-13 14:40:50 UTC (rev 3867)
> @@ -0,0 +1,184 @@
> +<?php
> +
> +	include_once( PLOG_CLASS_PATH."class/action/admin/ 
> siteadminaction.class.php" );
> +	include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
> +	include_once( PLOG_CLASS_PATH."plugins/multiblogedit/class/view/ 
> showmultiblogeditview.class.php" );
> +	include_once( PLOG_CLASS_PATH."plugins/multiblogedit/class/view/ 
> domultiblogeditview.class.php" );
> +	include_once( PLOG_CLASS_PATH."class/template/ 
> cachecontrol.class.php" );
> +	
> +	define( "MULTIBLOG_EDIT_NUM_BLOGS_PER_STEP", 2 );
> +	
> +	class DoMultiBlogEditAction extends SiteAdminAction
> +	{
> +		function DoMultiBlogEditAction( $actionInfo, $request )
> +		{
> +			$this->SiteAdminAction( $actionInfo, $request );
> +			
> +			print_r($_REQUEST["set"]);
> +		}
> +		
> +		function retrieveData()
> +		{
> +			// return an array with those fields that have been set
> +			$set = HttpVars::getRequestValue( "set" );
> +			if( !is_array( $set ))
> +				return Array();			
> +				
> +			// or else check which fields have been set and load their values
> +			$settings = Array();
> +			foreach( $set as $field => $value ) {
> +				$settings[$field] = HttpVars::getRequestValue( $field );
> +			}
> +			
> +			print_r($settings);
> +			
> +			return( $settings );
> +		}
> +		
> +		function updateBlog( $blog, $data )
> +		{
> +			// this is a bit cumbersome, but I don't currently see any  
> other way to do it...
> +			$settings = $blog->getSettings();
> +			if( isset( $data["blogName"] )) {
> +				$blog->setBlog( $data["blogName"] );
> +				$blog->setMangledBlogName( $data["blogName"] );
> +			}
> +			if( isset( $data["blogAbout"] )) {
> +				$blog->setAbout( $data["blogAbout"] );
> +			}
> +			if( isset( $data["blogLocale"] )) {
> +				include_once( PLOG_CLASS_PATH."class/locale/locales.class.php" );
> +				$locale =& Locales::getLocale( $data["blogLocale"] );
> +				$blog->setLocale( $locale );
> +			}
> +			if( isset( $data["blogStatus"] )) {
> +				$blog->setStatus( $data["blogStatus"] );
> +			}
> +			if( isset( $data["blogResourcesQuota"] )) {
> +				$settings->SetValue( "resources_quota", $data 
> ["blogResourcesQuota"] );
> +			}			
> +			if( isset( $data["blogOwner"] )) {
> +				$blog->setOwner( $data["blogOwner"] );
> +			}
> +			if( isset( $data["blogCategory"] )) {
> +				$blog->setBlogCategoryId( $data["blogCategory"] );
> +			}
> +			if( isset( $data["blogMaxMainPageItems"] )) {
> +				$settings->setValue( "show_posts_max", $data 
> ["blogMaxMainPageItems"] );
> +			}
> +			if( isset( $data["blogMaxRecentItems"] )) {
> +				$settings->setValue( "recent_posts_max", $data 
> ["blogMaxRecentItems"] );
> +			}
> +			if( isset( $data["blogTemplate"] )) {
> +				$settings->setValue( "template", $data["blogTemplate"] );
> +			}
> +			if( isset( $data["blogShowMoreEnabled"] )) {
> +				$settings->setValue( "show_more_enabled", $data 
> ["blogShowMoreEnabled"] );
> +			}
> +			
> +			if( isset( $data["blogEnableHtmlarea"] )) {
> +				$settings->setValue( "htmlarea_enabled", $data 
> ["blogEnableHtmlarea"] );
> +			}
> +
> +			if( isset( $data["blogEnablePullDownMenu"] )) {
> +				$settings->setValue( "pull_down_menu_enabled", $data 
> ["blogEnablePullDownMenu"] );
> +			}
> +			
> +			if( isset( $data["blogCommentsEnabled"] )) {
> +				$settings->setValue( "comments_enabled", $data 
> ["blogCommentsEnabled"] );
> +			}
> +			
> +			if( isset( $data["blogShowFuturePosts"] )) {
> +				$settings->setValue( "show_future_posts_in_calendar", $data 
> ["blogShowFuturePosts"] );
> +			}
> +			
> +			if( isset( $data["blogFirstDayOfWeek"] )) {
> +				$settings->setValue( "first_day_of_week", $data 
> ["blogFirstDayOfWeek"] );
> +			}
> +			
> +			if( isset( $data["blogShowInSummary"] )) {
> +				$blog->setShowInSummary( $this->toBoolean( $data 
> ["blogShowInSummary"] ));
> +			}
> +			
> +			if( isset( $data["blogSendNotification"] )) {
> +				$settings->setValue( "default_send_notification", $data 
> ["blogSendNotification"] );
> +			}
> +			
> +			if( isset( $data["blogCommentsOrder"] )) {
> +				$settings->setValue( "comments_order", $data 
> ["blogCommentsOrder"] );
> +			}
> +			
> +			if( isset( $data["blogCategoriesOrder"] )) {
> +				$settings->setValue( "categories_order", $data 
> ["blogCategoriesOrder"] );
> +			}
> +			
> +			if( isset( $data["blogLinkCategoriesOrder"] )) {
> +				$settings->setValue( "link_categories_order", $data 
> ["blogLinkCategoriesOrder"] );
> +			}
> +			
> +			if( isset( $data["blogTimeOffset"] )) {
> +				$settings->setValue( "time_offset", $data["blogTimeOffset"] );
> +			}
> +
> +			$blog->setSettings( $settings );
> +			$blogs = new Blogs();
> +			return( $blogs->updateBlog( $blog ));
> +		}
> +		
> +		function getCurrentStep()
> +		{
> +			$curStep = HttpVars::getRequestValue( "curStep" );
> +			if( !$curStep || $curStep == "" )
> +				$curStep = 1;
> +				
> +			return( $curStep );
> +		}
> +		
> +		function getNextStep()
> +		{
> +			$curStep = $this->getCurrentStep();
> +			return( $curStep + 1 );
> +		}
> +		
> +		function perform()
> +		{
> +			// retrieve the data
> +			$newSettings = $this->retrieveData();
> +			
> +			// calculate how many blogs we've got and how many steps we need
> +			$blogs = new Blogs();
> +			$numBlogs = $blogs->getNumBlogs( BLOG_STATUS_ALL );			
> +			$curStep = $this->getCurrentStep();
> +			$numSteps = ceil( $numBlogs / MULTIBLOG_EDIT_NUM_BLOGS_PER_STEP );
> +			$nextStep = $this->getNextStep();
> +			
> +			// create the view and pass the values
> +			if( $this->getCurrentStep() >= $numSteps ) {
> +				// we're done!
> +				$this->_view = new DoMultiBlogEditView( $this->_blogInfo );
> +				$this->_view->setSuccessMessage( $this->_locale->tr 
> ( "multiblogedit_blogs_updated", $numBlogs ));
> +				$this->_view->setValue( "done", true );
> +				$this->_view->setValue( "numBlogs", $numBlogs );				
> +			}
> +			else {
> +				// process the blogs that should be processed in this step
> +				$processBlogs = $blogs->getAllBlogs( BLOG_STATUS_ALL,  
> ALL_BLOG_CATEGORIES, "", $curStep,  
> MULTIBLOG_EDIT_NUM_BLOGS_PER_STEP );
> +				foreach( $processBlogs as $blog ) {
> +					$this->updateBlog( $blog, $newSettings );
> +					CacheControl::resetBlogCache( $blog->getId(), false );
> +				}
> +				
> +				$this->_view = new DoMultiBlogEditView( $this->_blogInfo );
> +				$this->_view->setValue( "numBlogs", $numBlogs );
> +				$this->_view->setValue( "numSteps", $numSteps );
> +				//$this->_view->setValue( "curStep", $curStep );
> +				$this->_view->setValue( "curStep", $curStep + 1 );
> +				$this->_view->setValue( "settings", $newSettings );
> +				$this->_view->setValue( "done", false );
> +			}
> +			
> +			
> +			$this->setCommonData();
> +		}
> +	}
> +?>
> \ No newline at end of file
>
> Added: nonfree/plugins/trunk/multiblogedit/class/action/ 
> showmultiblogeditaction.class.php
> ===================================================================
> --- nonfree/plugins/trunk/multiblogedit/class/action/ 
> showmultiblogeditaction.class.php	2006-08-13 14:31:50 UTC (rev 3866)
> +++ nonfree/plugins/trunk/multiblogedit/class/action/ 
> showmultiblogeditaction.class.php	2006-08-13 14:40:50 UTC (rev 3867)
> @@ -0,0 +1,19 @@
> +<?php
> +
> +	include_once( PLOG_CLASS_PATH."class/action/admin/ 
> siteadminaction.class.php" );
> +	include_once( PLOG_CLASS_PATH."plugins/multiblogedit/class/view/ 
> showmultiblogeditview.class.php" );
> +	
> +	class ShowMultiBlogEditAction extends SiteAdminAction
> +	{
> +		function ShowMultiBlogEditAction( $actionInfo, $request )
> +		{
> +			$this->SiteAdminAction( $actionInfo, $request );
> +		}
> +		
> +		function perform()
> +		{
> +			$this->_view = new ShowMultiBlogEditView( $this->_blogInfo );
> +			$this->setCommonData();
> +		}
> +	}
> +?>
> \ No newline at end of file
>
> Added: nonfree/plugins/trunk/multiblogedit/class/view/ 
> domultiblogeditview.class.php
> ===================================================================
> --- nonfree/plugins/trunk/multiblogedit/class/view/ 
> domultiblogeditview.class.php	2006-08-13 14:31:50 UTC (rev 3866)
> +++ nonfree/plugins/trunk/multiblogedit/class/view/ 
> domultiblogeditview.class.php	2006-08-13 14:40:50 UTC (rev 3867)
> @@ -0,0 +1,15 @@
> +<?php
> +
> +	include_once( PLOG_CLASS_PATH."class/view/admin/ 
> adminplugintemplatedview.class.php" );
> +	include_once( PLOG_CLASS_PATH."class/locale/locales.class.php" );
> +	include_once( PLOG_CLASS_PATH."class/template/templatesets/ 
> templatesets.class.php" );
> +	include_once( PLOG_CLASS_PATH."class/dao/ 
> blogcategories.class.php" );
> +
> +	class DoMultiBlogEditView extends AdminPluginTemplatedView
> +	{
> +		function DoMultiBlogEditView( $blogInfo )
> +		{
> +			$this->AdminPluginTemplatedView( $blogInfo, "multiblogedit",  
> "doedit" );
> +		}		
> +	}
> +?>
> \ No newline at end of file
>
> Added: nonfree/plugins/trunk/multiblogedit/class/view/ 
> showmultiblogeditview.class.php
> ===================================================================
> --- nonfree/plugins/trunk/multiblogedit/class/view/ 
> showmultiblogeditview.class.php	2006-08-13 14:31:50 UTC (rev 3866)
> +++ nonfree/plugins/trunk/multiblogedit/class/view/ 
> showmultiblogeditview.class.php	2006-08-13 14:40:50 UTC (rev 3867)
> @@ -0,0 +1,32 @@
> +<?php
> +
> +	include_once( PLOG_CLASS_PATH."class/view/admin/ 
> adminplugintemplatedview.class.php" );
> +	include_once( PLOG_CLASS_PATH."class/locale/locales.class.php" );
> +	include_once( PLOG_CLASS_PATH."class/template/templatesets/ 
> templatesets.class.php" );
> +	include_once( PLOG_CLASS_PATH."class/dao/ 
> blogcategories.class.php" );
> +	include_once( PLOG_CLASS_PATH.'class/dao/blogstatus.class.php' );	
> +
> +	class ShowMultiBlogEditView extends AdminPluginTemplatedView
> +	{
> +		function ShowMultiBlogEditView( $blogInfo )
> +		{
> +			$this->AdminPluginTemplatedView( $blogInfo, "multiblogedit",  
> "editform" );
> +		}
> +		
> +		function render()
> +		{
> +			// get the available locales
> +			$this->setValue( "locales", Locales::getLocales());
> +			// the available template sets
> +			$ts = new TemplateSets();
> +			$this->setValue( "templates", $ts->getGlobalTemplateSets());
> +			// and the list of global categories
> +			$bc = new BlogCategories();
> +			$this->setValue( "categories", $bc->getBlogCategories());
> +			// list of blogs status
> +			$this->setValue( 'blogStatusList', BlogStatus::getStatusList 
> ());			
> +			
> +			parent::render();
> +		}
> +	}
> +?>
> \ No newline at end of file
>
> Added: nonfree/plugins/trunk/multiblogedit/ 
> pluginmultiblogedit.class.php
> ===================================================================
> --- nonfree/plugins/trunk/multiblogedit/ 
> pluginmultiblogedit.class.php	2006-08-13 14:31:50 UTC (rev 3866)
> +++ nonfree/plugins/trunk/multiblogedit/ 
> pluginmultiblogedit.class.php	2006-08-13 14:40:50 UTC (rev 3867)
> @@ -0,0 +1,29 @@
> +<?php
> +
> +	include_once( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
> +	
> +	class PluginMultiBlogEdit extends PluginBase
> +	{
> +	
> +		function PluginMultiBlogEdit()
> +		{			
> +			$this->PluginBase();
> +			
> +			$this->id = "multiblogedit";
> +			$this->desc = "Allows administrators to edit more than one blog  
> at the same time";
> +			$this->author = "The LifeType Project";
> +			
> +			// register our stuff
> +			$this->init();
> +		}
> +		
> +		function init()
> +		{
> +			// register the admin actions
> +			$this->registerAdminAction( "multiblogEdit",  
> "ShowMultiBlogEditAction" );
> +			$this->registerAdminAction( "doMultiBlogEdit",  
> "DoMultiBlogEditAction" );			
> +			// and the menu entries
> +			$this->addMenuEntry( "/menu/adminSettings/Blogs",  
> "multiBlogEdit", "?op=multiblogEdit", "Multi-blog Edit", false,  
> true );
> +		}
> +	}
> +?>
> \ No newline at end of file
>
> Added: nonfree/plugins/trunk/multiblogedit/templates/doedit.template
> ===================================================================
> --- nonfree/plugins/trunk/multiblogedit/templates/doedit.template	 
> 2006-08-13 14:31:50 UTC (rev 3866)
> +++ nonfree/plugins/trunk/multiblogedit/templates/doedit.template	 
> 2006-08-13 14:40:50 UTC (rev 3867)
> @@ -0,0 +1,31 @@
> +<p>
> +{if !$done}
> +Please wait...<br/>
> +Total number of blogs: {$numBlogs}<br/>
> +Total number of steps: {$numSteps}<br/>
> +Step: {$curStep}<br/>
> +</p>
> +<div style="display:none">
> +<form id="doEdit" name="doEdit" method="post">
> +  {foreach from=$settings key=name item=value}
> +    <input type="checkbox" name="set[{$name}]" value="1"  
> checked="checked" />
> +    <input type="text" name="{$name}" value="{$value}" />
> +  {/foreach}
> +
> + <input type="hidden" name="curStep" value="{$curStep}" />
> + <input type="hidden" name="op" value="doMultiBlogEdit" />
> +</form>
> +</div>
> +<script type="text/javascript">
> + document.doEdit.submit();
> +</script>
> +<b><a href="#" onclick="document.doEdit.submit()">Click here</a></ 
> b> if this page does not refresh automatically.
> +{else}
> +<p>
> +Done!
> +Total number of blogs processed: {$numBlogs}
> +</p>
> +<p>
> +<a href="#" onclick="window.close()">Close</a>	
> +</p>
> +{/if}
> \ No newline at end of file
>
> Added: nonfree/plugins/trunk/multiblogedit/templates/editform.template
> ===================================================================
> --- nonfree/plugins/trunk/multiblogedit/templates/editform.template	 
> 2006-08-13 14:31:50 UTC (rev 3866)
> +++ nonfree/plugins/trunk/multiblogedit/templates/editform.template	 
> 2006-08-13 14:40:50 UTC (rev 3867)
> @@ -0,0 +1,324 @@
> +{include file="$admintemplatepath/header.template"}
> +{include file="$admintemplatepath/navigation.template"  
> showOpt=multiBlogEdit title=$locale->tr("multiblogedit_plugin")}
> +{literal}
> +<script type="text/javascript">
> +function setChange(name)
> +{
> + cb = document.getElementById('set_' + name);
> + cb.checked = true;
> +}
> +function createTarget(t){
> +if( confirm('Are you sure you would like to modify the selected  
> blogs? Please be aware that this operation cannot be undone.')) {
> +	window.open("", t, "width=600,height=550");
> +	return true;
> +}
> +else
> +	return false;
> +}
> +</script>
> +{/literal}
> +<form name="multiblogEditForm" action="?op=doMultiBlogEdit"  
> method="post" onSubmit="createTarget(this.target)"  
> target="formtarget">
> + <fieldset class="inputField">
> + <legend>{$locale->tr("multiblogedit_plugin")}</legend>
> +
> + {include file="$admintemplatepath/successmessage.template"}
> + {include file="$admintemplatepath/errormessage.template"}
> +
> +  <div style="width:60%;float:left">
> +
> +   <div class="field">
> +    <input type="checkbox" class="checkbox" name="set[blogName]"  
> value="1" />
> +     <label for="blogName">{$locale->tr("name")}</label>
> +     <input type="text" name="blogName" id="blogName" style="width: 
> 100%" value="{$blogName}" />
> +     {include file="$admintemplatepath/validate.template"  
> field=blogName message=$locale->tr("error_empty_name")}
> +   </div>
> +
> +   {if $blogDomainsEnabled}
> +   <div class="field">
> +     <input type="checkbox" class="checkbox" name="set 
> [blogSubDomain]" value="1" />
> +     <label for="blogSubDomain">{$locale->tr("domain")}</label>
> +     <input type="text" name="blogSubDomain" id="blogSubDomain"  
> style="width:150px" value="{$blogSubDomain}" />
> +     <select name="blogMainDomain" id="blogMainDomain">
> +      {foreach from=$blogAvailableDomains item=domain}
> +       <option value="{$domain}"
> +            {if $domain == $blogMainDomain}selected{/if}>
> +            {if $domain == "?"}
> +              {$locale->tr("subdomains_any_domain")}
> +            {else}
> +              .{$domain}
> +            {/if}
> +       </option>
> +      {/foreach}
> +     </select>
> +     {include file="$admintemplatepath/validate.template"  
> field=blogSubDomain message=$locale->tr("error_invalid_subdomain")}
> +     {include file="$admintemplatepath/validate.template"  
> field=blogMainDomain message=$locale->tr("error_invalid_domain")}
> +   </div>
> +   {/if}
> +
> +   <div class="field">
> +     <input type="checkbox" class="checkbox" name="set[blogAbout]"  
> value="1" />
> +     <label for="blogAbout">{$locale->tr("description")}</label>
> +     <textarea rows="10" style="width:100%" id="blogAbout"  
> name="blogAbout">{$blogAbout}</textarea>
> +   </div>
> +
> +   <div class="field">
> +    <input type="checkbox" class="checkbox" name="set[blogStatus]"  
> value="1" />
> +    <label for="blogStatus">{$locale->tr("status")}</label>
> +    <br/>
> +     <select name="blogStatus" id="blogStatus">
> +	{foreach from=$blogStatusList key=statusName item=blogStatusValue}
> +	 <option value="{$blogStatusValue}">{$locale->tr($statusName)}</ 
> option>
> +	{/foreach}
> +      </select>
> +   </div>
> +
> +   <div class="field">
> +     <input type="checkbox" class="checkbox" name="set[blogOwner]"  
> value="1" />	
> +     <label for="blogOwner">{$locale->tr("owner")}</label>
> +      <br/>
> +	  <input type="hidden" id="userId" name="blogOwner" value="" />
> +	  <input type="text" id="userName" name="userName" value=""  
> style="width:50%"/>
> +	  <a href="#" onclick="window.open('? 
> op=siteUsersChooser','UserChooser','scrollbars=yes,resizable=yes,toolb 
> ar=no,height=450,width=600');">
> +	   {$locale->tr("select")}
> +	  </a>
> +   </div>	
> +
> +   <div class="field">
> +    <input type="checkbox" class="checkbox" name="set[blogLocale]"  
> value="1" />
> +    <label for="blogLocale">{$locale->tr("language")}</label>
> +	<br/>
> +    <select name="blogLocale" id="blogLocale">
> +     {foreach from=$locales item=localeobject}
> +      <option value="{$localeobject->getLocaleCode()}">
> +	     {$localeobject->getDescription()} ({$localeobject- 
> >getLocaleCode()} {$localeobject->getCharset()})
> +	   </option>
> +     {/foreach}
> +     </select>
> +     {include file="$admintemplatepath/validate.template"  
> field=blogLocale message=$locale->tr("error_invalid_locale")}
> +   </div>
> +	
> +   <div class="field">
> +    <input type="checkbox" class="checkbox" name="set 
> [blogCategory]" value="1" />
> +    <label for="blogLocale">{$locale->tr("blog_category")}</label>
> +	<br/>
> +    <select name="blogCategory" id="blogCategory">
> +	  <option value="0">{$locale->tr("none")}</option>
> +     {foreach from=$categories item=category}
> +      <option value="{$category->getId()}" {if $category->getId()== 
> $blogCategory} selected="selected" {/if}>
> +	    {$category->getName()}
> +	   </option>
> +     {/foreach}
> +     </select>
> +     {include file="$admintemplatepath/validate.template"  
> field=blogCategory message=$locale->tr("error_invalid_blog_category")}
> +   </div>
> +	
> +
> +   <div class="field">
> +    <input type="checkbox" class="checkbox" name="set 
> [blogMaxMainPageItems]" value="1" />
> +    <label for="blogMaxMainPageItems">{$locale->tr 
> ("max_main_page_items")}</label>
> +    <input type="text" name="blogMaxMainPageItems"  
> id="blogMaxMainPageItems" value="{$blogMaxMainPageItems}"/>
> +   </div>
> +
> +   <div class="field">
> +    <input type="checkbox" class="checkbox" name="set 
> [blogMaxRecentItems]" value="1" />
> +    <label for="blogMaxRecentItems">{$locale->tr 
> ("max_recent_items")}</label>
> +    <input type="text" name="blogMaxRecentItems"  
> id="blogMaxRecentItems" value="{$blogMaxRecentItems}" />
> +   </div>
> +
> +   <div class="field">
> +    <input type="checkbox" class="checkbox" name="set 
> [blogTemplate]" value="1" />
> +    <label for="blogTemplate">{$locale->tr("template")}</label>
> +	<br/>
> +    <select name="blogTemplate" id="blogTemplate">
> +      {foreach from=$templates item=template}
> +       <option value="{$template->getName()}">{$template->getName 
> ()}</option>
> +      {/foreach}
> +     </select>
> +     <a href="javascript:openTemplateChooserWindow();">{$locale->tr 
> ("choose")}...</a>
> +    </div>
> +
> +    <div class="field">
> +    <input type="checkbox" class="checkbox" name="set 
> [blogShowMoreEnabled]" value="1" />
> +     <label for="blogShowMoreEnabled">{$locale->tr 
> ("use_read_more")}</label>
> +     <div class="formHelp">
> +	    <input class="checkbox" type="checkbox" value="1"  
> name="blogShowMoreEnabled" id="blogShowMoreEnabled" {if  
> $blogShowMoreEnabled == true} checked="checked" {/if} />
> +	{$locale->tr("enable")}
> +     </div>
> +    </div>
> +
> +    <div class="field">
> +    <input type="checkbox" class="checkbox" name="set 
> [blogEnableHtmlarea]" value="1" />
> +     <label for="blogEnableHtmlArea">{$locale->tr 
> ("enable_wysiwyg")}</label>
> +     <div class="formHelp">
> +	    <input class="checkbox" type="checkbox"  
> id="blogEnableHtmlarea" name="blogEnableHtmlarea" value="1" {if  
> $blogEnableHtmlarea == true} checked="checked" {/if} />
> +	{$locale->tr("enable")}
> +     </div>
> +    </div>
> +
> +    <div class="field">
> +    <input type="checkbox" class="checkbox" name="set 
> [blogEnablePullDownMenu]" value="1" />
> +     <label for="blogEnablePullDownMenu">{$locale->tr 
> ("enable_pull_down_menu")}</label>
> +     <div class="formHelp">
> +	    <input class="checkbox" type="checkbox"  
> id="blogEnablePullDownMenu" name="blogEnablePullDownMenu"  
> value="1" {if $blogEnablePullDownMenu == true} checked="checked" {/ 
> if} />
> +	 {$locale->tr("enable")}
> +     </div>
> +    </div>
> +
> +    <!-- disabled for the time being -->
> +    <input class="radio" type="hidden"  
> name="blogEnableAutosaveDrafts" value="0" />
> +
> +    <div class="field">
> +    <input type="checkbox" class="checkbox" name="set 
> [blogCommentsEnabled]" value="1" />
> +     <label for="blogCommentsEnabled">{$locale->tr 
> ("enable_comments")}</label>
> +     <div class="formHelp">
> +	    <input class="checkbox" type="checkbox"  
> name="blogCommentsEnabled" id="blogCommentsEnabled" value="1" {if  
> $blogCommentsEnabled == true} checked="checked" {/if} />
> +	{$locale->tr("enable")}
> +     </div>
> +    </div>
> +
> +    <div class="field">
> +     <input type="checkbox" class="checkbox" name="set 
> [blogShowFuturePosts]" value="1" />
> +     <label for="blogShowFuturePosts">{$locale->tr 
> ("show_future_posts")}</label>
> +     <div class="formHelp">
> +       <input class="checkbox" type="checkbox"  
> name="blogShowFuturePosts" id="blogShowFuturePosts" value="1" {if  
> $blogShowFuturePosts == true} checked="checked" {/if} />
> +      {$locale->tr("enable")}	
> +	  </div>
> +   </div>
> +
> +    <div class="field">
> +     <input type="checkbox" class="checkbox" name="set 
> [blogFirstDayOfWeek]" value="1" />
> +     <label for="blogFirstDayOfWeek">{$locale->tr 
> ("first_day_of_week_label")}</label>
> +	<br/>
> +     <select name="blogFirstDayOfWeek" id="blogFirstDayOfWeek">
> +      <option value="0" {if $blogFirstDayOfWeek == 0 }  
> selected="selected" {/if}>{$locale->tr("Sunday")}</option>
> +      <option value="1" {if $blogFirstDayOfWeek == 1 }  
> selected="selected" {/if}>{$locale->tr("Monday")}</option>
> +     </select>
> +   </div>
> +	
> +    <div class="field">
> +     <input type="checkbox" class="checkbox" name="set 
> [blogShowInSummary]" value="1" />
> +     <label for="blogShowInSummary">{$locale->tr 
> ("show_in_summary")}</label>
> +     <div class="formHelp">
> +       <input class="checkbox" type="checkbox"  
> name="blogShowInSummary" id="blogShowInSummary" value="1" {if  
> $blogShowInSummary == true} checked="checked" {/if} />
> +	{$locale->tr("enable")}
> +	  </div>
> +   </div>
> +
> +    <div class="field">
> +     <input type="checkbox" class="checkbox" name="set 
> [blogSendNotification]" value="1" />
> +     <label for="blogSendNotification">{$locale->tr 
> ("default_send_notification")}</label>
> +     <div class="formHelp">
> +       <input class="checkbox" type="checkbox"  
> name="blogSendNotification" id="blogSendNotification" value="1" {if  
> $blogSendNotification == true} checked="checked" {/if} />
> +     {$locale->tr("enable")}
> +	  </div>
> +   </div>
> +
> +   <div class="field">
> +    <input type="checkbox" class="checkbox" name="set 
> [blogCommentsOrder]" value="1" />
> +    <label for="blogCommentsOrder">{$locale->tr("comments_order")} 
> </label>
> +	<br/>
> +    <select name="blogCommentsOrder" id="blogCommentsOrder">
> +      <option value="1" {if $blogCommentsOrder == 1 }  
> selected="selected" {/if}>{$locale->tr("oldest_first")}</option>
> +      <option value="2" {if $blogCommentsOrder == 2 }  
> selected="selected" {/if}>{$locale->tr("newest_first")}</option>
> +     </select>
> +   </div>
> +
> +   <div class="field">
> +    <input type="checkbox" class="checkbox" name="set 
> [blogCategoriesOrder]" value="1" />
> +    <label for="blogCategoriesOrder">{$locale->tr 
> ("categories_order")}</label>
> +	<br/>
> +    <select name="blogCategoriesOrder" id="blogCategoriesOrder">
> +      <option value="1" {if $blogCategoriesOrder == 1 }  
> selected="selected" {/if}>{$locale->tr("most_recent_updated_first")} 
> </option>	
> +      <option value="2" {if $blogCategoriesOrder == 2 }  
> selected="selected" {/if}>{$locale->tr("oldest_first")}</option>
> +      <option value="3" {if $blogCategoriesOrder == 3 }  
> selected="selected" {/if}>{$locale->tr("newest_first")}</option>	
> +      <option value="4" {if $blogCategoriesOrder == 4 }  
> selected="selected" {/if}>{$locale->tr("alphabetical_order")}</option>
> +      <option value="5" {if $blogCategoriesOrder == 5 }  
> selected="selected" {/if}>{$locale->tr 
> ("reverse_alphabetical_order")}</option>
> +      <option value="6" {if $blogCategoriesOrder == 6 }  
> selected="selected" {/if}>{$locale->tr("most_articles_first")}</ 
> option>
> +     </select>
> +   </div>
> +
> +   <div class="field">
> +    <input type="checkbox" class="checkbox" name="set 
> [blogLinkCategoriesOrder]" value="1" />
> +    <label for="blogLinkCategoriesOrder">{$locale->tr 
> ("link_categories_order")}</label>
> +	<br/>
> +    <select name="blogLinkCategoriesOrder"  
> id="blogLinkCategoriesOrder">
> +      <option value="1" {if $blogLinkCategoriesOrder == 1 }  
> selected="selected" {/if}>{$locale->tr("alphabetical_order")}</option>
> +      <option value="2" {if $blogLinkCategoriesOrder == 2 }  
> selected="selected" {/if}>{$locale->tr 
> ("reverse_alphabetical_order")}</option>
> +      <option value="3" {if $blogLinkCategoriesOrder == 3 }  
> selected="selected" {/if}>{$locale->tr("most_links_first")}</option>
> +      <option value="4" {if $blogLinkCategoriesOrder == 4 }  
> selected="selected" {/if}>{$locale->tr("most_links_last")}</option>	
> +      <option value="5" {if $blogLinkCategoriesOrder == 5 }  
> selected="selected" {/if}>{$locale->tr("most_recent_updated_first")} 
> </option>	  	
> +     </select>
> +   </div>
> +
> +   <div class="field">
> +    <input type="checkbox" class="checkbox" name="set 
> [blogTimeOffset]" value="1" />
> +    <label for="blogTimeOffset">{$locale->tr("time_offset")}</label>
> +	<br/>
> +     <select name="blogTimeOffset" id="blogTimeOffset">
> +      <option {if $blogTimeOffset == -20} selected="selected"{/if}  
> value="-20">-20 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == -19} selected="selected"{/if}  
> value="-19">-19 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == -18} selected="selected"{/if}  
> value="-18">-18 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == -17} selected="selected"{/if}  
> value="-17">-17 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == -16} selected="selected"{/if}  
> value="-16">-16 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == -15} selected="selected"{/if}  
> value="-15">-15 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == -14} selected="selected"{/if}  
> value="-14">-14 {$locale->tr("hours")}</option>	   	   	   	
> +      <option {if $blogTimeOffset == -13} selected="selected"{/if}  
> value="-13">-13 {$locale->tr("hours")}</option>	
> +      <option {if $blogTimeOffset == -12} selected="selected"{/if}  
> value="-12">-12 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == -11} selected="selected"{/if} 
> value="-11">-11 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == -10} selected="selected"{/if} 
> value="-10">-10 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == -9} selected="selected"{/if} 
> value="-9">-9 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == -8} selected="selected"{/if} 
> value="-8">-8 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == -7} selected="selected"{/if} 
> value="-7">-7 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == -6} selected="selected"{/if} 
> value="-6">-6 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == -5} selected="selected"{/if} 
> value="-5">-5 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == -4} selected="selected"{/if} 
> value="-4">-4 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == -3} selected="selected"{/if} 
> value="-3">-3 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == -2} selected="selected"{/if} 
> value="-2">-2 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == -1} selected="selected"{/if} 
> value="-1">-1 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == 0} selected="selected"{/if} 
> value="0">0 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == 1} selected="selected"{/if} 
> value="1">+1 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == 2} selected="selected"{/if} 
> value="2">+2 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == 3} selected="selected"{/if} 
> value="3">+3 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == 4} selected="selected"{/if} 
> value="4">+4 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == 5} selected="selected"{/if} 
> value="5">+5 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == 6} selected="selected"{/if} 
> value="6">+6 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == 7} selected="selected"{/if} 
> value="7">+7 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == 8} selected="selected"{/if} 
> value="8">+8 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == 9} selected="selected"{/if} 
> value="9">+9 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == 10} selected="selected"{/if} 
> value="10">+10 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == 11} selected="selected"{/if} 
> value="11">+11 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == 12} selected="selected"{/if} 
> value="12">+12 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == 13} selected="selected"{/if}  
> value="13">+13 {$locale->tr("hours")}</option>	
> +      <option {if $blogTimeOffset == 14} selected="selected"{/if}  
> value="14">+14 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == 15} selected="selected"{/if}  
> value="15">+15 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == 16} selected="selected"{/if}  
> value="16">+16 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == 17} selected="selected"{/if}  
> value="17">+17 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == 18} selected="selected"{/if}  
> value="18">+18 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == 19} selected="selected"{/if}  
> value="19">+19 {$locale->tr("hours")}</option>
> +      <option {if $blogTimeOffset == 20} selected="selected"{/if}  
> value="20">+20 {$locale->tr("hours")}</option>	
> +     </select>
> +	 </div>
> +	
> +    <div class="field">
> +     <input type="checkbox" class="checkbox" name="set 
> [blogResourcesQuota]" value="1" />	
> +     <label for="blogResourcesQuota">{$locale->tr("quota")}</label>
> +     <input type="text" id="blogResourcesQuota"  
> name="blogResourcesQuota" value="" />
> +    </div>	
> +
> +   </div>
> +
> + <div>
> +<select id="blogList" name="blogs[]" size="10" multiple="multiple"  
> style="width:40%">
> +</select><br/>
> +<a href="#" onclick="window.open('? 
> op=siteBlogsChooser&mode=2','BlogChooser','scrollbars=yes,resizable=ye 
> s,toolbar=no,height=450,width=600');">Add</a>
> + </div>
> +
> + </fieldset>
> + <div class="buttons">
> +  <input type="hidden" name="op" value="doMultiBlogEdit" />
> +  <input type="reset" name="{$locale->tr("reset")}" />
> +  <input type="submit" name="{$locale->tr("settings")}"  
> value="{$locale->tr("update")}" />
> + </div>
> +</form>
> +{include file="$admintemplatepath/footernavigation.template"}
> +{include file="$admintemplatepath/footer.template"}3
> \ No newline at end of file
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>



More information about the pLog-svn mailing list