-
Posts
6,648 -
Joined
-
Last visited
-
Days Won
365
Everything posted by bernhard
-
Change $config->httpHost for local development?
bernhard replied to steveooo's topic in Module/Plugin Development
now i get it... What about writing a small script that renames your page names according to your three environments? Could be a problem when you are relying on the page names somewhere but if you don't that could be an easy solution. Just an idea. Sorry, I don't know how critical changing httphost your way would be -
Change $config->httpHost for local development?
bernhard replied to steveooo's topic in Module/Plugin Development
i still don't get the problem -> make an entry in your hosts file and this problem is solved sorry, i don't get it. do you want to request one branch (one multisite instance) from different urls? -
Change $config->httpHost for local development?
bernhard replied to steveooo's topic in Module/Plugin Development
yes, i have an idea: ...or i am misunderstanding your problem. -
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"?
-
Change $config->httpHost for local development?
bernhard replied to steveooo's topic in Module/Plugin Development
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) -
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...
-
ProcessSlider - Image sliders for ProcessWire
bernhard replied to mauricius's topic in Modules/Plugins
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... -
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/
-
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
-
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...
-
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.
-
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
-
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!
-
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
-
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!
-
thanks diogo, I'm using adrian's function which can also log arrays https://processwire.com/talk/topic/4550-debugging-tips/
-
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
-
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" }
-
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.
-
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
-
not urgent at all, as it works once updated manually - i just wanted to report it to further improve the module
-
HermodBB - Basic BB/Forum/Comments module
bernhard replied to GuruMeditation's topic in Module/Plugin Development
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 -
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!