cleanUpload - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13) +--- Thread: cleanUpload (/showthread.php?tid=7262) |
cleanUpload - ambo - 2015-05-05 Plugin Description: This is cleaning your "Upload" from garbage (not used files in content or gallery albums). This plugin scaning page source xml files and albums created in I18N Gallery (xml files). It search there all used files in content from "Upload". Next, this plugin analizing to directory "Upload" and print in console all files that not used in content or gallery albums. You can delete files from "Upload" just press button "Delete". Install Instructions: Requirements: PHP 5.3 or greater! Uncompress file in /plugins directory and activate it in control panel. Use clenUpload from Files panel RE: cleanUpload - Oleg06 - 2015-05-05 (2015-05-05, 05:40:53)ambo Wrote: This plugin scaning page source xml files and alboms created in I18N Gallery (xml files). plugin useful, but does not work Code: Parse error: syntax error, unexpected T_USE, expecting T_FUNCTION in /home/cp459243/public_html/demo/plugins/cleanUpload/PageAnalize.php on line 11 RE: cleanUpload - shawn_a - 2015-05-05 php 5.3 probably RE: cleanUpload - Oleg06 - 2015-05-05 (2015-05-05, 07:36:07)shawn_a Wrote: php 5.3 probably possible php 5.4, he uses is his RE: cleanUpload - Oleg06 - 2015-05-05 with php5.4 Code: Notice: Undefined variable: result in /home/cp459243/public_html/demo/plugins/cleanUpload/PageAnalize.php on line 48 RE: cleanUpload - shawn_a - 2015-05-05 I meant 5.4, oops RE: cleanUpload - ambo - 2015-05-05 I am sorry. I doing this plugin for acquaintance how homework for scool and there was a requirement used "trait". Now i adapted a new plugin version (0.9.1) for php 5.3 Presentation: https://plus.google.com/u/0/111232801311479648562/posts/KBBpCj7yKYh RE: cleanUpload - Oleg06 - 2015-05-05 (2015-05-05, 15:25:07)ambo Wrote: I am sorry. I doing this plugin for acquaintance how homework for scool and there was a requirement used "trait". Now i adapted a new plugin version (0.9.1) for php 5.3 try using the debug вам грозит 2 в школе RE: cleanUpload - ambo - 2015-05-05 (2015-05-05, 17:13:04)Oleg06 Wrote:(2015-05-05, 15:25:07)ambo Wrote: I am sorry. I doing this plugin for acquaintance how homework for scool and there was a requirement used "trait". Now i adapted a new plugin version (0.9.1) for php 5.3 В школе то всё нормально - там необходимо использовать именно trait и php 5.4 (здесь всё работает) не хотелось копипастить в коде, но придётся. RE: cleanUpload - ambo - 2015-05-05 (2015-05-05, 18:12:01)ambo Wrote:Всё поправил, протестировал на php 5.3.28(2015-05-05, 17:13:04)Oleg06 Wrote:(2015-05-05, 15:25:07)ambo Wrote: I am sorry. I doing this plugin for acquaintance how homework for scool and there was a requirement used "trait". Now i adapted a new plugin version (0.9.1) for php 5.3 RE: cleanUpload - shawn_a - 2015-05-05 That's fine just note on the plugin that it requires a higher version of php that gs minimum which is 5.2 RE: cleanUpload - ambo - 2015-05-05 (2015-05-05, 22:06:40)shawn_a Wrote: That's fine just note on the plugin that it requires a higher version of php that gs minimum which is 5.2 I reload plugin and now it work on php 5.3 (early it was 5.4 version) sorry for my not competence RE: cleanUpload - kuguar - 2015-05-06 ambo, plugin 0.9.2 identifies as not used index.php file and offers to remove it))) RE: cleanUpload - shawn_a - 2015-05-06 It would be kind of nice to have similar functionality in core where it keeps track of asset references, and shows a flag in filebrowsers, like a little dot to hint at its usage. RE: cleanUpload - ambo - 2015-05-06 (2015-05-06, 12:13:00)kuguar Wrote: ambo, plugin 0.9.2 identifies as not used index.php file and offers to remove it))) Plugin scan only directory "upload". If file not exists in this directory that plugin ignore it. RE: cleanUpload - Tyblitz - 2015-05-07 (2015-05-06, 15:24:48)ambo Wrote:(2015-05-06, 12:13:00)kuguar Wrote: ambo, plugin 0.9.2 identifies as not used index.php file and offers to remove it))) That's why it's called cleanUpload... RE: cleanUpload - shawn_a - 2015-05-07 It is IN uploads GS includes an empty index.php file in uploads as a last resort protection to prevent dir listing in case htaccess fails. it is ignored in upload.php if ($file == "." || $file == ".." || $file == ".htaccess" || $file == "index.php"){ RE: cleanUpload - ambo - 2015-05-07 plugin ignored '.htaccess' if($file != '.htaccess'){ $result[] = trim (substr($dirname, 3)."/".$file," \t\n\r\0\x0B"); } you can add any file in "if" construction example (very simple example): class UploadAnalize{ ....... if($file != '.htaccess' && $file != 'index.html'){ $result[] = trim (substr($dirname, 3)."/".$file," \t\n\r\0\x0B"); } .... i do it change in next version RE: cleanUpload - ambo - 2015-05-07 (2015-05-06, 12:13:00)kuguar Wrote: ambo, plugin 0.9.2 identifies as not used index.php file and offers to remove it))) 1.0.0 - add files by name index.* in exclude RE: cleanUpload - kuguar - 2015-05-11 (2015-05-07, 17:29:40)ambo Wrote:(2015-05-06, 12:13:00)kuguar Wrote: ambo, plugin 0.9.2 identifies as not used index.php file and offers to remove it))) It works great! Only for some reason in cleanUpload.php Version: 0.9.2 remains RE: cleanUpload - Oleg06 - 2015-05-11 only for me when I enabled the plugin debug these warnings appear? RE: cleanUpload - ambo - 2015-05-12 (2015-05-11, 15:17:36)Oleg06 Wrote: Second argument not array... (because not exist links files in your content) I will make changes. Do you use i18n_Gallery? This is main requirement. RE: cleanUpload - ambo - 2015-05-12 (2015-05-11, 15:17:36)Oleg06 Wrote: (2015-05-12, 01:26:54)ambo Wrote:В принципе ничего страшного. варнинг нас предупреждает что в массив сравнения попадёт нулевое значение после анализа ссылок на страницах.(2015-05-11, 15:17:36)Oleg06 Wrote: Далее не может открыть директорию с галлереей - вероятно не создано ни одной галереи, либо как то ограничен доступ, либо не установлен плагин i18n_gallery , что вернёт пустой массив в сравнение. Чесно говоря, нужно также посмотреть настройки денвера и апача. Я использую OpenServer - ошибок не наблюдал. Сделал исправления - по умолчания результат возвращает не ноль а нулевой массив. В новой версии добавил подсчёт размера удаляемых файлов. RE: cleanUpload - A.Harrenberg - 2017-06-27 Hi, I just installed the plugin, (with GS 3.3.13 on debian 9 with php 7.0.2) and it just keep telling me "No files to clean", even when there are several files and also subdirectories with unused files... Any hint? BR, Andreas. |