Jump to content

bernhard

Members
  • Posts

    6,221
  • Joined

  • Last visited

  • Days Won

    308

Everything posted by bernhard

  1. it's using http://leafletjs.com/ and https://github.com/Leaflet/Leaflet.markercluster
  2. do you know the dev directory map? http://directory.processwire.com/map/
  3. your url for the site dota2.dayswithoutincident.net in your sitemap links to http://dayswithoutincident.net/dota2.dayswithoutincident.net and then redirects to dota2.dayswithoutincident.net not sure if thats by intention?
  4. there is no "maxlevel" in processwire - that's just the name that i gave the variable. $page->parents returns a pagearray of all parents of the current page. ->count() counts the number, so you get the level of your current page. you can then add 2 and have your "maxlevel" compared to the given item's level $item->parents->count() good luck
  5. you could limit the child-levels like that: $items = your_selector_including_all_levels; $maxlevel = $page->parents->count() + 2; foreach($items as $item) { if($item->parents->count() <= $maxlevel) { // echo your markup } } that may be not the cleanest solution as you select more data than necessary and remove the unwanted items afterwards, but if performance is not an issue i think that would be an easy solution? ps: didn't check the code! just wanted to show the idea...
  6. just awesome! thanks for this idea
  7. thank you pierre-luc, apache jmeter looks good i've only played around with apachebench so far. i hope i can try jmeter soon. thank you! any other suggestions?
  8. hi guys, i'm working on a project where the goal is to have 1.7 million page impressions per month. that would be 57.000 PI per day 11.333 PI per hour (calculating with 5 hours per day) 189 PI per minute 3 PI per second of course it will heavily depend on the websites setup. i'm planning to use procache and try to optimize everything as good as possible. i would like to get a rough idea of what i would need on server side. is this possible? any server experts here? thank you in advance
  9. tried it and got this foreach test title; ?> title; ?> title; ?> from that code: <p>foreach test</p> <?php foreach ($page->children as $item) { ?> <p> <? echo $item->title; ?> </p> <?php } ?> didn't know that as i'm always using it like lostkobrakai said
  10. i'm sorry i don't see anything wrong with the foreach... only thing i want to mention is that you will have images without source if there is no image. you should change this <li><img src="<?php if($child->image) echo $child->image->getThumb('thumbnail'); ?>" alt="<?php echo $child->voornaam; ?>" /></li> to that <?php if($child->image) echo '<li><img src="' . $child->image->getThumb('thumbnail') . '" alt="' . $child->voornaam . '" /></li>'; ?> but of course that does not solve your actual problem
  11. news: https://letsencrypt.org//2015/06/16/lets-encrypt-launch-schedule.html
  12. can't be coincidence that the guy in the video is called RYAN
  13. i bet ryan will refund you 100% if you are not happy welcome socrates - i also ask you to keep your postings free from such hard to read formatting. looks like we found willyc's little brother
  14. should not be a problem... somehow like this: $tag = $pages->get("/tags/fish/"); $poststotag = $pages->find("body*=" . $tag->title); foreach($poststotag as $post) { $post->of(false); $post->tags->add($tag); // tags is the name of your pagefield $post->save(); } no working code and surely full of mistakes but i think the principle should work maybe you have to check if the post is already tagged...
  15. thank you raymond, so it looks like there is no javascript/ajax magic built in like it is for example in the comments fieldtype. that would be awesome - although i have no need for either your current version or with ajax voting
  16. looks very nice! like albert asked on the module page i would also be curious if this module is only thought to be used in the backend?
  17. don't think you need a module for that. just edit your 404 page and paste the iframe of notfound.org (but didn't find infos on their website) https://processwire.com/talk/topic/3843-how-to-define-the-404-page/ https://processwire.com/talk/topic/10124-how-to-override-404-for-unpublished-pages/
  18. got it again today: Chrome Version 43.0.2357.124 m after reload everything ok again
  19. i thought about this but didn't want to recommend it i still don't get what's wrong with changing this $items = $pages->find("template=update-location, pt_map!='', sort=title"); to that $items = $page->maptable; your selector gets all pages with template "update-location" where pt_map is not blank, so no wonder that it shows all locations from every page in your website! edit: of course "maptable" has to be changed to the name of your pagetable field
  20. yes, in your example "url" would be a FIELD in your pagetable. for example: template "map" field: title field: maptable (type pagetable with items having template "maptableitems") template "maptableitems" field: title field: map (type mapmarker) field: markerurl (type text or url) then just use this settings: $map = $modules->get('MarkupGoogleMap'); $content = $map->render($page->maptable, 'map', array('markerLinkField' => 'markerurl')); ...and the marker would have no link (blank) or the link that you specify in your "markerurl" field. try it manually first. you then could set "markerurl" dynamically via hook or a seperate plugin. i think lostkobrakai made something that could fit here... please google or wait for his advice
  21. hi peter, the documentation of mapmarker states: markerLinkField Page field to use for the marker link, or blank to not link (type: string; default: url). so you could define any URL in an extra URL or TEXT field in your pagetable item. you could also set this field to hidden and populate it via hook to ##parent## and then replace all occurrences of ##parent## with any url like this: i tried it with a single TEXT-field called "markerlink" and put in ##parent## manually and the marker was linked correctly to the current page parent ($page->parent->url) $map = $modules->get('MarkupGoogleMap'); $content = str_replace("##parent##", $page->parent->url, $map->render($page->maptable, 'map', array('markerLinkField' => 'markerlink'))); edit: seems you updated your post i think there are also modules that populate the value of a given field to specific values? you could also use such tools to populate the "markerlink" field automatically and you then would only have to define this field to be used via mapmarker as link: $options = array('markerLinkField' => 'your_field_with_the_url_you_want');
  22. hi tpr, thanks for thinking about my problem at first i also thought about saving only the html but now i think i will go lostkobrakais approach of cloning all players and then re-referencing all the page fields. that way all style updates will also affect historical data and that's good for my project it's a site for a sports club and it wants to "archive" teams and players from previous seasons being accessible via the normal website menu. unfortunately i can't start on this because there are huge other parts to develop first...
  23. you can also access all pagetable items like this. seems cleaner to me (pagetable-field name "maptable" and map-field name inside the pagetable is "map"). $map = $modules->get('MarkupGoogleMap'); echo $map->render($page->maptable, 'map');
  24. yep, that's what i love pagetables for
  25. just tried the pagetable with mapmarker on basic profile and i think it looks very clean:
×
×
  • Create New...