Jump to content

diogo

Moderators
  • Posts

    4,314
  • Joined

  • Last visited

  • Days Won

    80

Everything posted by diogo

  1. Wait until Soma reads this and you'll have one more
  2. That sudden sound made me nervous. Your website is totally NSFL (not safe for libraries) My first reaction was to press the bandolin with the bomb, but the effect of pressing several times on the other one is far more interesting
  3. Simple but nice for small debuggings https://chrome.google.com/webstore/detail/vardumpling/aikblkmigebodlhkdepmfmgdgmbokkdn?hl=en&gl=US
  4. Think of that home page as an aggregate of several pages on a "normal" website: In that case you would have something like this on the processwire tree: Home My work Aftershock Beyond Outrage .... Television appearances Colbert report, nov 2013 Daily Show, sep 2013 ... Posts Raising Most People’s Wages Why Ordinary People... ... etc Then, with the API, you can easily target those parent pages and display their children in your HTML structure. You need to know how to structure templates, fields and pages and learn the API You need to understand that in PW everything are pages, and pages are not necessarily representations of "viewable website pages" Consider going through the tutorials here http://processwire.com/docs/ Ahem! You don't need a framework to do something as simple as three columns. You can of course, but you don't have to. And welcome to the forums
  5. I also tend to the "direct output". If I'm writing HTML, I prefer to see the HTML. On the other side, one day I want to build an entire website only by using PHPs DOMDocument http://runnable.com/VCkzbk2_lq8s39vR/domtest-for-php By the way, that runnable.com site is great!
  6. diogo

    Quick Form ?

    Google forms are great https://docs.google.com/forms/d/1Mb1wReBKt7QR1CDmxNlaHTBJ03x6UVvXoLKQ0pxsMWw/viewform
  7. As I said here https://processwire.com/talk/topic/7728-module-firststeps/?p=74939 I think Blad's module would be perfect for showing around to our clients much more than new developers or designers. For those, Nico's is better because it shows the right places to learn. EDIT: hey, what happened to the link? This forum is crazy sometimes...
  8. I don't think developers need something like this (I would be annoyed at least), but it's a perfect solution for showing clients around! I would focus on that, making the module completely configurable so the developer can prepare a nice presentation of the interface once the site is finished. I would use it for sure
  9. Don't repeat data, connect it. I don't have time to go deeper than this now, but the post that Ivan linked to is very clear and easy to follow, give it a read and you will understand what I mean.
  10. That's true, but not inside PW
  11. I don't think anyone would miss the menu in this case, it clearly says "menu" on the menu button. All recommendations have to be taken with a grain of salt, let's not all become guardians of the "correct way" and start designing all websites in the same way.
  12. Please think for 5 seconds before posting! You are opening a php tag inside a php tag. Joss suggested you do that because you weren't clear if you were doing this inside or outside a php tag. You have two choices: <!-- Outside the PHP tags--> <div id="button3" class="button_style"><a href="<?=$pages->get("/kontakt/")->url ?>">kontakt</a></div> or <?php // inside the PHP tags. You are using single quotes, so you can't echo variables without closing them echo '<div id="button3" class="button_style"><a href="' . $pages->get("/kontakt/")->url . '">kontakt</a></div>'; ?>
  13. You need to study more, escaping the quotes comes explained in the first chapter of any php book
  14. Unrelated to the question, but just to say that you can do: <?php $navigation = $pages->find("parent={$page->parent}");?> Edit: or even: <?php $navigation = $page->siblings; ?>
  15. I manage to find a way, but it's highly untested, and would have to be worked upon. Hope it's understandable: if($session->selector) { // selector string resulting of the user selection, has to be in session // in the first time we need all the pages that were linked on the base page // after that we need only 3, the current page the previous and the next // we know if it's the first one if $session->start is not defined $limit = $session->start ? "3" : "10"; // if $session->start is not defined we want to start with the first item $start = $session->start ? $session->start : "1"; // for the pageArray $array = $pages->find("{$session->selector}, start={$start}, limit={$limit}"); $prev = $page->prev($array); $next = $page->next($array); // if there isn't session->start, give it the index of the current page in the array if(!$session->start) $session->start = $array->getItemKey($page); // if former page was the previous, add one to $session->start if($session->page === $prev->id) $session->start = $start + 1; // if former page was the next, subtract one from $session->start if($session->page === $next->id) $session->start = $start - 1; // store this page ID in $session->page to compare next $session->page = $page->id; // echo the prev and next links echo "<br><a href='" . $prev->url."'>Prev</a>/<a href='" . $next->url . "'>Next</a>"; } // at some point in the other templates would be good to unset $session->selector with $session->remove("selector") Edit: without the comments it's less scary Edit2: forgot the $session->selector, already added it if($session->selector) { $limit = $session->start ? "3" : "10"; $start = $session->start ? $session->start : "1"; $array = $pages->find("{$session->selector}, start={$start}, limit={$limit}"); $prev = $page->prev($array); $next = $page->next($array); if(!$session->start) $session->start = $array->getItemKey($page); if($session->page === $prev->id) $session->start = $start + 1; if($session->page === $next->id) $session->start = $start - 1; $session->page = $page->id; echo "<br><a href='" . $prev->url."'>Prev</a>/<a href='" . $next->url . "'>Next</a>"; }
  16. I think so. Usually prev/next work in time sequence and ignore the page where you came from.
  17. diogo

    Dancing Bear Music

    You can change that number depending on $(window).width()
  18. diogo

    Dancing Bear Music

    No messing var scrollTo = $(window).height() - 250; // eyeball this number $('html, body').animate({ scrollTop: ($playerdiv.offset().top - scrollTo) },500);
  19. diogo

    Dancing Bear Music

    Hm, not that easy to calculate the exact place because the player is closed before the animation starts, and we would need it's height to subtract to the browser window height. All we can do is hardcode the approximate height of the player. I prepared a small example: What you have: http://codepen.io/diogo-ed/pen/HJaxn How I think it should be: http://codepen.io/diogo-ed/pen/jbueD
  20. diogo

    Dancing Bear Music

    I get it, you are bringing the player above the fold while it opens. Maybe you can take the bottom of the player and the bottom of the window as the reference for the automatic scrolling. I think if you fine tune what you're doing now it will end up working well.
  21. A what??
  22. Maybe like this? http://www.tehplayground.com/#PF1X9PHPL
  23. But will you need all those pages? People are not going to press "next" 10k times And even if they do (they won't) you can always increase the start for each next page https://processwire.com/api/selectors/#start
  24. diogo

    Dancing Bear Music

    Use a media query and change the width in the stylesheet.
×
×
  • Create New...