Jump to content

horst

PW-Moderators
  • Posts

    4,077
  • Joined

  • Last visited

  • Days Won

    87

Everything posted by horst

  1. Hi Henning, this feature (connecting to other PW installations within one script) is on the Roadmap for 2.6 or 3.0. But for now you should go with Module Webservices, that's how it is done normaly I think. https://processwire.com/talk/topic/1654-pages-web-service-servicepages/
  2. Actually it is displaying pages and they look very well! But there seems to be some more things that need fixes. I get 500 internal server error when try to serve from sitemap to a page like : http://www.davidsongalleries.com/artists/contemporary/sergey-hrapov/ EDIT: a little typo: Kathe Kollwitz should be Käthe Kollwitz, and if it should be 100% perfect, the url part should be changed from kathe-kollwitz-from-many-wounds to kaethe-kollwitz-from-many-wounds. EDIT2: Not sure, but maybe double entries? Konstantin Antiohken <==> Konstantin Antiouhkin
  3. Hi @creativejay, I definitely would go with Hanna codes in RTEs.
  4. @Mike Anthony: you used SwiftMailer with a contactform? Than this is for you: modules/wire-mail-swift-mailer
  5. @PeterDK, I'm not sure if this is really possible nor if it is a good idea, but I want to throw it into the discussion: If you can use symlinks, maybe you can setup two hosts that point to the same directories of wire and site, but have there own index.php and own .htaccess. admin.domain.tld | |--index |--htaccess | |-------------------site-symlink----------| |-------------------wire-symlink--------| | | | | |---------------------site-real | | |---------wire-real | | | | | |-------------------wire-symlink-------------| | |-------------------site-symlink------------------------------------ | |--index |--htaccess | www.doamin.tld
  6. Hey, today a newbie question from me: "Is it possible to get one of those addressboxes with the MapMarker-Field?" I use it the first time and with a single marker only. Would be nice to have directly such a box displayed.
  7. Hey, actually there is no time, even not for thinking in depth about this request. But maybe this suites your needs better: https://processwire.com/talk/topic/8079-imagefocusarea/
  8. I could quickly set a shared host account via its config panel to run under PHP 5.3.28 cgi. The CroppableImage Editor worked, - but I could not test all functions in depth. If you want use it in a none productional site with PHP < 5.4.0, simply change the values in the 3 *.info.json files // from this "requires": "ProcessWire>=2.5.11, PHP>=5.4.0, FieldtypeCroppableImage>=82", // to this "requires": "ProcessWire>=2.5.11, PHP>=5.3.8, FieldtypeCroppableImage>=82", modules/CroppableImage/FieldtypeCroppableImage/FieldtypeCroppableImage.info.json modules/CroppableImage/InputfieldCroppableImage/InputfieldCroppableImage.info.json modules/CroppableImage/ProcessCroppableImage/ProcessCroppableImage.info.json
  9. I can't remember why it was set to PHP >= 5.4.0. (@owzim: can you remember it?) I also have no server with PHP 5.3 at hand. Maybe you (or someone other) can edit the three *.info.json files to point to PHP>=5.3.8 and try if it runs or throws any error? If not it will take a while for me to get ready testing this. But it is noted on my ToDo now.
  10. Hey @sarah_hue, welcome to the forums and thanks for the kind words. The recreation is forced by the optional second param of pimLoad. If you let it out or set it to false it takes the cached variation: $imagewithwatermark = $img->pimLoad('tw'[, false] )-> ... . . PS: viele Grüße in die Narrenhochburg Köln, Tätä!
  11. horst

    Debugging tips

    @adrian, that would be a good PW recipe too!
  12. Hey @Marvin, 1) Please add a Supportboard-Link to this entry in the modules directory. . . 2) Is it right that you do not respect any of the sitewide PW default settings for images? Not those that optionally can be defined especially for ImageManipulator nor those that are defined for the ImageSizer? // from core imageSizer 'autoRotation' 'upscaling' 'cropping' 'quality' 'sharpening' 'defaultGamma' 'useUSM' // for manipulator only 'bgcolor' 'targetFilename' 'outputFormat' . . 3) In the description of Gim you say that the only options that can be specified and set are quality and outputFormat, but Quality seems not to work, I always get the same result in filesize. OutputFormat works partly, means: when I try to create a jpeg and a png from the same image, (what I can do with Pim), it does not create the second file without forcing a recreate! And when I force recreation, it overwrites my first image with the second rendering. This is because it does not reflect the outputFormat in the filename. I use this test code: $image = $page->images->eq(0); $w = intval($image->width / 10 * 2); $h = intval($image->height / 10 * 2); echo "<p>test with defaults<br />"; $gim = $image->gimLoad('gim1')->resize($w, $h)->save(); echo filesize($gim->filename) . ' :: ' . $gim->url . '</p>'; echo "<p>test with outputFormat PNG<br />"; $gim = $image->gimLoad('gim1')->resize($w, $h); $gim = $gim->setOptions(array('outputFormat' => 'png'))->save(); echo filesize($gim->filename) . ' :: ' . $gim->url . '</p>'; echo "<p>test with quality 100<br />"; $gim = $image->gimLoad('gim2')->resize($w, $h); $gim = $gim->setOptions(array('quality' => 100))->save(); echo filesize($gim->filename) . ' :: ' . $gim->url . '</p>'; echo "<p>test with quality 20<br />"; $gim = $image->gimLoad('gim4')->resize($w, $h); $gim = $gim->setOptions(array('quality' => 20))->save(); echo filesize($gim->filename) . ' :: ' . $gim->url . '</p>'; and get this result: test with defaults 21235 :: /site/assets/files/1/pim_gim1_basename_02.jpg test with outputFormat PNG (and not forcing recreation) 21235 :: /site/assets/files/1/pim_gim1_basename_02.jpg or test with outputFormat PNG forcing recreation (look filesize!!) 178060 :: /site/assets/files/1/pim_gim1_basename_02.jpg test with quality 100 21235 :: /site/assets/files/1/pim_gim2_basename_02.jpg test with quality 20 21235 :: /site/assets/files/1/pim_gim4_basename_02.jpg . Also there is no validation done. Not for supported filetypes nor typos, and also not for a valid range for quality. . . 4) Why do you not keep IPTC, what is (sort of) mandatory within PW? At least you should print a big warning at the very top of the announcement for those that rely on this. (because AFAIK it is supported by every other image related part in PW since Version 2.3, or do I miss something?) . . 5) Same with the big warning should be done in regard of sharpening! The lib you implemented does not support any sharpening method! As a sidenote, one of the most timeconsuming image manipulations with GD / PHP is sharpening! . . 6) Also the lib does not support transparency in GIF, it renders them with black background. Detecting the need for AutoRotation is not supported too. . . 7) Ah, - regarding my post about the Imagick adapter I have seen there, this looks a bit like a stillbirth. (https://github.com/Gregwar/Image/pull/65) . . . When first reading your announcement here I was very happy because I have started a few times to rewrite the Pim to make it faster and more robust, but couldn't finish it, (lots of work to do). But now for me it sounds a bit more like a marketing strategy than a real chance for me to get my hands on a better Pim implementation in PW. . . . Besides the above mentioned, here is a list of not supported methods in Gim: getOptions (very limited) setOptions (very limited) getImageInfo (returns nothing) getPimVariations removePimVariations sharpen unsharpMask stepResize watermarkLogo watermarkLogoTiled watermarkText canvas blur pixelate getMemoryImage setMemoryImage . The supported methods are: brightness colorize contrast edgedetect emboss flip grayscale negate rotate sepia smooth . New methods, that are in Gim, but not in Pim: mergePageImage (can be used for watermarking) merge (can be used for watermarking) write (can be used for watermarking) overlayImageStretched (can be used for watermarking) // drawing functions circle ellipse line rectangle roundedRectangle . And those are methods from Gim that could be used to emulate our PW crop and upscaling settings: crop zoomCrop cropResize forceResize scaleResize
  13. Hey @kurbel: I guess you use PW 2.5 stable? If you can upgrade to the dev version all related to this is fixed! To upgrade there is a new module available here: https://processwire.com/talk/topic/7525-module-processwire-core-upgrade/ It works just fine.
  14. If you know the pageid, you only need to get the page: // get the page for that id $internalpage = $wire->pages->get($pageid); // now check if the page could be found if ($internalpage->id != $pageid) return false; // you can also check for the id not 0 if ($internalpage->id == 0) return false; So, assuming your $pageid is right, you will pass the lines above and you should be able to access your images field as usual: $images = $internalpage->images; // lets check if there are images available or if the field in this page is empty, e.g. not uploaded any image to it if (count($images)) { foreach($images as $image) { // do stuff with the images ... } } BTW, welcome to the forums.
  15. No, you need to give it your email account credentials as you do with your favourite local Emailclient. It uses libs that tests and establishes connection to your account at a smtp provider (like gmail for example) and handles over the messages to it. It has nothing to do with your settings in the php.ini. Settings in php.ini are related to the php mail() function only!
  16. @renobird: Save open/close state of sidebar (via cookie).Does this include: save and recreate show / hide the complete sidebar save and recreate the collapsed state of each group (pages, setup, modules, ...) ? This would be awesome!
  17. if you not already know this, here is a grouped collection maintained by @pwired: https://processwire.com/talk/topic/4173-grouped-forum-posts-links-articles-tutorials-code-snippets/ @teppo has some things on his site: http://www.flamingruby.com/blog/php-for-template-designers/ (just ignore this twig stuff, focus on the php side), and there are more articles. The recipes are new but continousliy growing: https://processwire-recipes.com/ ...
  18. yeah, as they say, but concatenate the results, not overwrite them by each other: $read_test .= "<h4>" . $item->title . "</h4>";
  19. Yeah, but when reading the article that @jjozsi links to it seems that apple has done much more than only buying and using HiDPI displays. They have implemented a technique / layer that inspects browser content and displays images in normal dimensions on the screen but scale up texts to 200%. This way you are only able to see images that sharp and also can read the text without needing glasses. I'm not a apple fan, the only apple devices we have are iphones. All Tablets, PCs, Monitors, MP3-players, etc are not from apple.
  20. main.inc should keep the largest possible code for all your different layouts and include sub-xy.inc files. Lets say for example you have the default layout with $bodycopy and $sidebar and additionally a onecolumn layout without sidebar: You define a new variable e.g. $myLayout: // here is how it would look like in the /site/templates/init.inc <?php $headline = $page->get("headline|title"); $bodycopy = $page->body; $sidebar = $page->sidebar; $myLayout = "default"; // we only write the name without the fileextension, this way we also can set a CSS-class in the body tag! // or you put it into the head of every template file, here: /site/templates/basic-page.php <?php $headline = $page->get("headline|title"); $bodycopy = $page->body . $page->comments->render(); $sidebar = $page->sidebar; $subnav = $page->children; $myLayout = "default"; include("./main.inc"); Now move the smallest possible segment from your main.inc into default.inc and replace it in main.inc with an include("./$myLayout"): /site/templates/main.inc <html> <head> <title><?php echo $headline; ?></title> </head> <body class="<?php echo $myLayout;?>"> <?php include("./{$myLayout}.inc"); ?> </body> </html> /site/templates/default.inc <div id='bodycopy'> <h1><?php echo $headline; ?></h1> <?php echo $bodycopy; ?> </div> <div id='sidebar'> <?php echo $sidebar if(count($subnav)) { echo "<ul class='nav'>"; foreach($subnav as $child) { echo "<li><a href='$child->url'>$child->title</a></li>"; } echo "</ul>"; } ?> </div> Lets say you don't want the sidebar on your homepage, then you define / overwrite in your /site/templates/home.php the $myLayout var with $myLayout = "onecolumn"; // we only write the name without the fileextension, this way we also can set a CSS-class in the body tag! Create a file called "onecolumn.inc" and put in your desired markup, e.g.: /site/templates/onecolumn.inc <div id='bodycopy'> <h1><?php echo $headline; ?></h1> <?php echo $bodycopy; ?> </div> To stile your onecolumn layout with CSS you need to append to your css something like: body.onecolumn div#bodycopy { width: 100%; }
  21. @Martijn: ah, for me this makes sense: saving space with full images. And with a lot of images so boringly showing repetitive cropnames throws away the focus from the thumbnails. And that it is visually different from default images field is a plus. @Martijn: have you also read that if you have two or more croppable fields on one page, toggling the viewmode (list/grid) always affects all fields?
  22. Really? --- If you can find the time, you should drop in the code from my previous post and try it. - But also there is nothing to say against using array_unique. The only thing with your code is that you don't need to use this cool implode / explode trick because you initially have the array. So you first can run $outItems through array_unique() and then implode() it to get your outputstring. And when using array_unique() you don't need even to try to collect and compare category titles: // beginning of new design category code if($design_technique instanceof PageArray) { // create array for collecting output $outItems = array(); foreach($design_technique as $test_skill) { foreach($test_skill->design_skill_category as $example) { // collect for output $outItems[] = $example->title; } } // create the output $import_skill .= implode(" / ", array_unique($outItems)); // implode gets the result from array_unique here } //end of new design category code PS: But you should bookmark or somehow store this trick (explode / array_unique / implode) for later use if you once only have a string list with double items. I have bookmarked it (the link in the browser favourites and the code in my brain)
  23. Ah, I always use Thumbnails in Listview, have tried the fullsize images in Listview a while ago. Yes, the (unhovered) titlebar is transparent and overlaps the image. Maybe we simply should make it opaque? Or do you think this few lines can be important enough to not get covered? But anyways, I have to hand this over to @Martijn ! ------ In Listview with thumbnails I like it as it is now, but in Listview with centered fullsize images it may look a bit better if the buttons are appear directly under the image and centered too, followed by the text inputfields. But I have to give this to @Martijn too
  24. Hey @adrian, just to clarify: 1) in grid view (thumbnail view) you need to hover over the little headline (width x height), than this changes to "Edit" and you need to click this to get into a little modal window that holds all crop buttons and all the text inputfields, for e.g. description, tags, etc. Does this not work for you? If not, what browser version you are using? 2) what admin theme are you using? 3) Is this related to the list view or the grid view, or both?
×
×
  • Create New...