robinc

Members
  • Content count

    19
  • Joined

  • Last visited

Community Reputation

17 Good

About robinc

  • Rank
    Distinguished Member

Profile Information

  • Gender
    Not Telling
  1. 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.
  2. 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.
  3. Thank you There is so much available in PW that sometimes one forgets it's there.
  4. 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?
  5. Just wanted to say - great module I am looking forward to when I can use it on PW3.
  6. 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!
  7. 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.
  8. 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?
  9. 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).
  10. 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?
  11. 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?
  12. 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); }
  13. 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,
  14. 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?
  15. 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.