Jump to content

gebeer

Members
  • Content Count

    1,007
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by gebeer

  1. I solved the probem by deleting ModuleManager.cache. After that ModulesManager started just fine and was rebuilding its cache file.
  2. Hello and thanks for the nice ModulesManager module. I'm running into a problem after deploying the site on the live server. When I open ModulesManager I get this error: TemplateFile: cannot read cache file /is/htdocs/.../site/assets/cache/ModuleManager.cache The file is there and its permissions are set to 640 so it should be readable by PW. Any idea what might be the cause? Thank you gerhard
  3. gebeer

    Robots.txt

    Hello, this may be a dumb question, but I'm fairly new to PW and just have finished my first project. Now I'm asking myself: Where in the PW directory structure would I put the robots.txt file? My first guess would be /site/templates. Second is root. I'm asking this because I had problems with the favicon.ico. I still don't know where to put it so it gets picked up automatically by browsers. Itried various locations and then ended up putting it in templates dir and have a <link rel=icon" href="path/to/favicon.ico"> in the head section of my template. But I'd rather go without that link tag. Any enlightenment on the correct locations for robots.txt and favicon.ico would be great. Thanks gerhard
  4. @teppo thanks again. Yes, this solves my problem.
  5. 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.
  6. 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
  7. Frontend: Did you check with Firebug that all google maps JS gets loaded? Backend Sorry, no idea. Maybe someone else can jump in.
  8. @ 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.
  9. Our machines can do multitasking but we seem to be condemned to sequential operation
  10. 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
  11. 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
  12. Thank you for clarifying this. I'm on stable branch.
  13. @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.
  14. 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
  15. @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
  16. I think for number 2 you need the $page->render() function. On the API Cheatsheet it says: Returns rendered page markup. echo $page->render();
  17. 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.
  18. Hi Matthew, thank you for the hint. There's so many possibilities to discover. It's amazing. Cheers gerhard
  19. 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.
  20. Thank you Soma Working great and so easy once you know it
  21. 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
  22. 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
  23. 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.
×
×
  • Create New...