Jump to content

adrian

PW-Moderators
  • Posts

    10,902
  • Joined

  • Last visited

  • Days Won

    349

Everything posted by adrian

  1. It really depends on the owner of those files and also the user that PHP is running as. Chances are you don't need to set them to 777. You should be able to set them to the same setting as the site/assets/ and site/config.php when you installed PW and also the modules directory, if you installed ModulesManager. Basically you need to set it to the lowest level that allows it to work, which would be write access for the owner (assuming the owner matches the php user. Does that make sense? If you are worried about security, you could ask your host about running PHP under SuExec and CGI.
  2. I just tested this module again myself. The issue is most likely with file permissions. Not that you should necessarily leave it this way permanently, but try chmod'ing everything in your templates folder to 0777. If they are still blank, then you might have fopen disabled somewhere in your php config. Let us know how you go with these two options.
  3. Are there any PHP errors being logged?
  4. Some major additions today! Added the ability to specify the dimensions of the rasterized version that is added to the admin images field. See the tiger screenshot in the first post in this thread to see how the SVG which was scaled to 25 x 25px before uploading, resizes up to a 500 x 500px fully transparent PNG. You can go as large as you want with no loss in quality. More importantly, I added a new method: rasterize() for the front-end which can be called from your templates with or without dimensions for resizing. $image->rasterize(200,0)->url This method optionally resizes the vector version of the image before it rasterizes it, so you can scale it infinitely and there will be no loss of quality. Make sure you point it to the svg version in your images field. These versions are stored using the filename.200x0.png format, so they will be automatically removed by PW if you delete the original image from the admin. I think this will be really useful - you can now upload one SVG and use the rasterize method to generate whatever sizes you need throughout your site - I can see this being especially useful for icons/logos. Also for scaling drawings/illustrations/charts/maps for different screen dimensions (RWD techniques) without the usual artifacts that result from scaling these style of images. New version available from the modules directory. Please let me know how it works out for you!
  5. Ok, I have added support for rendering the video in a Sublime Video player with: echo $page->video_field->eq(0)->play; Just register at sublime and enter your token on the config settings page of this module and that's it. I am not sure I am convinced about Sublime at the moment. I like the idea of a CDN approach to including the required file, but you can get mediaelementjs and other libraries through services like: http://www.jsdelivr.com/#!mediaelement Admittedly there is a lot more to include this way though. I think the main thing that puts me off about Sublime is how the process they take you through is designed to set up each video separately. Certainly you can just get the token for your domain and forget about the rest, but I would like it to be simpler. I have pushed this version to github, although I think maybe I should have made a separate branch - oh well. I am contemplating the idea of supporting several different players. Any thoughts on this, or how this new version of the module works?
  6. From someone who hasn't really used either yet but is contemplating it (need to see what all the fuss is about), this is a decent article: https://medium.com/frontend-and-beyond/8b3812c7007c
  7. From what Ryan posted here: http://processwire.com/talk/topic/5335-another-villas-site/?p=51628 it sounds like he went down that track a little with his latest villas site.
  8. Yep, I just ran that command on my server without rsvg compiled in and that's exactly the same output I get. Hopefully they are willing to fix it for you. Let us know how you go.
  9. Thanks Manfred - this observation was actually with an upgrade - my bad!
  10. Not exactly sure as I am not sure how it is installed and whether imagemagick was compiled to use it. Also, I would question the version of librsvg. I am using 2.32.1 and it is currently up to 2.40.1 (https://download.gnome.org/sources/librsvg/). That version you have is almost 4 years old, so that might be the problem, but given that your output exactly matches my test on a server without rsvg at all, I would ask them to check imagemagick using this command: convert -list format | grep SVG That should return something like this: MSVG SVG rw+ ImageMagick's own SVG internal renderer SVG SVG rw+ Scalable Vector Graphics (RSVG 2.32.1) SVGZ SVG rw+ Compressed Scalable Vector Graphics (RSVG 2.32.1) If not, then it's not set up correctly. Hope you can get them to help you out on this. Might also be worth asking what version of imagemagick and imagick they are running while you're at it.
  11. Just a minor detail. When installing with the new admin theme as a module, there is no color set checked by default. Warm is what is being displayed by default, so I think that radio button should be checked, or whatever color you decide to go with as the new default
  12. Hi Felix - nice looking site. Just a quick comment though - those images are nearly 500KB, so when I first started scrolling down, the images weren't showing. A quick look in Photoshop suggests that they could easily be half the size without any loss of quality.
  13. Sublimevideo does look pretty good actually. I was initially put off with the need to register. Also, I can see the advantages to their tracking of video views etc, but some users might not like that. I do think the CDN approach is great though - one less thing to have to keep updated and of course means no need to include any extra files with this module, so I think it might actually make for a nice default setup. I'll work on the module config to allow you to enter your personal token and provide a video_field->render() method that uses their player. Of course you could still always use your own player using the various components like I outlined in the first post. Will be back with something implementing this soon.
  14. Thanks for help with this. I just uploaded the tiger using the default PNG settings in the new version of the module. I tested on two servers, one with rsvg and one without. See attached for the differences. So I am guessing your server does not have rsvg installed. Unfortunately it does seem essential for reliable results. Hope you get can your host to recompile imagemagick with it. Let me know if you think of any other things you'd like added to this module. EDIT: I also tried the cow from the Noun Project and it actually looked perfect on both servers, with no errors. I am actually a little confused by that error message - it mentions MagickWand which is a different module than iMagick. Have you checked that the code for that svg looks correct and is not actually HTML or something - not sure how you downloaded from Noun. I used this file. Does the cow work with the old version of this module?
  15. Sorry to hear about the change in PNG results. What module config settings are you using? If none of those settings make a difference, perhaps you'd be willing to help me debug a little. Three changes you can try to see what works best: Uncomment this line: //$im->setOption("png:color-type","6"); Change $im->setImageFormat("png"); to $im->setImageFormat("png32"); Change $im->setImageType($this->image_type); to $imagickImage->setImageType(imagick::IMGTYPE_TRUECOLORMATTE); If you could let me know which one of those settings returns the quality back to the way it was, I'll sort things out. As for rsvg - I mentioned it as a suggestion when I first posted this module, but when I was playing around with this on a server without it yesterday, I was getting poor results, no matter the settings (even the original version of this module). Also, some SVGs work OK without rsvg, but some don't - at least that is my experience. Do you know either way if you host has added rsvg to imagemagick? Maybe they did already?
  16. Hi everyone, I want to release this module very soon but would like some feedback. At the moment it requires ffmpeg-php (http://ffmpeg-php.sourceforge.net/) but unfortunately it hasn't been updated in several years and doesn't work with recent versions of ffmpeg. I am thinking about teppo's suggestion of instead using this one: https://github.com/CodeScaleInc/ffmpeg-php It is more recent at least, although I haven't used it yet. Could I get an idea of who has which one(s) already available on their servers? Also, I am thinking about including a built-in player. I have been using mediaelementjs, but teppo suggested Flowplayer. Does anyone have any strong opinions on this: 1) whether a player should be included or not, and if so, 2) which player.
  17. jacmaes, Sorry for the delay on this, but I have finally pushed a new version to GitHub and also submitted it to the modules directory. The modules configuration settings now allows you to specify a variety of image quality settings for JPG and PNG outputs, but please note that for this to function as expected you need PW 2.4 or a late 2.3 dev version that supports field dependencies. Please test and let me know if you have any suggestions. I'd also like to reiterate how important it is to have imagemagick compiled with rsvg - I was testing this for the first time on a server without it and the quality was not great. Added new screenshots and details to the first post above too.
  18. Just had a reason to play with this via the API for the first time. Adding some config fields to a module and I just have to say WOW! It's just too easy Thanks again to Ryan for the great work and Avoine for sponsoring!
  19. Here's a relevant post: http://processwire.com/talk/topic/15-how-do-i-create-a-page-that-redirects-to-its-first-child/ You might also just consider disabling the parent page from being a link at all. Not sure what you are using to create your menu, but there are a few different ways to achieve this.
  20. A couple of relevant posts: http://processwire.com/talk/topic/4367-using-page-renderoptions-and-template-cache/ http://processwire.com/talk/topic/5394-page-renderfilename-confusion/
  21. Thanks Ryan - very easy and effective. I didn't think about the rename function - was wondering how to rename the file as well as the pagefile in one easy process. I have pushed a new version to GitHub which uses this for API uploads and as a result can now support renaming files that are added from remote URLs. I think this should now work in all API / form scenarios, but if anyone comes across any issues, please let me know.
  22. There are a few different ways to do this, including htaccess rewrites, but this code from willyc is a good option: http://processwire.com/talk/topic/1799-routes-and-rewriting-urls/ A few other posts worth reading: http://processwire.com/talk/topic/4847-redirect-in-htaccess/ http://processwire.com/talk/topic/3275-hide-parent-page-from-url/ http://processwire.com/talk/topic/4521-how-to-customize-urls/
  23. Well, this will get you the full url to an image if you know the page id and its name: 'http://' . $config->httpHost . $config->urls->files . $page_id . $image_name Does the app know the url root to the page so you can build up the url to the image like that? Presumably this will never change, so you can hardcode it as: http://www.mydomain.com/site/assets/files/ and then append the page id and the image name. Maybe I am missing your point though.
  24. Hi Melissa, Just wanted to make sure you've seen this module: http://modules.processwire.com/modules/process-date-archiver/ Not sure if it behaves exactly the way you want, but if it does, it might save you re-inventing.
  25. Sorry for the slightly wrong steer. You should try is_object. But you'll also need things slightly different as well. This should work: function mymaketable($pageid){ $out = ''; $current_page = wire('pages')->get($pageid); $out .= "<table class='table table-striped'>"; foreach($current_page->fields as $field){ $items = ''; if (strpos($field,'DMCstats_') !== false) { if(is_object($current_page->$field)){ $out .= "<tr> <td>{$field->label}</td><td>"; foreach ($current_page->$field as $f) { $items .= "{$f->title}, "; } $out .= rtrim($items, ', '); }else{ $out .= "<tr> <td>{$field->label}</td> <td>{$current_page->$field}</td> </tr>"; } } } $out .= "</table>"; echo $out; } EDIT: just made a few fixes - I think it should be spot on now!
×
×
  • Create New...