Jump to content

diogo

Moderators
  • Posts

    4,296
  • Joined

  • Last visited

  • Days Won

    79

Everything posted by diogo

  1. Maybe we should have a forum for this kind of doubts. PUB is too general...
  2. Thanks Mathew, nice words to read Anything you need from my experience, just ask.
  3. I was in doubt if I should post this one because it's not completely ready. The site is for a thesis project of a friend. In short, he collects raw videos filmed by the random citizen in the Historical Center of Oporto to further analyze and contextualize them. The videos are being submitted on the site, uploaded to youtube and shown on a big random wall. The project will be rethought, and might change a lot in the future. I guess that's why I decided to post it now... PW has a big part on this since every video that is uploaded to youtube is kept as a PW page and connected to a filmmaker (also pages). This allows me to collect all the videos quickly without the limitations that are imposed by requesting with the youtube API, and allows me to keep much more information for each video than YouTube Would. It was also very easy to create a script to import some videos that were already on youtube to the system. PW rocks http://museudoresgate.org/
  4. First time i saw it was on my android, and it looked great! I went immediately to the computer to see how it would look like there.
  5. Great! Thanks Mike! Congratulations to Ryan and PW!
  6. You don't even need the two fields on the template. Since you only need one information, the title is enough. So, in your example, the title would hold the the "yes", "maybe" and "no" values. To output do this instead: $page->yes_no_maybe_selector->title; or $page->yes_no_maybe_selector->name;
  7. diogo

    Confused by Pages?

    Great explanation! I failed on the German accent though...
  8. what about if you output the image normaly, without using the getThumb() method? edit: also, try to access the images directly, by pointing the browser to their url. Both, full version and cropped.
  9. What doesn't show, only the images or the repeaters themselves? Are you able to echo the titles for instance?
  10. [quotamos]Calm down, it happens in other iframe based editor too.[/quotamos] But some "other" iframe based editor has already a nice solution http://ckeditor.com/demo#div
  11. diogo

    bookmarks

    yes, or simply filling the wiki. the point is having the information organized so we can decide what to do with it
  12. Yep, there is a problem when gmap is hidden. This happened to me on the frontend of a site where I was using jqueryUi to show the map, and apparently it's very common with lightboxes. The problem is that, if you are using display: none; to hide the map, it first gets rendered with 0px size, and this is what jquery's .hide() uses. The solution would be to use visibility:hidden; or position it absolutely outside of the screen instead. But I think this wouldn't be easy to do in the admin, since it's using jqueryUi...
  13. The clouds are moving on my browser
  14. Here's a great example of mobile first http://aneventapart.com/ I love how it looks in my android phone!
  15. Or simply do this if($page == $pages->get(/the_page/)) { include("code-for-the-page.inc"); }else{ // carry on }
  16. Finally I took the big step of creating a bookmarks folder only for bookmarking threads or individual post from the forum. If someone wants to follow maybe we can have a nice repository of code in some months by joining everything. Just an idea
  17. I can't try it right now, but will have it a go as soon as i can. You should have more weekends like this one
  18. A good way of knowing what is possible to do in pw is to keep in mind that the system was built with the exact same tools that are available to us. And that, as on our own websites, everything is a page
  19. You can also take a different approach to soma's suggestion. Instead of changing title and headline, just create a new field "nav" for each page and change this in your code: <ul id='topnav'><?php $homepage = $pages->get("/"); $children = $homepage->children; $children->prepend($homepage); foreach($children as $child) { $class = $child === $page->rootParent ? " class='on'" : ''; $nav = $child->nav ? $child->nav : $child->title; echo "<li><a$class href='{$child->url}'>{$nav}</a></li>"; } ?></ul> Now you can choose the nav text for any page, and if left blank, the title will be used
  20. oh, of course, sorry! the homepage has to go outside the loop <ul id='topnav'><?php $homepage = $pages->get("/"); $children = $homepage->children; $class = $homepage === $page ? " class='on'" : ''; echo "<li><a$class href='{$homepage->url}'>Home</a></li>"; foreach($children as $child) { $class = $child === $page->rootParent ? " class='on'" : ''; echo "<li><a$class href='{$child->url}'>{$child->title}</a></li>"; } ?></ul> This should work, i also had to check for the class another time for the homepage only. This is not the DRYest code, but should work. Try Soma's suggestion, seems more clever than this
  21. <ul id='topnav'><?php $homepage = $pages->get("/"); $children = $homepage->children; // we don't prepend the homepage to the array anymore foreach($children as $child) { $class = $child === $page->rootParent ? " class='on'" : ''; echo "<li><a$class href='{$homepage->url}'>Home</a></li>"; //echo the homepage echo "<li><a$class href='{$child->url}'>{$child->title}</a></li>"; } ?></ul>
×
×
  • Create New...