Jump to content

robinc

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by robinc

  1. Works fine for me thanks! Would love to see this pulled back into the main module
  2. What is the best way to bulk upload multiple images? Similar to how you can with an images/files field, but would need each page name to be unique autogenerated, maybe name and/or title from each filename, or incremental. page structure: i have container page( or pages for separate groupings), with a child page for each image I Recently came across this module - it's really helpful! Thanks
  3. Sure. For this, widgets are configurable for each instance that exists. Each page should be able to as many as needed in any order, possibly 2+ of the same type on a page, with different config set. Example widgets: Custom menu, contact form, wysiwyg area, show latest article (with link to more). I get that each widget type would be a template, and each instance a page on the back end. Want to be able to make changes to all widgets on a page in one screen though, not constantly navigating to different places. Thanks
  4. I am making a website where on multiple pages i would like to have swappable customisable 'widget's or cms editable areas. Can anyone suggest how to implement a good visual way of doing this? (eg. Like the repeater field but each entry is an inline editable widget)
  5. It would be nice to have an admin interface for managing this file (and linked css). Potentially with wysiwyg editing and preview function, any maybe an 'export from page' option, to create the static file.
  6. I have noticed an issue with the compiler that may be related or the cause of this issue. If you have odd code snippets within php comments /* **stuff** */ (eg. mismatched/nested open/close codeblock <? or ?> then following code may NOT be passed by the compiler - leaving it without the namespacing - hence the Class missing error message. In my own code, i was using a call to wire(), which should have been compiled to \ProcessWire\wire() but was not.
  7. Thank you There is so much available in PW that sometimes one forgets it's there.
  8. With any website, there is the possibility of db issues - overloaded server, network connectivity if the db is on another machine in the hosting network, etc. I would love to see a feature where if there is any reason the db fails or cannot be accessed, then pw displays a dedicated page that is stored in the filesystem - instead of displaying nothing, or an ugly mysql error. Obviously it would be good to log the error, and possibly send a notification to the admin (email?). This gives us the opportunity to still present a professional front (albeit with no functionality) while problems are resolved behind the scenes. I cannot think of a company I have worked for that hasn't had db errors at times What are your thoughts?
  9. Just wanted to say - great module I am looking forward to when I can use it on PW3.
  10. hi, Couple of suggested edits to module: default config for: 'attributes' => '', 'dataAttributes' => '', should probably both be array() - as otherwise the array_merge function in attributes() will not work correctly to add bulk attributes to a tag. Also, the exmaple 5 shows the tag() function passing in attributes, but this is not supported in the actual code. I suggest adding an additional argument to tag, ie: tag($tag, $args /*custom tag structure*/, $attr=array()) or similar, and update the code in the function to support this data. Nice module anyway I like it!
  11. Thanks, that's great. At some point I may want to make it semi-automatic (one click add sub-site), so then I will look at just hooking into this functionality.
  12. I am using the Multisite.module to run several (similar/related) websites off a single PW-site and database. Adding new sites was as simple as adding the domain to the config box, and a top level page of the same name. However, since an upgrade of PW, I now also have to update my site/config.php file with each extra domain, i.e. $config->httpHosts = array( 'mydomain.com', // our primary hostname 'related.mydomain.com', // related website ); Otherwise the site will throw a 404 page not found. Leaving a blank httpHosts will allow all hostnames, but causes a warning in the back-end Unrecognized HTTP host:'mydomain.com' - Please update your $config->httpHosts setting in /site/config.php Can anyone advise how best to update Multisite.module?
  13. I have a suggestion, may or may not affect the issue above, but was causing the preview to render the page twice: in function init(), execute calls page->render(), then it is rendered again in the function changeView() with the preview data. I found changing: $this->addHook('ProcessPageView::execute', $this, 'changeView'); to: $this->addHookBefore('ProcessPageView::ready', $this, 'changeView'); and removing: // return the preview merged page $event->return = $page->setOutputFormatting(true)->render(); Works for me to view unpublished pages, etc as I have enough access to view (i.e. I can already edit it in the admin).
  14. What do you use to write code in? I am using Notepad++, which gives very useful readable syntax highlighting, and tag/bracket pair matching, but does nothing to help make php strings of HTML more readable. Any suggestions?
  15. I was using the version included in the v4 download (hence still v0.0.5) note: the zip still has pwire 4.2.1, so need to upgrade that first before i can use the latest ImagickResizer module. Any chance you could update the zip to latest?
  16. few more things i have noticed regarding gamma issues, by playing with the special image on http://www.4p8.com/eric.brasseur/gamma.html Even with the correct gamma correction before/after resize, GD2's jpeg encoding at 100% quality is still appalling - mangles images that if saved as pngs are fine. (took me a while to isolate as artifacts can look similar as if the gamma was incorrect). Using Imagick, I still need to add in the gamma correction similarly to that in ImageSizer.php. (which i think should be 2.2, not 2.0 as hardcoded). The default getImageGamma() for a new Imagick object is coming up as 1/2.2 (0.454545), which still needs to be added again via $im->gammaImage() to correctly linearize for resizing. (ie. not do gammaImage(2.2) to push it back to 1 before resizing). Hope this makes sense. $this->imageGamma = $this->im->getImageGamma(); if ($this->imageGamma && $this->imageGamma!=1) { $this->im->gammaImage($this->imageGamma); } // resizeImage(), sharpen, etc // ...... if ($this->imageGamma && $this->imageGamma!=1) { $this->im->gammaImage(1/$this->imageGamma); }
  17. looks like the imagick resizer module is not set to singleton, and I think it should be: public static function getModuleInfo() { return array( 'title' => 'Imagick Resizer', 'version' => 5, 'summary' => 'A module for replacing GD resizing with Imagick', 'href' => 'https://processwire.com/talk/topic/5889-image-quality-problem-on-resize/', 'singular' => false, 'autoload' => true ); } should be 'singular' => true,
  18. Noticed I had to update config.php to: $config->paths->libs = $_SERVER['DOCUMENT_ROOT'] . '/mysubdirectory/_phpcls/'; to get the install to complete as i did not install into my root www directory - maybe this can be autodetected? Results of testing locally below: ["test"] string(16) "cms-basic_visual" ["hasUsedCMS"] string(4) "0/18" ["executiontime"] string(12) "6.2528590000" ["engine"] string(18) "Apache 2.0 Handler" ["php"] string(6) "5.3.13" ["os"] string(83) "Windows NT A-PC 6.0 build 6002 (Windows Vista Business Edition Service Pack 2) i586" ["imageMagick"] string(5) "6.7.6" ["imagick module version"] string(5) "3.1.2" ["imagick classes"] string(56) "Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator" ["ImageMagick version"] string(34) "ImageMagick 6.7.6-1 2012-03-14 Q16" ["ImageMagick copyright"] string(46) "Copyright (C) 1999-2012 ImageMagick Studio LLC" ["ImageMagick release date"] string(10) "2012-03-14" ["ImageMagick number of supported formats"] string(3) "218" ["test"] string(19) "cms-with-icc_visual" ["hasUsedCMS"] string(5) "18/18" ["executiontime"] string(13) "34.5933610000" ["engine"] string(18) "Apache 2.0 Handler" ["php"] string(6) "5.3.13" ["os"] string(83) "Windows NT A-PC 6.0 build 6002 (Windows Vista Business Edition Service Pack 2) i586" ["imageMagick"] string(5) "6.7.6" ["imagick module version"] string(5) "3.1.2" ["imagick classes"] string(56) "Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator" ["ImageMagick version"] string(34) "ImageMagick 6.7.6-1 2012-03-14 Q16" ["ImageMagick copyright"] string(46) "Copyright (C) 1999-2012 ImageMagick Studio LLC" ["ImageMagick release date"] string(10) "2012-03-14" ["ImageMagick number of supported formats"] string(3) "218" notice some variation between between results - could someone explain what we are looking for here?
  19. I have managed to get imagick setup locally (after many hours!) - I will test and post results as soon as i have time (using wampserver php 5.3 on vista 32 bit, had to use image magick 6.7, as the latest 6.8.9 wouldn't play nice - not got time upgrade my wamp right now. I have a newer version (php and image magick, 64bit linux) on my server, so will be interesting to compare results. I am most interested in the imagick::INTERPOLATE_xxx functions, as GD2 is giving me horrible results for upscaling images more than 200% (looks to be nearest neighbour, not even bilinear). I think it is very good to be moving to an image-library agnostic approach to ImageSizer, so that one can just drop in gd2, Imagick, etc. Yes I did ask about the naming conventions, what you have written so far looks good - i will see if i can think of any other suggestions for it (add the interpolation method?) also, may be useful to set a different default method for upscaling vs downscaling.
  20. This is just what I am looking for! Is there anywhere I can download your imagick resizer module?
  21. I have an issue where I want to have an image resized, but have both a cropped and non-cropped version available (of the same size!) The code to do this is simple: $imagefull = $image->size(320,320,array( 'cropping' => false); $imagecropped = $image->size(320,320,array( 'cropping' => true); However, this only creates ONE variant of the image: eg. imagename.320x320.jpg So the same image is shown twice in the output page, instead of the two options Can anyone suggest a clean way of doing this? (ie. not duplicating every base image) Is there a way of creating named Image Variations? And do these names go into the filename to guarantee uniqueness? eg. $image->addVariation($name,$size,$options) or similar Thanks
×
×
  • Create New...