@smiley: How much content do you have and how big the original images are?
<br />Options +FollowSymlinks<br />RewriteEngine On<br />RewriteBase /<br /><br /># Fix Apache internal dummy connections from breaking [(site_url)] cache<br />RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]<br />RewriteRule .* - [F,L]<br /><br /># Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin<br />#RewriteCond %{HTTP_HOST} .<br />#RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]<br />#RewriteRule (.*) http://www.example.com/$1 [R=301,L]<br />[color=red]↓ ← Paste here[/color]<br /># DirectResize Friendly URLs part<br />RewriteCond %{REQUEST_FILENAME} !-f<br />RewriteRule ^images/([a-z0-9]{32})/.*\.(png|gif|jpe{0,1}g)$ assets/plugins/directresize/furl.php?q=$1 [NC,L,QSA]<br /><br /># Exclude /assets and /manager directories and images from rewrite rules<br />RewriteRule ^(manager|assets)/*$ - [L]<br />[color=red]↓↓↓ That’s the line. It switches off image handling[/color]<br />RewriteRule \.(jpg|jpeg|png|gif|ico)$ - [L]<br />[color=red]← Here the place to past coming from documentation. Do not paste here![/color]<br /># For Friendly URLs<br />RewriteCond %{REQUEST_FILENAME} !-f<br />RewriteCond %{REQUEST_FILENAME} !-d<br />RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]<br /><br /># Reduce server overhead by enabling output compression if supported.<br />#php_flag zlib.output_compression On<br />#php_value zlib.output_compression_level 5<br />
Quote from: Bytesource at May 17, 2009, 02:23 PMUnfortunately not. Now whenever I open a document in the modx manager the following warning pops up:
I finally found out why DirectResize seemed to ignore my configuration file.
DirectResize - OnDocFormPrerender
An error occurred while loading. Please see the event log for more information
In the event log at Reports/System Events I then found the following logs for DirectResize - Plugin:
- Use of undefined constant which_editor - assumed ’which_editor’
- Use of undefined constant DIRECTRESIZE_PATH - assumed ’DIRECTRESIZE_PATH’
Apart from these error messages, DirectResize seems to work as usual. However, there is definitely something wrong here, otherwise I would not get a warning every time I open or save a document.
Any idea what might be the problem?
Best regards,
Stefan
Edit:
When I go to Resources/Manage Resources/Plugins/DirectResize --> Configuration and remove the content DirectResize &config = Configuration; string;thumb the error messages stop and DirectResize seems to just use the default configuration set in directResize.php
The name of my configuration file is thumb.config.php.
<?php $dr_global["path"] = "assets/images/sovonex"; $dr_local["tpl_thumb"]["all"] = "[+dr.shortcut.source2thumb+]"; $dr_local["thumbonly"]["all"] = true; $dr_local["thumb_quality"]["all"] = 95; ?>
Could it be that there is something wrong with the file name (upper/lower case error) or the content (my command of php is quite limited so I just did some copy&paste here)?
Replace: define(DIRECTRESIZE_PATH, "assets/plugins/directresize/"); define(DIRECTRESIZE_GALLERYDIR, "assets/drgalleries/"); With define('DIRECTRESIZE_PATH', "assets/plugins/directresize/"); define('DIRECTRESIZE_GALLERYDIR', "assets/drgalleries/"); And replace: if (($modx->config[which_editor] != "none" && empty($_POST)) || (isset($_POST[which_editor]) && $_POST[which_editor]!="none")) With if (($modx->config['which_editor'] != "none" && empty($_POST)) || (isset($_POST['which_editor']) && $_POST['which_editor']!="none"))
betoranaldi, those look like easily correctible syntax errors. In the MODx plugin code:
Replace: define(DIRECTRESIZE_PATH, "assets/plugins/directresize/"); define(DIRECTRESIZE_GALLERYDIR, "assets/drgalleries/"); With define('DIRECTRESIZE_PATH', "assets/plugins/directresize/"); define('DIRECTRESIZE_GALLERYDIR', "assets/drgalleries/"); And replace: if (($modx->config[which_editor] != "none" && empty($_POST)) || (isset($_POST[which_editor]) && $_POST[which_editor]!="none")) With if (($modx->config['which_editor'] != "none" && empty($_POST)) || (isset($_POST['which_editor']) && $_POST['which_editor']!="none"))