Jump to content

adrian

PW-Moderators
  • Posts

    11,176
  • Joined

  • Last visited

  • Days Won

    371

Everything posted by adrian

  1. Hey Pete, the problem happens sometimes and not others. I'll reload the page and it works ok, and then reload again and it won't work at all, no matter what speed nor how fast I drag. Not sure if it is related to image not loading in time or what, but definitely not functional when it's mis-behaving. I am sure Joshua will get it sorted out though
  2. From what I understand, you want to be able to rename an image during the upload process. A couple of options: Install Custom Upload Names and define rules for what files should be named what Hook into Pagefile::install and work with this code from Ryan Let us know if you need any specific help.
  3. Hey joshua - it is very stylish indeed. One issue I am having is dragging the sliders sideways is temperamental for me. Most of the time they just bounce back to the start. I am on Chrome / OSX. Anyone else having this issue?
  4. Just wanted to share a little story of my old Dell laptop. It was 9 years old and still running quite adequately, with only one RAM upgrade in its lifetime. I was spending a working holiday in Mexico for a month when the graphics card decided to pack it in one week into the trip. All I got on the screen was some random fuzzy lines. Not looking very promising A quick google, a screwdriver, some aluminum foil, a kitchen oven, and 15 minutes later she was good as new and is still working 2 years later! No chance of fixing something like that on a Macbook these days. FYI, I am on a Mac now and I have finally wrangled it into submission and am generally happy. Two things I shelled out for were an SSD and a matte screen - I know glossy are all the rage, but the reflection off the glass drives me nuts! Am I the only one?
  5. Select setup taking too long: http://mods.pw/5R | Rename ugly uploaded filenames: http://mods.pw/5m | On demand SVG rasterizing: http://mods.pw/62

  6. Hey reno, You can set your defaults like this. Just put it before your init(): protected static $configDefaults = array( "defaultSelector" => "default value here" ); /** * Data as used by the get/set functions * */ protected $data = array(); Add this line to your inputfield: $field->attr('value', $data["defaultSelector"]); And add the following at the top of your static public function getModuleConfigInputfields(array $data) {: foreach(self::$configDefaults as $key => $value) { if(!isset($data[$key]) || $data[$key]=='') $data[$key] = $value; } You can then access this throughout your module using: $this->defaultSelector; At least that is how I have been doing it - maybe someone else has something cleaner Does that make sense? PS, Sorry for all the consecutive edits. I really shouldn't try to offer device when I am busy with other things and rushing EDIT Again - I just read that tutorial you pointed to and I see if uses: public function __construct() to set the default values. I haven't used that before. I guess I started by copying from other modules and never came across that approach. I guess there are a few different options, but construct does seem cleaner.
  7. Firstly wanted to say amazing job Ryan - PW just keeps getting more capable and powerful and it's a real pleasure being part of this community. I have never experienced anything else like it - so incredibly friendly and supportive. A far cry from so many others. Obviously a result of the tone and standards you set here. Just a quick request - I am sure it is on your list, but it would be helpful to have 2.4 checkbox option in the modules directory sooner than later. Thanks again for everything!
  8. 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.
  9. 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.
  10. Are there any PHP errors being logged?
  11. 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!
  12. 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?
  13. 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
  14. 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.
  15. 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.
  16. Thanks Manfred - this observation was actually with an upgrade - my bad!
  17. 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.
  18. 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
  19. 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.
  20. 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.
  21. 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?
  22. 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?
  23. 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.
  24. 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.
  25. 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!
×
×
  • Create New...