Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by gebeer

  1. Hello, I have a frontend contact form with datepicker and need to have the german localization for it. I read about localization of datepicker on the jQuery Ui API page. How can I implement this in PW? I'm using FormBuilder module My form is loading these assets: InputfieldDatetime.js JqueryCore.js JqueryUI.js I rolled a custom UI theme and amended the js to have German language for datepicker. Now when I load that js file on top of the above mentioned, nothing changes. So I guess, the standard PW datepicker options do net get overridden by my custom theme js. In this thread apeisa says How would I go about it? Thank you gerhard PS: and sorry for doubleposting. I thought I explain my situation a bit more in this new thread.
  2. Sounds easy. But for a PW newb like me, how would I go about changing that URL? Talking about datepicker in frontend form built with fabulous FormBuilder module. Cheers gerhard
  3. Frontend: Did you check with Firebug that all google maps JS gets loaded? Backend Sorry, no idea. Maybe someone else can jump in.
  4. @ dragan this is a localhost issue. Try it on a life server and it should work. As far as I'm aware of, Gmaps don't work from localhosts. Since Gmaps API v3 there is no need for a key.
  5. Our machines can do multitasking but we seem to be condemned to sequential operation
  6. Hello, I'm using latest version of this module with PW 2.3 and it's working fine so far. But when in debug mode, it throws 2 notices/warnings: Notice: Trying to get property of non-object in .../wire/core/Page.php on line 275 Warning: Invalid argument supplied for foreach() in .../wire/core/Page.php on line 275 My form has no fancy fields and is sending the input to an email. There's one select field for a salutation (Mr., Mrs...). In the message that gets sent, the option values are put out instead of the option name. How can I change that? Cheers gerhard
  7. Hello all, I would like to add a standard Gmaps info window (the white balloon type with shadow) to my marker. I have a single marker on the map and use standard $map->render function. From the Gmaps API documentation about info windows I see that I somehow have to add something like var infowindow = new google.maps.InfoWindow({ content: contentString }); How would I go about that, can I create something like a hook event to extend the standard render function from the module or can I just add a piece of JS to the page? Any enlightenment would be much appreciated. Cheers gerhard
  8. Thank you for clarifying this. I'm on stable branch.
  9. @teppo & Martijn thanks a lot. I knew there would be a better way to do this EDIT Martijns solution doesn't seem to work in my case. I first get the page by ID $aktuell = $pages->get(1041); If I then do if (!$aktuell->is('unpublished')) the if condition is being ignored. But with if (!$aktuell->is(Page::statusUnpublished)) everything behaves as expected.
  10. Hello, I need to find a good way to check for the status of a page, whether it is unpublished or not. If I do echo $page->status I get these values: published: 1 unpublished: 2049 hidden and published: 1025 hidden and unpublished: 3073 My page is hidden by default. So to check for unpublished state I do if ($page->status == 3073) which is working fine. Only thing that worries me is that I know nothing about these status codes and whether it will always be 3073 for hidden and unpublished. So if you know a more generic way of doing this, please share it here. Thank you. Cheers gerhard
  11. @Ryan your code threw a little error because $summary was not defined. The first $text in the function should be $summary. Here's the complete fixed function: function truncateText($text, $maxlength = 200) { // truncate to max length $summary = substr(strip_tags($text), 0, $maxlength); // check if we've truncated to a spot that needs further truncation if(strlen(rtrim($text, ' .!?,;')) == $maxlength) { // truncate to last word $text = substr($summary, 0, strrpos($summary, ' ')); } return trim($text); } Cheers gerhard
  12. I think for number 2 you need the $page->render() function. On the API Cheatsheet it says: Returns rendered page markup. echo $page->render();
  13. Where did you add the code? It should go into the code for the month menu <!-- NAVIGATION FOR MONTHS --> <div> <ul id='topnavmonths'> <?php $monthpage = $pages->get("/events/months/"); $children = $monthpage->children; foreach($children as $child) { $class = $page === $child || $child->children->has($page) ? " class='on'" : ''; echo "<li><a$class href='{$child->url}'>{$child->title}</a></li>"; }; ?> </ul> </div> $page and $child represent the month page that you are currently on. $child->children represents the day pages of that month. has($page) now checks if the page we are currently on is in the day pages of the month we are in. This should do the trick.
  14. Hi Matthew, thank you for the hint. There's so many possibilities to discover. It's amazing. Cheers gerhard
  15. Thank you, Ryan, for sharing this with us. Using strip_tags and wrapping the output in <p> or whatever tags seems to be a great solution. And I don't think this needs to go in the core because everybody can implement their own favourite solutions.
  16. Thank you Soma Working great and so easy once you know it
  17. Hello all, this is a real beginner's question, I guess. Got stuck on how to select the nth child of a page. Couldn't find the right selector at the API cheatsheet or am just to stupid to understand them right. Also searched the forum. What I want to achieve is something like $page->child(2nd); I tried $page->child("start=2"); but the script then just stops there without throwing an error. I'm sure that should be pretty simple but have no clue atm. Thanks in advance gerhard
  18. Glad it helped. For keeping class on for month when you are on the day page: $class = $page === $child || $child->children->has($page) ? " class='active'" : ''; Worked fine for my case. Or the other way around like diogo suggested a few posts above: $class = $page === $child || $page->parents->has($child) ? " class='active'" : ''; Hope it helps. PS: nice picture from Bkk
  19. Try changing this line in your code $daypage = $pages->get("/events/months/$page->parent->name/"); to this $daypage = $page->parent; Give it a try and let us know.
  20. @pwired I stay there for max 5 month a time. So I get a tourist visa for 60 days with 3 entries which gives me 180days total and at the moment costs 90€. @Martijn I know that feeling.
  21. @BFD Calendar what is the $page->parent->name, when you are on a days page?
  22. I was asking if you visit Thailand often Ko Lipe is nice, indeed. I live in Ranong and love the little Island Koh Chang in the Andaman sea.
  23. Kop khun maak krap. Bai pratheet Thai boi mai?
  • Create New...