Jump to content

bernhard

Members
  • Posts

    6,670
  • Joined

  • Last visited

  • Days Won

    366

Everything posted by bernhard

  1. I'm not sure if that is a really good solution... someone could also add panoramic images with weird dimensions like 100x10.000 why don't you just set the minimum to 400x400 ? then it would fit 600x400 and also 400x600. maybe an additional option for the area could make sense, like minimum 400x400 and area of 240.000, so 500x500 would work but 400x500 would NOT. but don't you think that could get a little complicated for the clients? what error message would you display? "please upload a picture with at least 400x400 pixels and an area of at least 240.000 square pixels"?
  2. hi steveooo, i'm doing it with some entries in my hosts file (on windows its C:\Windows\System32\drivers\etc\hosts) 192.168.33.10 local.dev # VAGRANT 192.168.33.10 site1.dev # VAGRANT 192.168.33.10 site2.dev # VAGRANT 192.168.33.10 site3.dev # VAGRANT 192.168.33.10 is the ip of my virtual machine with the webserver but you could modify that to 127.0.0.1 (localhost) and access your server via any domain you want (like site1.dev in the example or also site1.com, demo.com etc)
  3. don't want to blame other systems as they are all doing great work. but i'm just happy that i found processwire and do not get such welcome screens any more i tried the demo here: http://www.opensourcecms.com/scripts/details.php?scriptid=191&name=Drupal seems that processwire is not listed there...
  4. The site profile you are using has delayed output (on mobile search for that keyword) You need to put all the slider markup in the variable $content instead of echoing it: $content = $slider->render...
  5. how many zip-codes do you have? you could also create a matrix with all the distances between the zip-codes. you would only have to calculate the distances once and also the selection of the results would get far easier and more performant. https://processwire.com/talk/topic/8581-module-matrix-fieldtype-inputfield/ maybe a filter system like macrura did here fits your needs: http://ohmspeaker.com/speaker-filter/ (see advanced filter) https://processwire.com/talk/topic/3671-ohmspeakercom/
  6. you could for example create a treenode for all zip-codes with lat and lng values: - zipcodes |- 100 (title = 100, lat = 16..., lng = 48...) |- 101 (title = 101, lat = 15..., lng = 47...) then calculate the distance like showed in my links, but you dont need to query the database when you are using processwire pages. its something like: <?php $zip = ... // center of search $radius = ... // radius to search $results = ... // array to store results foreach($pages->get('/zipcodes')->children as $item) { // calculate distance to requested center $distance = ... // see stackoverflow example if($distance <= $radius) { $results[] = array($item->id, $distance); } } // order $results by distance // render each result sorry, 1 step missing. after you have your zip-codes within your radius you would have to get all pages that match that zip-code. you could use a pagefield in your dealer's page to choose the zip-code (it has to reference the pages under /zipcodes so that you can calculate the distance from lat/lng create a string with your zips inside the radius with php implode to get something like "100|101|104|105" and then use a selector to select all dealer's pages that have one of those zip-codes in its pagefield: https://processwire.com/api/selectors/#or-selectors1
  7. hi liam, welcome to the forum! you need zip with lat/lng in your database and then you can do something like this: https://www.dougv.com/2009/03/getting-all-zip-codes-in-a-given-radius-from-a-known-point-zip-code-via-php-and-mysql/ http://stackoverflow.com/questions/8549940/zip-code-proximity-calculation-in-php maybe you have to keep an eye on performance depending on your dataset...
  8. bernhard

    Html2png?

    thanks guys, i'll have a look at phantom.js! maybe i'll also adapt my already in use pdf approach
  9. bernhard

    Html2png?

    Does anyone of you know a good way to create pngs from html? I want to render the content of a ckeditor field as png for something like a photobook creator. The problem with creating PDF is that my library adjusts the font size to the content so I get inconsistency between preview and printed PDF. The goal is that I can edit the content via something like FEEL, update the preview via ajax and have exactly the same result in the PDF! Thank you for your suggestions.
  10. ok i thought there was an easy way like almost always in pw but wouldn't it be relatively easy to create a hook to update all sort fields in the database? quite similar to the sortPages method: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Process/ProcessPageSort.module#L101
  11. hi tired_eyes, welcome to processwire! you can also take a look at the blog https://processwire.com/blog/ - there's the place where you see all the news explained in detail. i've added the rss feed and am always looking forward to fridays (the day where blog posts are published) have fun with pw!
  12. hi stephenoc, welcome to the forum. you can also resize images on ajax upload: https://processwire.com/talk/topic/3718-lots-of-images-to-resize-timeout-in-frontend/ could also lead to timeout / memory issues but just wanted to show the option
  13. I would also go with lostkobrakai's suggestion and create a pagefield to choose the new "top" page. You don't have to look up sort numbers and remember them. Easy and built in scalability due to ajax pagination!
  14. for anyone who is also curious what cerulean is talking about, here's the pagefield of dev 2.6.23
  15. thanks diogo, I'm using adrian's function which can also log arrays https://processwire.com/talk/topic/4550-debugging-tips/
  16. It does not use any api key... Note: The following Maps APIs previously did not require an API console key: Google Maps JavaScript API, Google Static Maps API, Google Street View Image API, Google Maps Geocoding API, Google Maps Directions API, Google Maps Distance Matrix API, Google Maps Elevation API, and Google Maps Time Zone API. This is still supported for legacy applications to ensure backwards compatibility, but is no longer recommended for new applications. https://developers.google.com/maps/faq anyway... just don't use my excel - it's nothing google's api was built for
  17. hi lostkobrakai, you are right, i removed the excel-sheet as it uses google maps api and you are only allowed to use it when you display the results on a map... i thought google would handle the limitation on their own by just blocking too frequent requests per one IP edit: they do { "error_message" : "You have exceeded your daily request quota for this API. We recommend registering for a key at the Google Developers Console: https://console.developers.google.com/", "results" : [], "status" : "OVER_QUERY_LIMIT" }
  18. link removed due to restriction of google maps api: Terms of Use Restrictions The Google Maps Geocoding API may only be used in conjunction with a Google map; geocoding results without displaying them on a map is prohibited. For complete details on allowed usage, consult the Maps API Terms of Service License Restrictions.
  19. When i try to edit entries of a pagetable on my tablet i have the problem that it thinks i want to move the row instead of opening the modal. it does only work after zooming in (00:43): have you ever been struggling over this? should i report this on github? looking forward to hearing your opinions edit: i think the sort/move-feature should also be locked somehow on mobile devices because when scrolling down is has often made me move some entries accidentally
  20. not urgent at all, as it works once updated manually - i just wanted to report it to further improve the module
  21. Looks really great I would love to see the possibility to subscribe to a topic and get notified by email when an answer is posted
  22. hi diogo, thanks for the great module! i just moved a site from dev to live server and got an open basedir restriction error. it looked for the template file unter /var/www/site/... instead of /var/www/vhosts/xyz.com/site/... i had to go to that page and assign the template again. maybe you can change this to use relative paths down the PW rootpath? thanks PS: no problems with the scripts and styles paths!
  23. hi adrian, that is great!! i was also a little uncomfortable with the pagetable and external parent setup. are there any issues regarding pagination or will this also be solved when numChildren is hookable?
  24. hi naldrocks98, on the api side image fields are always multi no matter what the settings say! $society->society_logo->removeAll(); // add this line $society->society_logo->add("http://www.thefilipi...ogo/accp.jpg"); $society->save(); explanation by ryan: https://processwire.com/talk/topic/2597-multiple-image-bug-when-using-api-resolved/?p=25452
  25. ah, of course! thank you changed it to this: $form->insertAfter($button, $form->get($field)); edit: got an error on unpublished pages so i excluded the button there: $process = $event->object; $form = $event->return; $page = $process->getPage(); if($page->is(Page::statusUnpublished)) return; // added this line
×
×
  • Create New...