Jump to content

arjen

Members
  • Posts

    1,222
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by arjen

  1. This is possible. You can also add a language and then set the guest role to your language.
  2. Looking really great! Great addition to the showcase list. You might want to change © Copyright 2012 into © Copyright 2013
  3. Perhaps I'm getting this all wrong but is this what you are looking for? foreach ($templates as $template) { echo $template->name; }
  4. I've noticed that when adding a markdown style of link in notes or description by default a target="_blank" is added. Is there any way to circumvent adding the target="_blank" tag? For now I've added some jQuery to remove the attribute, but it would be nice to have an option whether to use target="_blank" or not. $(function(){ $(".Inputfield_yourname .notes a").removeAttr("target"); });
  5. I had this once while using include/include_once and variables. I tried doing something like: $content = include(/path/to/file);That resulted in a "1". My solution was to use the $content var in the included file.
  6. Perhaps the imageverify Image field is set as a single file? I can image it won't work with ->first.
  7. Just stopping by to say thanks! Great post and great comments. It is indeed very much appreciated!
  8. Thanks Ryan, How would you build the selector using the frontpage_always strategy? (Or even the page reference strategy) $pages->find("template=post, frontpage_always=1, max_date>=$today"); will still only return items with the max_date greather than today. So posts without a date but with the checkbox frontpage_always will be discarded. Thanks for your note about the timestamp thing. Didn't knew that! Additional: I think i've found another way to fix this. It feels hackish, but the following seems to work. $latestPosts = $pages->find("template=post, frontpage=1, max_date>=$today")->add($pages->find("template=post, frontpage=1, max_date=null")); $pages->find("id=$latestPostsMaxDate, limit=3, sort=-created"); Now both the checkbox and the maximum date seems to work.
  9. $userNames = array(); foreach ($users->find("start=0") as $u) { array_push($userNames, $u->name); } This should place all the usernames in an array.
  10. foreach ($users->find("start=0") as $u) { echo $u->name; } Doesn't output anything? There should be at least to users: guest and you as admin.
  11. Which is the context you are calling this? Template, module? Do you by any chance defined manually a variable called $users?
  12. This seems to return all my users: $users->find("start=0")
  13. Thanks DaveP, I should've noticed that I'm using pagination on the homepage. Your code results in the following id's: 1016|1018|1057|10591020. Notice the last id is missing a pipeline. Another options would be: $today = strtotime( date('Y-m-d'));$pages->find("template=post, frontpage=1, max_date>=$today")->add($pages->find("template=post, frontpage=1, max_date=null")); But then my pagination won't work. If I can get a limit=10 in the selector the pagination will work. Food for thought! As always there are many ways to do the same thing in PW. True. Thanks for your ideas.
  14. I think that's quite good and there's many people think PW has exceptional documentation for a OS project. For some strange reason we still have to figure out why some people think the opposite. This is absolutely true. I think most people just want to do their own stuff - which is totally understandable. But it would be better to study the planets, Joss, blog profile, skyscrapers profile and created the first site afterwards. One thing I had a hard time understanding is the modal stuff like $this->that->image->url. Those things are difficult to cover in any tutorial, but my experience is that you have to read between the lines. And suddenly you know it when you understand it.
  15. You should check out the ImportPagesCSV. It can import users too. I've not done it myself, but read through the forum thread for more info!
  16. Hi, I've strangled my brains around - what it seems easy selector issue - but I can't seem to get the right results. The situation is: I've got a template called 'post' with a checkbox field called 'frontpage' and a date field called 'max_date'. The frontpage checkbox is to let the editor know to place the article on the homepage and the max_date is to give a post an optional maximum date on the frontpage so the post will not show if that date has passed. On the homepage I would like to load: The last created 10 posts with the checkbox frontpage checked and if there is a max_date check if it's greated than today otherwise load the post. The following code works, but won't load the post with no max_date filled in. I could use the ->not() function, but then the limit won't work. $today = strtotime( date('Y-m-d'));$pages->find("template=post, frontpage=1, max_date>=$today, limit=10, sort=-created");I'm on PW version 2.2.9.Any thoughts? Thanks! edit: I would like to use pagination.
  17. Thanks doolak! Could use some more sleep this month.
  18. Hi Soma, I've read through the entine thread and documentation and most things are clear. I've got one question though: How would you add current-parent class to a parent? For example: I am on /services/service-1/. The menu renders as following: Home --Services (this is the page I would like to add another class) ----Service 1 (current, which applies a current class) ----Service 2 --About --Contact Offcourse I can use jQuery to do this, but I was wondering if the mighty MarkupSimpleNavigation might be able to do this. Thanks!
  19. What are your experiences with those DaveP?
  20. Try to read through the code since Ryan did a good job describing the steps. You can find that around line 237. Also, you might be interested in the Form Builder. This module has a lot of options which require second to none programming skills. It is build by Ryan and has a very ProcessWire feel to it.
×
×
  • Create New...