Hi developers. CMSimple 3.4 had one excellent service that the new versions disappeared. The features announced which pages are used images from the folder "Pictures".
It would be great if the service is returned, including search plugins such as Realblog_XH and Calelendar_XH.
It's a stupid idea? If so, I apologize.
Josef
Return function as in CMSimple 3.4
Return function as in CMSimple 3.4
Nobody knows how much time he has left ...
http://oldnema.compsys.cz/en/?Demo_templates
http://oldnema.compsys.cz/en/?Demo_templates
Re: Return function as in CMSimple 3.4
This feature is still available. When you hover over an image in the file browser, you see the thumbnail on the right hand side. If this image is used in content.htm, it is reported there (incl. the page names):oldnema wrote: CMSimple 3.4 had one excellent service that the new versions disappeared. The features announced which pages are used images from the folder "Pictures".
[ external image ]
That would require some support of the plugins. I'll try to think of a possible solution.oldnema wrote:including search plugins such as Realblog_XH and Calelendar_XH.
Christoph M. Becker – Plugins for CMSimple_XH
Re: Return function as in CMSimple 3.4
Oh, I admit that this feature I never noticed.cmb wrote: This feature is still available. When you hover over an image in the file browser, you see the thumbnail on the right hand side. If this image is used in content.htm, it is reported there (incl. the page names):
[ external image ]
Excellent, however, this option, which would allow bulk deletion of unused files, see Editing screen cmsimple 3.4
[ external image ]
A further amendment: to plugins that would be a good search would have added Boilerplate.
My claims are probably exaggerated, but it would be a huge help for the admin and facilitation.
Josef
Nobody knows how much time he has left ...
http://oldnema.compsys.cz/en/?Demo_templates
http://oldnema.compsys.cz/en/?Demo_templates
Re: Return function as in CMSimple 3.4
I have to admit that it is somewhat hidden, and that it's not perfect that the thumbnail can be seen only when hovering over the filename. However, there is the possibility to use KCFinder, which is much more advanced than the default file browser (KCFinder lacks the "used-in" feature, though).oldnema wrote:Oh, I admit that this feature I never noticed.
Is bulk deletion really possible with CMSimple 3.4? I just tried, but I only see radio buttons, and no checkboxes, so I can delete only a single file.oldnema wrote:Excellent, however, this option, which would allow bulk deletion of unused files, see Editing screen cmsimple 3.4
Anyhow, Ajaxfilemanager_XH has a bulk delete feature (and many more) -- unfortunately it is still not ready for CMSimple_XH 1.6. I'm somewhat torn between improving the built-in filebrowser or Ajaxfilemanager_XH (both would need it), because I don't have the time for both.
Agreed.oldnema wrote:A further amendment: to plugins that would be a good search would have added Boilerplate.
I don't think your requests are too demanding, because the name of the CMS is CMSimple, and that's how it should be.oldnema wrote:My claims are probably exaggerated, but it would be a huge help for the admin and facilitation.
Christoph M. Becker – Plugins for CMSimple_XH
Re: Return function as in CMSimple 3.4
Ah, now I understand. Only unused images can be bulk deleted -- quite nifty!cmb wrote:Is bulk deletion really possible with CMSimple 3.4? I just tried, but I only see radio buttons, and no checkboxes, so I can delete only a single file.oldnema wrote:Excellent, however, this option, which would allow bulk deletion of unused files, see Editing screen cmsimple 3.4
Well, it seems I had misunderstand your request, as you were probably referring to images used in "boilerpates" to be marked as such in the filebrowser. That could be done by evaluating all scripts on the pages before checking the images for usage, but that might considerably slow down the check. There had already been a report that the filebrowser is very slow, what's probably related to checking the usage of images. Therefore I'm not sure if we should risk to further decrease its performance. What do others think?cmb wrote:Agreed.oldnema wrote:A further amendment: to plugins that would be a good search would have added Boilerplate.
FWIW: here's an untested patch:
Code: Select all
Index: plugins/filebrowser/classes/Filebrowser_Controller.php
===================================================================
--- plugins/filebrowser/classes/Filebrowser_Controller.php (revision 1480)
+++ plugins/filebrowser/classes/Filebrowser_Controller.php (working copy)
@@ -223,14 +223,18 @@
* @global array The content of the pages.
* @global array The headings of the pages.
* @global int The number of pages.
+ * @global int The index of the requested page.
*/
function usedImages()
{
- global $c, $h, $cl;
+ global $c, $h, $cl, $s;
$images = array();
+ $oldS = $s;
for ($i = 0; $i < $cl; $i++) {
- preg_match_all('/<img.*?src=(["\'])(.*?)\\1.*?>/is', $c[$i], $m);
+ $s = $i;
+ $content = evaluate_scripting($c[$i]);
+ preg_match_all('/<img.*?src=(["\'])(.*?)\\1.*?>/is', $content, $m);
foreach ($m[2] as $fn) {
if ($fn{0} == '.' && $fn{1} == '/') {
$fn = substr($fn, 2);
@@ -244,6 +248,7 @@
}
}
}
+ $s = $oldS;
return $images;
}
Christoph M. Becker – Plugins for CMSimple_XH