-
Posts
721 -
Joined
-
Last visited
-
Days Won
6
Everything posted by matjazp
-
It's not working, if the module has it's own install method. I added that in v1.6.1 to check for mbstring and iconv support. To overcome this you have to either remove your own install method or create a page by yourself, like this: public function ___install() { /* try { $this->installPage('file-editor', 'setup', 'Files Editor'); } catch(Exception $e) { $this->error("Can't create a page."); } */ parent::___install(); if(!extension_loaded('mbstring') || !function_exists('iconv')) { $this->message("Support for mbstring and iconv is recommended."); } } Thank you both for the report, v1.6.4 is up & running Edit: I forgot to call parent::___install();
-
Hi, adrian! I added a warning to the readme file for next versions, so that everyone should be aware that they need a backup solution in case they cut himself off the admin. I'm not creating the page by myself, I'm letting PW do it for me: $info = array( 'title' => 'Files Editor', 'summary' => _('Edit files'), 'version' => '1.6.3', 'author' => 'Florea Banus George, Matjaž Potočnik, Roland Toth', 'icon' => 'file-o', 'href' => 'https://github.com/matjazpotocnik/ProcessFileEdit/', 'requires' => 'ProcessWire>=2.5.5, PHP>=5.3.8', 'permission' => 'file-editor', 'permissions' => array( 'file-editor' => _('Edit Files (recommended for superuser only)') ), 'page' => array( 'name' => 'file-editor', 'parent' => 'setup', 'title' => 'Files Editor' ), ); @adrian,would you be so kind and PM me, I would appreciate if you could give me more info about your server.
-
It's not compatible with CI3, but I think I know why and I think I know how to fix it Will report, stay tuned.
-
I don't know about plans. The service is up for quite a time, sure more over a year, but it's not clear who is owner of site. Site is created by French Tech, the collective name for all those working in the French startup market. There is also no privacy policy available, so who knows what happen with your uploaded images. There are other services with "free" plans, but with limitations, like file size (100kB) or number of images (eg. 500 per month). I actually don't like web services, because first you upload the image to your server, then upload to web service and then download it. That's why I use local tools on the server, but that come with a price, cpu & memory usage, but I can aford it, since I'm the sysdamin Auto Smush is somehow different from other modules, since it does not add the method(s) to PageImage, thus you don't have to change your code and also you may uninstall (or disable) the module at any time without code modification in your templates.
-
Module: Auto Smush https://github.com/matjazpotocnik/AutoSmush Optimize/compress images. In Automatic mode images that are uploaded can be automatically optimized. Variations of images that are created on resize/crop and admin thumbnails can also be automatically optimized. In Manual mode "Optimize image" link/button will be present. This allows manual optimization of the individual image or variation. In Bulk mode all images, all variations or both can be optimized in one click. Will process images sitewide. Two optimization "engines" are avaialable. reShmush.it is a free (at the moment) tool that provides an online way to optimize images. This tool is based on several well-known algorithms such as pngquant, jpegoptim, optipng. Image is uploaded to the reSmush.it web server, then optimized image is downloaded. There is a 5 MB file upload limit and no limit on number of uploaded images. "Local tools" is set of executables on the server for optimizing images: optipng, pngquant, pngcrush, pngout, advpng, gifsicle, jpegoptim, jpegtran. Binaries for Windows are provided with this module in windows_binaries folder, copy them somewhere on the PATH environment variable eg. to C:\Windows. Similar modules: JpegOptimImage by Jonathan Dart: https://processwire.com/talk/topic/6667-jpegoptimimage/ TinyPNG Image Compression by Roope: https://github.com/BlowbackDesign/TinyPNG ProcessImageMinimize by conclurer: https://processwire.com/talk/topic/5404-processimageminimize-image-compression-service-commercial/ Forum discusion: https://processwire.com/talk/topic/12111-crowdfunded-tinypng-integration-module/ Module created by Roland Toth (@tpr).
-
v1.5.0: - warning about unsaved changes (suggested by tpr) - better wording about include/exclude filter (suggested by tpr) - better visual feedback on Save (suggested by tpr) - theme selection (suggested by tpr) - small speed improvement on directory tree generation - small enhancements and fixes - codemirror update to 5.20.2 Thanks to our "Man on Steroids"
-
Thx, kixe. I wrongly expected that wireClassExists('bar') would always return true, with or without namespace. Because this is not the case, this is why DynamicRoles module (and possible others?) doesn't work on PW3 unless you add namespace.
-
<?php // in mytemplate.php echo "Roles:" . wireClassExists('Roles') . "<br>"; // expecting true echo "foo:" . wireClassExists('foo') ."<br>"; // expecting false class bar extends Roles { } echo "bar: " . wireClassExists('bar') ."<br>"; //expecting true Output: Roles:1 foo: bar: If I add namespace ProcessWire in mytemplate.php, then the result is as expected, class bar exists: <?php namespace ProcessWire; // in mytemplate.php echo "Roles:" . wireClassExists('Roles') . "<br>"; // expecting true echo "foo:" . wireClassExists('foo') ."<br>"; // expecting false class bar extends Roles { } echo "bar: " . wireClassExists('bar') ."<br>"; //expecting true Output: Roles:1 foo: bar: 1 This is how it should be?
-
Hi! I'm using DynamicRoles on PW 3.0.33 and I get errors: As superuser: PagesLoader: Class 'DynamicRole' for Pages::getById() does not exist As "dynamicroles" user : Error: Exception: Method Page::hasEditPermission does not exist or is not callable in this context (in C:\inetpub\wwwroot\wire\core\Wire.php line 410) #0 C:\inetpub\wwwroot\wire\core\Page.php(1475): ProcessWire\Wire->___callUnknown('hasEditPermissi...', Array) #1 [internal function]: ProcessWire\Page->___callUnknown('hasEditPermissi...', Array) #2 C:\inetpub\wwwroot\wire\core\Wire.php(348): call_user_func_array(Array, Array) #3 C:\inetpub\wwwroot\wire\core\WireHooks.php(548): ProcessWire\Wire->_callMethod('___callUnknown', Array) #4 C:\inetpub\wwwroot\wire\core\Wire.php(371): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Page), 'callUnknown', Array) #5 C:\inetpub\wwwroot\wire\core\Wire.php(372): ProcessWire\Wire->__call('callUnknown', Array) #6 C:\inetpub\wwwroot\wire\core\Wire.php(372): ProcessWire\Page->callUnknown('hasEditPermissi...', Array) #7 C:\inetpub\wwwroot\site\assets\cache\FileCompiler\site\modules\DynamicRoles\DynamicRoleSupport.module(178): ProcessWire\Wire->__call('hasEdi This error message was shown because: site is in debug mode. ($config->debug = true; => /site/config.php). Error has been logged. It's working on 2.5.4. Any help is welcome
-
v1.4.0 is at https://github.com/matjazpotocnik/ProcessFileEdit Changes: - removed ProcessWIre namespace, module should work from PW 2.5.5 and up - edit file in modal window
-
Thanks, @fbg13It's not quit ready for prime time yet, there are some bugs I'm working on, will update here.
-
Are you sure you have Multi-byte string support compiled with PHP (mbstring)?
-
Yes, I would go with that. The second best is wipe (remove or eliminate (something) completely.) Destroy is to strong for me, it reminds me to bombs and explosives... Eliminate reminds me to assassin (but maybe that's just me).
-
Try with different browser(s). See https://github.com/ryancramerdesign/ProcessWire/issues/1487
-
PW 3.0.35: ProcessWire 3 master and changelog
matjazp replied to ryan's topic in News & Announcements
That's the key! And of course Upgrades module has to be updated first to version 0.0.7 where Ryan modified the sources. -
You are right, I had ?s=1 in the url, didn't notice... And name change is working of course. Thank you and sorry for taking your time.
-
Sure. While I'm here, what is the purpose of "Overwrite names"? I see no difference in this is checked or not.
-
Hi! When I set to "Load open, not collapsed" BCE works as expected. Then I disabled this option but BCE still loads open, not collapsed.
-
Added Custom Action but it doesn't do nothing!
matjazp replied to Xonox's topic in Module/Plugin Development
In executeActions function, where does $page/$action/$actions come form? Or I'm missing something? -
@szabesz glad you figured it out but that does not solve the file compiler error... should I open github issue or it's unsupported to include files outside of base directory structure (on windows)?
-
I can't use global compile flag, because some of the includes have to be compiled and some not. I expected that //FileCompiler=0 would make FileCompiler to completely ignore the file, now it fails trying to create a directory with the invalid name on windows.
-
Yes, it's invalid path, that's clear. I already copied adodb5 directory to /site/templates and it's working there. The problem is that I have multiple sites on this server and I have to copy adodb5 directory (and files) to all sites - it's duplication.
-
I have a template file (eg. basic-page.php) where I include some other files. If the included file is on /site/templates path it's ok, but if the file is included like this: inlcude('C:\PHP\adodb5\adodb.inc.php'); then I get the following error: Exception: Unable to create directory C:/inetpub/wwwroot/pf/site/assets/cache/FileCompiler/C:/PHP/adodb5/ (in C:\inetpub\wwwroot\pf\wire\core\FileCompiler.php line 135) #0 C:\inetpub\wwwroot\pf\wire\core\FileCompiler.php(201): ProcessWire\FileCompiler->initTargetPath() #1 [internal function]: ProcessWire\FileCompiler->___compile('adodb.inc.php') #2 C:\inetpub\wwwroot\pf\wire\core\Wire.php(348): call_user_func_array(Array, Array) #3 C:\inetpub\wwwroot\pf\wire\core\WireHooks.php(548): ProcessWire\Wire->_callMethod('___compile', Array) #4 C:\inetpub\wwwroot\pf\wire\core\Wire.php(371): ProcessWire\WireHooks->runHooks(Object(ProcessWire\FileCompiler), 'compile', Array) #5 C:\inetpub\wwwroot\pf\wire\core\WireFileTools.php(732): ProcessWire\Wire->__call('compile', Array) #6 C:\inetpub\wwwroot\pf\wire\core\WireFileTools.php(732): ProcessWire\FileCompiler->compile('adodb.inc.php') #7 C:\inetpub\wwwroot\pf\site\assets\cache\FileCompiler\site\templates\kontakti.php(242): ProcessWire\WireFileTools->compile('C:/PHP/adodb in C:\inetpub\wwwroot\pf\index.php on line 64 Using latest PW 3.0.33RC1. I also put //FileCompiler=0 in the included file as per https://processwire.com/blog/posts/processwire-3.0.14-updates-file-compiler-fields-and-more/#how-to-bypass-the-file-compiler
-
'icon' => $page->map_repeater->marker_icon->url ?