Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by gebeer

  1. Thanks Can for your ideas. After browsing through available modules, I think I'm going to use a modified version of Apeisa's cart module https://github.com/apeisa/Shop-for-ProcessWire/blob/master/ShoppingCart.module to add pages to a cart. Do you have any idea how to hook into the pages2pdf module on save/update of pages in the admin? I found this post https://processwire.com/talk/topic/2331-doing-additional-logic-after-saving-a-new-page/ Not sure though if that goes in the right direction and how to hook into pdf creation from there. Cheers Gerhard
  2. Hello and thank you for this module! I'm planning to use it on a client's side, but with some extended features: Users can add pages to some type of "shopping cart". All pages in the cart are then merged into a pdf that is offered for download. I am not talking about a webshop here, just the cart functionality. There is an extension for Joomla that does exactly that: http://netamity.com/extensions/contented-pdf I'm currently researching possibilities to build this with PW as I'm switching more and more over to PW from Joomla. So it would be great if you could give me any pointers on how to achieve the pdf cart thing in PW. Another idea is to create the PDFs for every page on save from admin. Then have the cart functionality which collects the already created pages and merges them into one downloadable pdf file. This would be less workload for the server (only merging existing files, no creation on the fly). Can we hook into your module from the admin on creating/saving a page? Cheers Gerhard
  3. I'm experiencing this problem on a vagrant box with nfs mapped www folder. Changing permissions of site/assets recursively and config.php to 777 doesn't help. I checked sessions folder. a 0 byte session file gets created. But the vagrant box has plenty of space available. I checked out brandnew dev branch, installed it and get the error on login to admin. All other PW sites on that vagrant box have the same problem. They used to work until recently. I'm not aware of any changes to the box that could have led to this behaviour. Any pointers to a solution would be much appreciated.
  4. Hi Larry, I have started a new thread about Yeoman genarator for PW.
  5. Hi all, today I stumbled upon yeoman and went searching for a PW generator. Larry Botha mentioned in a side not in his thread about MVC template approach that he has put a yeoman generator for PW together. I test installed it and it is working great. Pretty fascinating how quick we can setup a PW project with yeoman. This definitely can be a great timesaver. Larry's generator sets up a pretty opinionated PW install with his MVC structured fixate template and KSS etc. It would be great if we could have an unopinionated version that gives us a clean PW install. We could add options to the generator for installing a choice of boilerplate templates like the blank template, Foundation, Bootstrap, Blog etc. Just wanted to get your opinion on this. If any of you are interested, we could pull something together. Cheers Gerhard
  6. Hi Larry, thanks for the quick reply. I just test installed it on my dev box and am browsing through the structure. Indeed, this is pretty opinionated. So I'm not sure if I would want to work with it (no offense intended). It would be great if we could pull together a more general yeoman generator. I#ll start a new thread on that so we can get some feedback from the community.
  7. Hello Larry, this is great. Thank you for putting the Yeoman genarator together. Would you mind elaborating a little more on this, maybe in a new Yeoman generator thread? I think this can drastically improve our workflow with PW. Cheers Gerhard
  8. Thanks for pointing me to these options. I use these already and tried many other kinds of similar services. But none of them are like the real thing. I also like http://www.responsinator.com/. The name is just too cool. Especially when it comes to iOS-Safari specific bugs, Chrome device emulation doesn't reproduce them, like this one. When using device detection scripts, Chrome emulator doesn't return the correct user agent strings, see for example here I do test things with Chrome Dev tools but always on the real device, too. This seems the only way to make sure it is really looking as expected. Too bad, there is no real emulation for iPAd/iPhone available on Linux/Windows. Cheers Gerhard
  9. Thanks again. I see your point but don't have iPad available for testing right now. Will have a look at that next week. Cheers Gerhard
  10. Thanks for that. I'll give it a try. It resizes for screens 1024x768 (IPad), but not optimized for lower than that. Guess thats why the viewport meta tag is in there. Cheers Gerhard
  11. Hello totoff, thank you for taking a look at that site and taking your time to comment. I agree with what you are saying. But the design, images and structure of the site all came from the agency mentioned. I'm merely the guy who does the programming stuff. So, unfortunately, I have no influence on the contents of the site. If it was me, I would have placed "Im Notfall" under "Behandlungszeiten". Different people, different logic, it seems. If people ever read the welcome text on the homepage, I think they can associate the dentists name with the image. And she really is looking like a dentist, isn't she?
  12. Hi there, I just saw totoff's new doctor's site and thought, I add my dentist site here: http://zahnarztpraxis-wunschik.de/ Credits for design and concept go to http://www.gruenklee.de/grkl/ They did a great job on the design and photography. This is my first PW project where I learned my ways around. It is running on v2.3. I used the default site and married it with H5BP and added a sass framework for the styling part that I used in good old Joomla days. From the PW side of things, this wasn't a great challenge thanks to this great forum. I was very happy about the Gmaps field. Only had to tweak it a little to display the info bubble. And FormBuilder. Didn't want to spend too much time on the form coding in a new environment. Tricky part here was to get the datepicker to display in German. There are some Animation features. The three info boxes at the top are slidable. And there state (closed/open) is remebered across the site. That was tricky, too because I had never worked wit jQuery cookies before. Gave me some headache but finally worked out fine. There are also some image slideshow features in the header on the "Praxis&Philosophie" page and on the start page. I used cycle2 jQuery plugin which is absolutely great. And some slide-in effects on the team page. All in all I learned really a lot from setting this up. It gave me a good base to explore PW further and work on more challenging projects with even more Animations AJAX etc. that shall be presented here in the near future.
  13. That's what I actually did before. But then I wanted to get rid off the extra periods and single quotes to make the code shorter and more readable. I have this code and it is working well: note that $image->url is not in curly braces. This seems to prove your assumption wrong (no offense intended). Definitely
  14. What confused me in connection with curly brackets is the different behaviour when using single or double quotes. Starting with double quotes, e.g. $carouselId = 10; $carouselMarkup = "<div id='carousel-{$carouselId}'>" Result markup <div id="carousel-10"> BUT, starting with single quotes $carouselMarkup = '<div id="carousel-{$carouselId}">' Result markup <div id="carousel-{$carouselId}"> I just spent an hour until I realised that starting with double quotes is important when using variables inside a string (no matter if curly brackets or not).
  15. Thanks to Soma's teaching, I got this solved very quickly. And here's the code of my Bootstrap 3 carousel render function as gist. $carouselId = $images->get('page').$images->get('field')->id; is doing exactly what I wanted to achieve.
  16. @Soma thank you very much for taking your time to post this very informative lesson on how to do things in PW! Obviously, I'm still pretty new to PW and a self-taught PHP fiddler who is just emerging from the rookie stage. From this forum, I've already gained a lot of new insights. Love PW
  17. Hello Horst, thank you for that link. Very helpful, indeed. Actually, I found the solution to my problem through a link in that post to Ryan's post here. I can pass my own variable in the options array of $page->render(). On the page that gets rendered I check for the variable. If it is there, I don't include main.php. Love PW
  18. Hi all, I'm working on a function that outputs markup for a bootstrap 3 carousel. I'm passing the $page->images object to the function argument $images. To have an individual id for each carousel on a page with multiple carousels, I want to use the image field id and the page id of the page were the image field sits. I can get the image field id with: $images->field->id But I can't seem to get the page id although it's there in the var_dump of the $images object: object(Pageimages)[203] protected 'page' => object(Page)[206] protected 'template' => ... protected 'settings' => array (size=10) 'id' => int 1013 //this is the id I need ... protected 'field' => object(Field)[72] protected 'settings' => array (size=5) 'id' => int 100 //this one I can get with $images->field->id ... When I try $images->page->settings->id I get null. When I try $images->page->id I get 1012 instead of 1013. 1012 is nowhere to be found in the $images object. It is the id of the page from which I'm calling my function. But I'm not passing the $page object to my function. So where does it come from and how can I get the correct page id? Thanks for reading through this!
  19. For my case this seems not to be the case. Or it doesn't apply to the children of the page you get. I tried this code to retrieve children, including hidden ones, but it doesn't work. It only gets non-hidden children. foreach ($pages->get($page->id)->children as $child) : Before I had foreach ($page->children as $child) : which does not get the hidden children, either. Only this gets hidden children for me: foreach ($page->children('include=hidden') as $child) :
  20. I just start explorin different templating approaches. Ryan's main.php method appealed to me so I converted my template structure from the good old head.inc, foot.inc to the main.php structure. Everything is working fine. Just one thing I cannot get my head around: I have basic-page.php: <? // Template basic-page if($page->numChildren) { foreach ($page->children as $child) { $page->outMain .= $child->render(); // list the children } } include("./main.php"); ?> This renders all children, all of which have basic-sub-page.php as template: <article class="article row"> <h1 class="col-md-12"><?= $page->title?></h1> <figure class="figure col-md-4"> <?= $images; ?> </figure> <div class="text col-md-8"> <?= $page->body; ?> </div> </article> <? include("./main.php"); ?> $images is irrelevant for my question, it just outputs img code. You see that I include main.php also in the basic-sub-page.php. This is fine when I call the page directly. But when calling it through $child->render() in basic-page.php, then I don't want to include main.php. How can I conditionally include main.php depending on whether the page gets rendered directly or through $child->render() ? Any ideas would be much appreciated.
  21. The image name gets changed because PW makes a cached version of your image that gets the dimensions appended to the name. Why is the different name of the thumb image a problem? Do you want to use it on the page as a caption? Is the PW version of the example image a resized output, like bathroom.1000.0.jpg? This is because you are using $photo->size(1000,$options) As adrian said, with size() you will have to use width and height (sorry for giving you wrong example code above). If you change this to $photo->width(1000,$options) and your options array to $options = array( 'quality' => 100, 'upscaling' => false ); Then you get the desired effect. Please have a read through: https://processwire.com/api/fieldtypes/images/ It's all in there. It can't be responsible because it's code is not executed if you don't call the photoSwipe plugin in your template. You most likely get a JS error in your console.
  22. OK, so in Craigs photos.php and photos_index.php add this at the top: <?php include("./head.inc"); $options = array( 'quality' => 100 ); ?> And change every instance of $photo->size(1024)... $photo->size(260,260)... to $photo->size(1024,$options)... $photo->size(260,260,$options)... This ensures that the thumbnails are generated in the best quality possible. If the resulting quality is not good enough (you said you were picky about that) you still have the option to generate the thumbs through Photoshop and include a separate thumb-images field into your page template where you upload them. You only would have to make sure then, that both thumbnails and images are in the same order. Maybe you can attach a screenshot of the resulting page or, even better, one of the generated thumbnails on that page so we can see what you mean by "blurry".
  23. Hi Max, can you provide us with a link to the page or source code of the page, including css? The images might be blurry because their actual proportions don't match the displayed proportions. By default, PW doesn't change anything about the uploaded images if you do not tell it to do so. In your images field setup in the backend, do you have any dimension restrictions there? You can adjust the quality of your thumbnails with an options array that you pass on to the resize function: $x = 100; $options = array( 'quality' => 100,// adjust quality here 'upscaling' => false, ); $thumb = $image->width($x, $options); For more info see here. For fast page loading I suggest using a jQuery lazy load plugin.
  24. frankensteining - hahaha - hope you won't need too much power to bring it to live ;-) It took me a while, too, to get my head around the setup. What helped me to finally find the right setup was the section "Working with Existing projects" in the Foundation 3 docs here.
  • Create New...