Jump to content

onjegolders

Members
  • Posts

    1,147
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by onjegolders

  1. I've had a little look at the page cloning module and am trying to figure out a way of doing something similar whereby when a page of type member gets added, a new "user" page is also added, with the same name. Would this be something that could be done using this tool or would I be able to do something with a page save hook? If so, any tips on where to get started? I've already achieved this through front end forms and the API but as the rest of the administration in this case runs through the backend I thought it may be more logical to use the admin. Thank you.
  2. Ah you're right thanks Wanze, if I was more than half-awake I might have noticed that! Thanks buddy
  3. Hi Ryan I've just checked and am getting "Fatal Error: Call to a function isSuperuser on a non-object. That object appears to be $user. Is $user not always present even if not logged in?
  4. Thanks Ryan will double check.
  5. Thanks Diogo, thought it had to be possible somehow
  6. I think for now it might be best practice to let PW handle the "name" attribute as per this post by Wanze http://processwire.com/talk/topic/3262-create-non-duplicate-page-name-via-api/ Thanks.
  7. Hi guys, I'm currently trying to add events to a calendar where each event will have a date as a parent. I'm trying to error check duplicate entries under the same date to avoid having the system error show. So an event can share the same name and title if it has a different parent essentially. But I can't seem to find a selector to test this. In words: if parent's name is $input->post->date and name is $input->post->name then set error to 1 Could anyone point me in the right direction? Thanks
  8. Congratulations Ryan, she's gorgeous!
  9. I agree with what others have. You could certainly combine repeater boxes with shortcodes and that way you'd have the ability to drag and drop them to reorder on the page. Alternatively you could create different templates which the client could select for each page. news1.php (links at top) news2.php (links at bottom) news3.php (no links) I'm sure someone could come up with a clean way to incorporate this into PW but I have doubts as to if anyone will due to their reservations about the idea. I'd love to see Nico's shortcodes module more extensively as I think it has huge potential (probably the best thing about WP). If not perhaps look at something like Concrete5 which uses this way of thinking though I'm sure you can achieve what you want with PW.
  10. Thanks Luis, this is a really helpful tutorial. I did have an issue with an unexpected token but by piecing your code together with some from the plugin docs I managed to get it working.
  11. Hiya Horst thanks, it gets sanitized further up.
  12. I've temporarily got around this problem by using Pete's excellent Maintenance Mode module which essentially does exactly the same thing. Whole site is unattainable unless logged in.
  13. Am seeing an error when failing with a login which I've never seen before. "Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Error has been logged." If login succeeds the page redirects fine but when I input an incorrect combination, rather than an else statement I get the above error. The code I'm using is: <?php $out = "<h6>Please login below</h6>"; if($input->post->username && $input->post->pass) { $user = $sanitizer->username($input->post->username); $pass = $input->post->pass; if ($session->login($user, $pass)) { $session->redirect("/"); } else { $out = "<h6>Sorry, your login credentials were not correct.</h6>"; } } ?> <?php include("./header.inc"); ?> <div id="login" class="content"> <div class="row"> <div class="large-5 columns"> <?php echo $out; ?> <form action="./" method="post"> <label for="username">Username</label> <input type="text" name="username" autofocus> <label for="pass">Password</label> <input type="password" name="pass"> <input type="submit" value="Login" class="btn grey"> </form> </div> <!-- /.large-5 columns --> </div> <!-- /.row --> </div> <!-- /#login.content --> <?php include("./footer.inc"); ?> EDIT: Just to say there are no errors in errors.txt
  14. Thanks both of you! I went with yours Dave as I am extremely lazy It works a treat!
  15. Hi guys, Any ideas on how to get all pages of a certain template that have been created this month? I have tried to test for "created" within the selector and combining it with date("m") but I'm not sure how to go about this? My goal is to set invoice numbers combing an autoincrementing value with each invoice that is created within a given month. Any ideas? Thanks
  16. Thanks guys. I find that one a little surprising though but good to know.
  17. Thanks guys, is that true about seeing unpublished pages if logged in? Will try the cache, thank you.
  18. I wanted to temporarily unpublish or hide a blog page while it was being worked on but it seems that if you go directly to /blog then the page still displays. Is this normal behaviour? Edit: I suppose the blog page is made up of links to its children with "blog-entry" as template should that affect things?
  19. Can you access pages other than the homepage also?
  20. Sounds obvious but have you checked your path to the CSS file? Are you using PW's built-in head.inc file or your own?
  21. Yellow, Foundation definitely does this, it has a generator. Not sure about TB. Then you have tons of other lightweight frameworks like Skeleton which Ryan uses.
  22. Love that © 1994 If it ain't broke...
  23. Diogo, I think it depends how you use the framework. Personally I get great use out of the responsive grid and a few defaults like form elements. I certainly try and avoid using the very obvious Bootstrap TopBar or anything like that. I wouldn't say that any of the actual design is compromised by my use of Foundation. Also on their site, you can select which parts to include in the download so that you don't end up with the bloat. The biggest advantage for me is not having to worry (or worry as much ) about floats and cross-browser issues and it lets me spend more time on the actual design process
  24. That was a great answer by kongondo. My answer. Responsive design is not harder than non-responive, in fact it's a great deal simpler. Of course not everything has to be responsive but using a framework (like Foundation, which I much prefer to Bootstrap) gives you piece of mind in terms of how browsers behave plus it's just easier not having to worry about exact dimensions and floats when you can just specify a number of columns and away you go.
×
×
  • Create New...