-
Posts
105 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Richard Jedlička
-
Released version 1.1.1: Hotfix for module's installation by classname.
-
Hi, I've done it finally. The version 1.1.0 is released. Compatible with PW 2.5+. Only the version for PW 3.x is in devns branch because of this issue.
-
Hi, sorry I din't do that yet. I stucked, because I wanted to test it properly first. I wanted to make automated unit tests, but in processwire it isn't (maybe wasn't) so easy, I wanted to use wireshell to help with it, but somehow I moved my activity somewhere else. I can merge the branches, but I would like to have some feedback if it is working correctly or not. Did you try it? I've tried it in PW 2.5 and 2.6 and it looks it's working, but I'm not sure about PW 2.7+. If you can test it a give me feedback I would appreciate it. Thanks
-
Hi, I've been doing some research and testing. But I don't find a way to get it properly working on older versions of ghostscript. But @evan's solution works, it produces low quality images and it's properties cannot be affected because the pdf is read on the Imagick object creating. The readImage method always throws the mentioned exception. Despite of this it is useful where you cannot update GS or IM (e.g. shared hosting). So I added it to the module as fallback mode. It can be turned on in the module's settings. See DEV branch.
-
Hi @evan, yes, it's probably because of the old version of IM and GS. What was the problem exactly (error message, ...), can you post it here? I also find that setColorspace method is supported since IM version 6.5.7, so I should change the code to reflect that. What is the problem with readImage method? Will it work if you comment only setColorspace?
-
wireshell - an extendable ProcessWire command line interface
Richard Jedlička replied to marcus's topic in API & Templates
Hi all, really great work. Why don't you use this logo you have posted before? I think it is much better then the one on the website. -
DEV branch is updated, should be PW 2.6 compatible now. And InputfieldImage is not parent of InputfieldPDF anymore. Check it out.
-
Hi, thanks for the reply. I haven't tried the PW 2.6 yet. The reason why I used image inputfield is to render the PDF thumbnails exactly the same way as images. But maybe you are right, I should have used my own render method. I'll check it out.
-
Update "How-To Install or Uninstall Modules"
Richard Jedlička replied to Richard Jedlička's topic in Getting Started
Great. I've removed the "git clone" section in my proposal, because I think it is not the guide how to install a module, but how to clone git repo from github (so not related to PW). The scenario is already cover by "Installing from URL". -
Update "How-To Install or Uninstall Modules"
Richard Jedlička replied to Richard Jedlička's topic in Getting Started
Hi, what can I do to help publish this on the website? What do you think about the proposal, does it need some changes? -
Hi, new version is here, as I promised. It's currently on the dev branch: https://github.com/uiii/ProcessWire-FieldtypePDF/tree/dev. The readme is updated so everything should be clear. It contains tests and they successfully passed for PW 2.4, 2.5. If you can try the module, I'd be glad to hear your opinions and suggestions.
-
Update "How-To Install or Uninstall Modules"
Richard Jedlička replied to Richard Jedlička's topic in Getting Started
Here is my proposal. The HTML is in attachments. There are multiple ways how to install the module. Installing from directory (recommended) -------------------------------------- If the module is uploaded in the official *ProcessWire Modules/Plugins Directory* (http://modules.processwire.com), you can use this method. 1. Log in to your ProcessWire admin and go to the *Modules* page. 2. Go to the *New* tab and expand the *Add Module From Directory* section. 3. Enter the *Module Class Name* (can be found in the module's detail page, e.g. FieldtypeMapMarker). 4. Click the *Download and Install* button. Installing from URL ------------------- If the module is not in the official *ProcessWire Modules/Plugins Directory* (http://modules.processwire.com), but the module ZIP is accessible from URL, use this method. 1. Log in to your ProcessWire admin and go to the *Modules* page. 2. Go to the *New* tab and expand the *Add Module From URL* section. 3. Enter the *Module ZIP file URL* (can be found in the module's detail page, e.g. https://github.com/ryancramerdesign/FieldtypeMapMarker/archive/master.zip). 4. Click the *Download* button. 5. The downloaded modules are now listed on top of the page. Click the install button next to any of the new modules that you want to install. Installing from upload ---------------------- If the module ZIP file is not accessible from web or you have it already downloaded, you can upload the file. 1. Log in to your ProcessWire admin and go to the *Modules* page. 2. Go to the *New* tab and expand the *Add Module From Upload* section. 3. Select the *Module ZIP file*. 4. Click the *Upload* button. 5. The uploaded modules are now listed on top of the page. Click the install button next to any of the new modules that you want to install. Installing manually ------------------- If any of the above methods isn't suitable for you, you can install the module manually. 1. Place the .module file in your /site/modules/ directory. If the module contains more than one file (like supporting .css or .js files for example), it should be created in it's own directory under /site/modules/ with the same name as the module (.module file). For instance, the FieldtypeMapMarker module and supporting files should be placed in /site/modules/FieldtypeMapMarker/. 2. Log in to your ProcessWire admin and go to the *Modules* page. 3. Click the *Check for New Modules* button. 4. New modules are now listed on top of the page. Click the install button next to any of the new modules that you want to install. *Note: All third party modules should be placed in /site/modules/. You might also notice that ProcessWire keeps core modules in /wire/modules/ – You should avoid installing your modules there, as that location is reserved for core modules.* How to uninstall a module ------------------------- 1. Log in to your ProcessWire admin and go to the *Modules* page. 2. Find and click the module name that you want to uninstall. 3. Expand the *Uninstall* section, check the checkbox. 4. Click the *Submit* button. 5. It is now safe to remove the module's files from /site/modules/ if you want to. how-to-install.html -
Hi, I think that the page http://modules.processwire.com/install-uninstall/ should be updated according to the current PW's capabilities (Add module from directory/URL/upload). I'm writing this because it would be much better to have the instructions in one place instead of writing them to each module's readme. I'm not sure who is responsible for the content of the page, Ryan? I can update the text if you want, or at least write the proposal.
-
Hi, it looks that only minimum of people there care about this. If the PW's license is GPL v2, what license the module is allowed to be? E.g. if I derive Pagefile class, may the derived class be licensed under MIT (or any other), or it must also be under GPL v2 license? Thanks
-
wireshell - an extendable ProcessWire command line interface
Richard Jedlička replied to marcus's topic in API & Templates
I've just removed unnecessary code from install.php, modify output for console and add cmd options. -
wireshell - an extendable ProcessWire command line interface
Richard Jedlička replied to marcus's topic in API & Templates
So here is the gist: https://gist.github.com/uiii/f1877686bca81fe6d668. See the comment below the gist. -
wireshell - an extendable ProcessWire command line interface
Richard Jedlička replied to marcus's topic in API & Templates
@Horst: Yes, I think so from his message, but I'm not sure because he is also trying to make the PW cli installer (according to this thread: https://processwire.com/talk/topic/9124-command-line-installer/?hl=installer ). -
wireshell - an extendable ProcessWire command line interface
Richard Jedlička replied to marcus's topic in API & Templates
Hi, this tool is really cool idea. It would be great to have command for full PW installation, not just download. I've managed it by modifying original install.php file from PW 2.5 sources. But I'm not sure if it is production ready, it works but I haven't tested all edge cases. It requires config file with configuration array (db connection, profile, admin user credentials, ...). If you are interested I can post it somewhere. I plan to do it also for PW 2.4. With this comes and idea for 'new' command to allow installation of another versions other than the latest. EDIT: Hari KT, don't you have the same intention? What do you mean by 'one click installer'. Installer for wireshell or for PW? -
Hi, I'm just trying to delete file field via API. I want to delete it completely without concerning which pages is using it. I found this code: $fields = wire('fields'); foreach ($fields->find('name=field_name') as $field) { foreach ($field->getFieldgroups() as $fieldgroup) { $fieldgroup->remove($field); $fieldgroup->save(); } $fields->delete($field); } This removes the field from database it is OK. But it doesn't remove the files (from filesystem) that ware added to pages. As I was going through PW source code I've found that I have to save the page also, but it really complicates the thing. The problem starts in FieldtypeFile::___deletePageField method where the $pagefile is handled differently according to field output formatting. If the $pagefile is PageFile, the unlink is called which also deletes the file from filesystem. If the $pagefile is PageFiles the deleteAll is called which only adds hooks on page save. Why is it done this way? This makes inconsistency when deleting the field. Is there some better way to delete the field without caring about pages?
-
Hi Mike, I haven't seen this GS error before. I'm not an expert in Ghostscript nor ImageMagick, I have just go through many internet discussions and found working php code for pdf to image conversion. But as you say, it looks like a GS bug. This is one of the issues in PW 2.5 as I mentioned earlier. See https://github.com/uiii/ProcessWire-FieldtypePDF/issues/6. If you want, you can temporarily use somatonic's fork or wait for my upgrade.
-
Really, so you are lucky . There are some issues https://github.com/uiii/ProcessWire-FieldtypePDF/issues. Not all issues are fatal, but needs to fix. I have already fixed all of them but not published yet. I have also changed the API (still backward compatible). The new version isn't ready yet, I need to update the documentation and want to add some tests.
-
Hi Mike, I'm not sure if there is some minimal version of ghostscript needed. I have installed ghostscript 9.15 with imagemagick 6.9.0 and according to phpinfo the php's imagick module is of version 3.1.2. In this configuration everything works fine. No binaries are executed directly from php, the php's imagick module is used (imagick.so in php.ini), but you must have installed ghostscript and imagemagick as a system package. Hope this helps you. BTW: If you are going to use this module on PW 2.5, you will probably get some errors. I'm working on that and hope to finish it this week. PW 2.4 should be ok.
-
Ah, ok. So, I'll try to do my own solution.
-
Hi, can you please share the installer somewhere? I'm really interested. Thanks
-
Hi, I'm still there, but I don't have much time to fix the issues. Sorry. If you find the solution you can create a pull request or make your version of the module. If I find some time a will try to look at that. Once again, sorry.