Jump to content

Manaus

Members
  • Posts

    209
  • Joined

  • Last visited

Everything posted by Manaus

  1. Thanks Horst and Soma, now working!!!
  2. Thanks Horst, looks like one, but it's actually L..
  3. Hello, I have a form submitting some values, but I get a strange behaviour. Just after submitting, I cannot see the delete button. It's visibile when loading the page normally though (GET, !POST). echo $user." ".$l->createdUser; // always matches if ($user->isSuperuser() or $user === $l->createdUser) { echo "<a href='{$_root}delete-item/?proj=$page->id&item=$l->id'>Delete</a>"; // sometimes visibile, sometimes not } These are my attempts echo (int) $user == $l->createdUser; // always true, even if values don't match echo (int) $user == (int) $l->createdUser; // always true, even if values don't match echo (int) $user === (int) $l->createdUser; // always true, even if values don't match echo (int) $user->id === (int) $l->createdUser; // never true echo $user == $l->createdUser; // usually works correctly, but not just after $user posted something echo $user === $l->createdUser; // same as previous Thanks for any suggestion
  4. Great Adrian, thanks!! [removed dumb question :]
  5. Wonderful work, the admin side looks so snappy now
  6. Thanks Adrian, but how do I define 'new articles'? The user should see only those published between his last visit and now... is there any $user->lastLogin() ?
  7. Hello, I need to show only new articles to logged in users, I believe it's done with cookies, but really can't figure out how to proceed.. Any suggestion? Thanks!
  8. RT @processwire: Introducing ProcessWire 2.4 – http://t.co/9csgCle7en – Field Dependencies, New Admin, Enhanced Language Support and much m…

  9. Per chi fosse stanco della pioggia, le pillole del sole http://t.co/oH3SY5SwfZ

  10. Hello, I'm trying to display the just uploaded image on the page, but I can't make it work. This is the code <img src='<?= $user->avatar->last->getThumb('thumbnail') ?>' alt='' /> I get a Call to a member function getThumb() on a non-object error. Still the image is uploaded correctly, as I can see from the admin... Instead if I load the page as a usual Get, I can see the image correctly. This is the code I use for uploading the image... $user->of(false); $user->avatar->deleteAll(); $a = new WireUpload('avatar'); $a->setMaxFiles(1); $a->setOverwrite(true); $a->setDestinationPath($user->avatar->path()); $a->setValidExtensions(array('jpg', 'jpeg', 'png', 'gif')); foreach ($a->execute() as $files) { $user->avatar->add($files); } $user->save(); $user->of(true); Thanks for any suggestion
  11. $12M di aumento di fatturato per aver rimosso un http://t.co/VHhsqy4RZD #lessismore !

  12. Hello, I have a page with multiple checkboxes, each enables or disables (or should) a Page value in a template... the Page value represents $users linked to that specific page. I have this code: $d = $input->post->recipients; // array of values, such as rec[1010]=>true, rec[1024]=>true $c->of(false); // $c is the page foreach ($d as $dest) { $c->recipients->set($dest, true); // recipients is the Page field in the template } $c->save(); $c->of(true); Still I have it not working, Thanks for any suggestion..!
  13. Hello, I have this code $a = new WireUpload('documents'); $a->setMaxFiles(10); $a->setOverwrite(false); $a->setDestinationPath($c->documents->path()); $a->setValidExtensions(array('jpg','jpeg','png','gif','doc','docx','xls','xlsx','pdf')); $c->of(false); foreach ($a->execute() as $files) { $c->documents->add($files); } $c->save(); $c->of(true); but I manage to save only one file... I put the multiple="multiple" attribute on the file input. Any suggestion? Thanks!...
  14. RT @txpbuilders: Beautiful. “@eklectiv: Olden, Norway by Georgia Sassenfeld http://t.co/dLxs6kcVef http://t.co/dvoGfDD7XU”

  15. Hi, I'm having an error "Method Page::template does not exist or is not callable in this context" because I'm using {% if page.template == "project" %} in a template. I'm passing $twigvars = array("page" => $page) to the template. Is there any workaround for getting this conditional on a template? (started learning twig yesterday... Thanks!
  16. Just discovered @coastbyopera well done guys!

  17. The fleeting art of Andres Amador http://t.co/OA8G3oyMhW

  18. PostgreSQL Exercises servono sempre http://t.co/YryTWno0No

  19. I vastly prefer Textile over Markdown: the *thing* appears as _this_ and **this** is different from *this*... What's more, on Italian keyboards you don't have the ` sign. I'm wondering what about French, Spanish etc. Pros in textile are bold, italic, links notation, and so many other things. Cons is titles, I agree, and popularity.
  20. Hello, I can't see a role "halfsuperuser" I just created within the page access permissions ("Who can access this page?")... I can only see guest and super-user. How can I see the new one? Thanks!
  21. Thanks Adrian. I can't find last in the documentation, just last() (which is behaving differently, as it seems) Any hint where I can look? Thanks!
  22. Hello, I'm trying to ckech whether a user is allowed to see a specific page. The page has a Page field, holding the assigned users. I tried $page->allowedusers = $user, $page->has($user) and so on, but it's not working... Thanks for any help.
×
×
  • Create New...