2008-01-22 Thomas Hempel <thomas@typo3-unleashed.net>
+ * Installer: Added a "hide" button to hide the results of executed methods
+ * Installer: Added skeletons for gfx check methods
* Installer: improved the look of the login screen
* Installer: Smaller bugfixes and enhancements in error handling
}
}
+function hideElement(elementId) {
+ // hide the element
+ new Effect.BlindUp(elementId, {duration: 0.3});
+
+ // hide the "hide" button
+ $('hideBtn_'+elementId).style.display = 'none';
+}
function toggleAllLeafs() {
var iconUrl = expandSrc;
function displayMethodResult(data) {
console.debug(data);
if (data.request.parameters.target) {
+ // display result
$(data.request.parameters.target).innerHTML = data.responseText;
+
+ // show the "hide" button
+ console.debug($('hideBtn_'+data.request.parameters.target));
+ $('hideBtn_'+data.request.parameters.target).style.display = 'inline';
} else {
// console.debug(data.responseText);
}
*/
class tx_install_module_gfx extends tx_install_module_base {
+ /**
+ * This returns an overview over the current gfx settings.
+ *
+ * @return XHTML
+ */
public function overview() {
+ /**
+ * ATTENTION! This ist just a copy and paste from old installer!!! Please use this as inspiration. ;-)
+ */
+ $im_path = $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path'];
+ if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5'] == 'gm') {
+ $im_path_version = $this->config_array['im_versions'][$im_path]['gm'];
+ } else {
+ $im_path_version = $this->config_array['im_versions'][$im_path]['convert'];
+ }
+ $im_path_lzw = $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw'];
+ $im_path_lzw_version = $this->config_array['im_versions'][$im_path_lzw]['convert'];
+
+ $msg = '
+ ImageMagick enabled: <strong>'.$GLOBALS['TYPO3_CONF_VARS']['GFX']['im'].'</strong>
+ ImageMagick path: <strong>'.$im_path.'</strong> ('.$im_path_version.')
+ ImageMagick path/LZW: <strong>'.$im_path_lzw.'</strong> ('.$im_path_lzw_version.')
+ Version 5/GraphicsMagick flag: <strong>'.$GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5'].'</strong>
+
+ GDLib enabled: <strong>'.$GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib'].'</strong>
+ GDLib using PNG: <strong>'.$GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png'].'</strong>
+ GDLib 2 enabled: <strong>'.$GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_2'].'</strong>
+ IM5 effects enabled: <strong>'.$GLOBALS['TYPO3_CONF_VARS']['GFX']['im_v5effects'].'</strong> (Blurring/Sharpening with IM 5+)
+ Freetype DPI: <strong>'.$GLOBALS['TYPO3_CONF_VARS']['GFX']['TTFdpi'].'</strong> (Should be 96 for Freetype 2)
+ Mask invert: <strong>'.$GLOBALS['TYPO3_CONF_VARS']['GFX']['im_imvMaskState'].'</strong> (Should be set for some IM versions approx. 5.4+)
+
+ File Formats: <strong>'.$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'].'</strong>
+ ';
+
+ return $msg;
+ }
+
+ /**
+ * Checks with image formats can be read.
+ *
+ * @return unknown
+ */
+ public function readingImageFormats() {
+ return 'readingImageFormats';
+ }
+
+ /**
+ * Tests if GIF and PNG files can be written
+ *
+ * @return unknown
+ */
+ public function writingGIFandPNG() {
+ return 'writingGIFandPNG';
+ }
+
+ /**
+ * Tests if images will be scaled correctly
+ *
+ * @return unknown
+ */
+ public function scalingImages() {
+ return 'scalingImages';
+ }
+
+ /**
+ * Tests if combining images works.
+ *
+ * @return unknown
+ */
+ public function combiningImages() {
+ return 'combiningImages';
+ }
+
+ /**
+ * Tests the GD library function like FreeType etc.
+ *
+ * @return unknown
+ */
+ public function gdLibraryFunctions() {
+ return 'gdLibraryFunctions';
}
}
'categorySub' => 'checks',
'method' => 'gfx:overview',
'autostart' => true
+ ),
+
+ 'gfxReadingImageFormats' => array (
+ 'categoryMain' => 'gfx',
+ 'categorySub' => 'checks',
+ 'method' => 'gfx:readingImageFormats',
+ ),
+
+ 'gfxWritingGIFandPNG' => array (
+ 'categoryMain' => 'gfx',
+ 'categorySub' => 'checks',
+ 'method' => 'gfx:writingGIFandPNG',
+ ),
+
+ 'gfxScalingImages' => array (
+ 'categoryMain' => 'gfx',
+ 'categorySub' => 'checks',
+ 'method' => 'gfx:scalingImages',
+ ),
+
+ 'gfxCombiningImages' => array (
+ 'categoryMain' => 'gfx',
+ 'categorySub' => 'checks',
+ 'method' => 'gfx:combiningImages',
+ ),
+
+ 'gfxGDLibraryFunctions' => array (
+ 'categoryMain' => 'gfx',
+ 'categorySub' => 'checks',
+ 'method' => 'gfx:gdLibraryFunctions',
)
)
);
</label>
<label index="title_gfxOverview">Image Processing</label>
- <label index="description_gfxOverview">
+ <label index="help_gfxOverview">
<strong>Verifying the image processing capabilities of your server</strong><br/>
This page performs image processing and displays the result. It's a thorough check that everything you've configured is working correctly.<br/>
It's quite simple to verify your installation; Just look down the page, the images in pairs should look like each other. If some images are not alike, something is wrong. You may also notice warnings and errors if this tool found signs of any problems.<br/>
$this->pObj->getBasicsObject()->loadModule($mod);
$helpData = $this->pObj->getViewObject()->renderHelp($this->get_LL($modConfig['help']), $name);
- $descr = $this->pObj->getViewObject()->renderTag('div', $this->get_LL($modConfig['description']));
+ $descr = $this->pObj->getViewObject()->renderTag('div', $this->get_LL($modConfig['description']), array('class' => 'description'));
$deliverableContent = '';
switch ($deliverable) {
case 'methods':
// the result of methods is simply printed out
$target = $name.'_result';
+ $hideButton = '<span style="display:none" id="hideBtn_'.$target.'"> [<a href="#" onclick="hideElement(\''.$target.'\');">'.$this->get_LL('label_hide').'</a>]</span>';
+
if ($modConfig['autostart'] == true) {
+ $headerContent = $hideButton;
$deliverableContent = '<div id="'.$target.'">'.$this->basicsObject->executeMethod($modConfig['method']).'</div>';
} else {
list($module, $method) = t3lib_div::trimExplode(':', $modConfig['method']);
- $headerContent = ' [<a href="#" onclick="executeMethod(\''.$module.'\', \''.$method.'\', {target:\''.$target.'\'}, displayMethodResult)">'.$this->get_LL('label_execute').'</a>]';
+ $headerContent = ' [<a href="#" onclick="executeMethod(\''.$module.'\', \''.$method.'\', {target:\''.$target.'\'}, displayMethodResult)">'.$this->get_LL('label_execute').'</a>]'.$hideButton;
$deliverableContent = '<div id="'.$target.'">'.$deliverableContent.'</div>';
}
break;
<label index="label_value_modified">%s modfied (new value: %s)</label>
<label index="label_path">path:</label>
<label index="label_default">default value:</label>
+
+ <label index="label_execute">Exceute</label>
+ <label index="label_hide">Hide</label>
<label index="msg_searchResultMessage"><strong>%d</strong> results found for "%s"</label>
</languageKey>
border-bottom: 1px #c0c0c0 dashed;
}
+p {
+ margin: 10px 0;
+}
+
fieldset legend {
font-weight: bold;
}
-input.bg, select.bg, button.bg {
+input.bg, select.bg, button {
background: #fff url(../../../imgs/icons/bg_input.gif) no-repeat scroll left top;
border: 1px solid #aaa;
margin-top: 2px;
margin: 0px 0px 7px 20px;
}
-.error-header {
- font-weight: bold;
- color: red;
- margin: 5px;
-}
-
.categoryTreeContainer {
position: fixed;
top: 5px;
.help_container {
border-bottom: 3px gray solid;
- width: 100%;
+ width: 600px;
opacity: 0.9;
- background-color: yellow;
+ background-color: #cccccc;
padding: 5px;
- font-size: 1.2em;
position: absolute;
}
}
/** error messages **/
+.error-header {
+ font-weight: bold;
+ color: red;
+ margin: 5px;
+}
.severity_ok strong.message-header {
background-image: url('../../../imgs/icons/ok.png');