diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2006-09-10 21:16:39 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2006-09-10 21:16:39 +0000 |
| commit | ac01ccf0008df838ab14afb2fc39926b4d096580 (patch) | |
| tree | eaef540a47368fec78538148bf92768a7e1bdc75 | |
| parent | b1b42abcbe6a8ff9eec87523caba474f77e60c8d (diff) | |
| download | liberty-ac01ccf0008df838ab14afb2fc39926b4d096580.tar.gz liberty-ac01ccf0008df838ab14afb2fc39926b4d096580.tar.bz2 liberty-ac01ccf0008df838ab14afb2fc39926b4d096580.zip | |
clean up, move around and consolidate tonnes of crappy and complicated core admin pages
| -rw-r--r-- | admin/admin_liberty_inc.php | 16 | ||||
| -rw-r--r-- | templates/admin_liberty.tpl | 84 |
2 files changed, 57 insertions, 43 deletions
diff --git a/admin/admin_liberty_inc.php b/admin/admin_liberty_inc.php index 09c764d..fe15b74 100644 --- a/admin/admin_liberty_inc.php +++ b/admin/admin_liberty_inc.php @@ -1,11 +1,21 @@ <?php $formLibertyFeatures = array( - "liberty_quota" => array( + "liberty_cache_pages" => array( + 'label' => 'External page cache', + 'note' => 'Enabling this will download and cache external pages that are included.', + ), + "liberty_cache_images" => array( + 'label' => 'External image cache', + 'note' => 'Enabling this will download and cache external images that are included.', + ), +); +if( $gBitSystem->isPackageActive( 'quota' ) ) { + $formLibertyFeatures['liberty_quota'] = array( 'label' => 'Quota Usage System', 'note' => 'Limit users\' disk usage.', 'page' => '', - ), -); + ); +} $gBitSmarty->assign( 'formLibertyFeatures', $formLibertyFeatures ); $formImageFeatures = array( diff --git a/templates/admin_liberty.tpl b/templates/admin_liberty.tpl index 4518521..8ce629f 100644 --- a/templates/admin_liberty.tpl +++ b/templates/admin_liberty.tpl @@ -27,6 +27,26 @@ {formhelp note="List of allowed HTML tags. All other tags will be stripped when users save content. This will affect all format plugins."} {/forminput} </div> + + <div class="row"> + {formlabel label="Liberty Cache" for="liberty_cache"} + {forminput} + <select id="liberty_cache" name="liberty_cache"> + <option value="0" {if $gBitSystem->getConfig('liberty_cache') eq 0} selected="selected"{/if}>0 {tr}(no cache){/tr}</option> + <option value="60" {if $gBitSystem->getConfig('liberty_cache') eq 60} selected="selected"{/if}>1 {tr}minute{/tr}</option> + <option value="300" {if $gBitSystem->getConfig('liberty_cache') eq 300} selected="selected"{/if}>5 {tr}minutes{/tr}</option> + <option value="600" {if $gBitSystem->getConfig('liberty_cache') eq 600} selected="selected"{/if}>10 {tr}minutes{/tr}</option> + <option value="900" {if $gBitSystem->getConfig('liberty_cache') eq 900} selected="selected"{/if}>15 {tr}minutes{/tr}</option> + <option value="1800" {if $gBitSystem->getConfig('liberty_cache') eq 1800} selected="selected"{/if}>30 {tr}minutes{/tr}</option> + <option value="3600" {if $gBitSystem->getConfig('liberty_cache') eq 3600} selected="selected"{/if}>1 {tr}hour{/tr}</option> + <option value="7200" {if $gBitSystem->getConfig('liberty_cache') eq 7200} selected="selected"{/if}>2 {tr}hours{/tr}</option> + <option value="14400" {if $gBitSystem->getConfig('liberty_cache') eq 14400} selected="selected"{/if}>4 {tr}hours{/tr}</option> + <option value="28800" {if $gBitSystem->getConfig('liberty_cache') eq 28800} selected="selected"{/if}>8 {tr}hours{/tr}</option> + <option value="60480" {if $gBitSystem->getConfig('liberty_cache') eq 60480} selected="selected"{/if}>1 {tr}day{/tr}</option> + </select> + {formhelp note='Cache all parsed content. This will dramatically reduce load on the server if pages are called frequently.' page=''} + {/forminput} + </div> {/legend} {legend legend="Image Processing System"} @@ -36,14 +56,16 @@ {formfeedback warning='The GD library is not installed. For newer Linux systems (Fedora, etc.), you need to install the php-gd RPM with a command such as "yum install php-gd".'} {/if} <div class="row"> - {formlabel label=" - <a href='http://www.boutell.com/gd/'> - <img class='icon' src=\"`$smarty.const.LIBERTY_PKG_URL`icons/gd_logo.jpg\" alt='GD' /> - </a> - "} + {formlabel label="GD library" for="gd"} {forminput} <label> - <input type="radio" name="image_processor" value="gd" {if !$gdInstalled}disabled="disabled"{/if} {if !$gBitSystem->getConfig('image_processor') || $gBitSystem->getConfig('image_processor')=='gd'}checked="checked"{/if} /> gdLibrary + <input type="radio" id="gd" name="image_processor" value="gd" {if !$gdInstalled}disabled="disabled"{/if} {if !$gBitSystem->getConfig('image_processor') || $gBitSystem->getConfig('image_processor')=='gd'}checked="checked"{/if} /> + <br /> + {if !$gdInstalled} + {biticon ipackage=icons iname="large/image-missing" iexplain="Not Installed"} + {else} + {biticon ipackage=icons iname="large/image-x-generic" iexplain="Installed"} + {/if} </label> {/forminput} </div> @@ -53,14 +75,16 @@ {formfeedback warning='To use MagickWand, you need to install the magickwand php extension. Unix and Windows users can find source code at <a href="http://www.magickwand.org/download/php/">the ImageMagick downloads website.</a>.'} {/if} <div class="row"> - {formlabel label=" - <a href='http://www.imagemagick.org/'> - <img class='icon' src=\"`$smarty.const.LIBERTY_PKG_URL`icons/imagick_logo.jpg\" alt='ImageMagick' /> - </a> - "} + {formlabel label="MagickWand" for="wand"} {forminput} <label> - <input type="radio" name="image_processor" value="magickwand" {if !$magickwandInstalled}disabled="disabled"{/if} {if $gBitSystem->getConfig('image_processor')=='magickwand'}checked="checked"{/if}/> ImageMagick's MagickWand + <input type="radio" id="wand" name="image_processor" value="magickwand" {if !$magickwandInstalled}disabled="disabled"{/if} {if $gBitSystem->getConfig('image_processor')=='magickwand'}checked="checked"{/if}/> + <br /> + {if !$magickwandInstalled} + {biticon ipackage=icons iname="large/image-missing" iexplain="Not Installed"} + {else} + {biticon ipackage=icons iname="large/image-x-generic" iexplain="Installed"} + {/if} </label> {/forminput} </div> @@ -70,14 +94,16 @@ {formfeedback warning='php-imagick is a no longer supported PECL extension for PHP + ImageMagick. We recommend using the much better supported magickwand option above. If you need to install the php-imagick extension, linux users can find RPM files at <a href="http://phprpms.sourceforge.net/imagick">PHPRPMs</a> (or compile a <a href="http://sourceforge.net/project/showfiles.php?group_id=112092&package_id=139307&release_id=292417">source rpm</a>). Windows users can try <a href="http://www.bitweaver.org/builds/php_imagick.dll">this dll</a> however it has not been tested well.'} {/if} <div class="row"> - {formlabel label=" - <a href='http://www.imagemagick.org/'> - <img class='icon' src=\"`$smarty.const.LIBERTY_PKG_URL`icons/imagick_logo.jpg\" alt='ImageMagick' /> - </a> - "} + {formlabel label="ImageMagick" for="magick"} {forminput} <label> - <input type="radio" name="image_processor" value="imagick" {if !$imagickInstalled}disabled="disabled"{/if} {if $gBitSystem->getConfig('image_processor')=='imagick'}checked="checked"{/if}/> php-imagick + <input type="radio" id="magick" name="image_processor" value="imagick" {if !$imagickInstalled}disabled="disabled"{/if} {if $gBitSystem->getConfig('image_processor')=='imagick'}checked="checked"{/if}/> + <br /> + {if !$imagickInstalled} + {biticon ipackage=icons iname="large/image-missing" iexplain="Not Installed"} + {else} + {biticon ipackage=icons iname="large/image-x-generic" iexplain="Installed"} + {/if} </label> {/forminput} </div> @@ -93,28 +119,6 @@ {/foreach} {/legend} - {legend legend="Liberty Caching"} - <div class="row"> - {formlabel label="Liberty Cache" for="liberty_cache"} - {forminput} - <select id="liberty_cache" name="liberty_cache"> - <option value="0" {if $gBitSystem->getConfig('liberty_cache') eq 0} selected="selected"{/if}>0 {tr}(no cache){/tr}</option> - <option value="60" {if $gBitSystem->getConfig('liberty_cache') eq 60} selected="selected"{/if}>1 {tr}minute{/tr}</option> - <option value="300" {if $gBitSystem->getConfig('liberty_cache') eq 300} selected="selected"{/if}>5 {tr}minutes{/tr}</option> - <option value="600" {if $gBitSystem->getConfig('liberty_cache') eq 600} selected="selected"{/if}>10 {tr}minutes{/tr}</option> - <option value="900" {if $gBitSystem->getConfig('liberty_cache') eq 900} selected="selected"{/if}>15 {tr}minutes{/tr}</option> - <option value="1800" {if $gBitSystem->getConfig('liberty_cache') eq 1800} selected="selected"{/if}>30 {tr}minutes{/tr}</option> - <option value="3600" {if $gBitSystem->getConfig('liberty_cache') eq 3600} selected="selected"{/if}>1 {tr}hour{/tr}</option> - <option value="7200" {if $gBitSystem->getConfig('liberty_cache') eq 7200} selected="selected"{/if}>2 {tr}hours{/tr}</option> - <option value="14400" {if $gBitSystem->getConfig('liberty_cache') eq 14400} selected="selected"{/if}>4 {tr}hours{/tr}</option> - <option value="28800" {if $gBitSystem->getConfig('liberty_cache') eq 28800} selected="selected"{/if}>8 {tr}hours{/tr}</option> - <option value="60480" {if $gBitSystem->getConfig('liberty_cache') eq 60480} selected="selected"{/if}>1 {tr}day{/tr}</option> - </select> - {formhelp note='Cache all parsed content. This will dramatically reduce load on the server if pages are called frequently.' page=''} - {/forminput} - </div> - {/legend} - <div class="row submit"> <input type="submit" name="change_prefs" value="{tr}Change preferences{/tr}" /> </div> |
