Jump to content

adrian

PW-Moderators
  • Posts

    10,912
  • Joined

  • Last visited

  • Days Won

    349

Everything posted by adrian

  1. Hey Marty, I can't seem to reproduce in today's dev version. Did you get Ryan's updates from today with improvements to the new name checker? Did you do a hard reload to update js scripts?
  2. Hi ank and welcome to the forums. Hard to know exactly how you have things set up, but give this a go. It's untested, so there might be something slightly amiss, but should be close: <?php $pagename = $page->child->title; foreach($page->children as $child) { $headimage = $child->headimage->first(); $thumb = $headimage->size(600, 400); $pagename = $child->title; echo " <div class='section'> <a href='{$child->url}'> <div class='sectionimage'> <div class='image'> <img src='{$thumb->url}' alt='{$headimage->description}'></img> </div> <div class='caption'> <p>{$child->title}</p> </div> </div> </a> <div class='brands'> <ul>"; foreach($child->children as $childchild) { echo "<li><a href='{$childchild->url}'>{$childchild->title}</a></li>"; } echo "</ul> </div> </div>"; } Sorry for getting rid of all your echo statements - they were driving me crazy
  3. davo, Just a quick note to say that I tested on the front-end and it works fine like this: $modules->get("EmailNewUser"); $u = new User(); $u->name = 'newuser'; $u->email = 'newuser@gmail.com'; $u->save(); Note that I am manually calling the module - that avoids the need to make it autoload on the front-end. I don't see where in your form builder hook that you create a new user ?
  4. Sorry to be late on this, but I have made this work on the front-end and from memory, it sounds like you are on the right track with the Inputfield_id issue. Sorry, not enough time to look at things properly right now, but I think you are close
  5. Ok, all makes sense now Your needs are different from the person I put that together for - they wanted the root parent changes, not to actually drill down to the specific page. You can get directly to the specific page with this: public function changeParent(HookEvent $event) { $pid = (int) $this->input->get->id; $event->replace = true; $event->return = str_replace($pid, $rootPageID, $event->return); } BUT unfortunately this doesn't load the images available on the page because the check to see if there are images available or not happens here: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Process/ProcessPageEditImageSelect/ProcessPageEditImageSelect.module#L129 which is before the execute method we are hooking into. So I think you'd actually have to hook directly into ProcessPageEditImageSelect::getImages which is not currently hookable. But maybe you should add the ___ to it and play around and see if you can get it work. Sorry I don't have time right now, but I think it should be doable. If you get it to work, Ryan should be amenable to making it hookable in the core.
  6. Not sure I follow - if there are images available from that root page, it should work just fine - note the message about no image fields.
  7. One more update - The module now applies its rules during the adding of a new page (not just editing like before). Obviously there is no affect for the "Initial Differences Protected" setting, but all other settings are relevant and now work.
  8. $userID = wire("user")->id; as you have it in your modified version will work fine I would test your changes to the module in the admin first - if that works, then you can focus on the front-end issue.
  9. Seems like that should work - is it not changing the parent, or is it changing it to the wrong page? Have you checked the value of $rootPageID to make sure it is what you expect?
  10. Another update today! I noticed more and more people in the forums are using with the "Disable Settings Tab?" option (available via: $config->advanced = true). With this disabled, and if the "Display 'name' field in content tab?" setting is not enabled, the "Name" field is not available for javascript manipulation when the title is changed. This update checks for these two settings and if required it will change rename behavior to work on page save instead of instantly via javascript. This alternate method respects the "Initial Differences Protected" setting, but of course the "Prevent Manual Changes" and "Live Changes Protected" options are not relevant since it isn't possible to manually change the page name since the field is not available in the page edit dialog. This update is therefore only relevant if you are using that "Disable Settings Tab?" option, but if you are and you're using this module, please let me know if you have any problems.
  11. You could make use of PW's url segments and window.history.pushState - they work together very nicely
  12. Just a quick guess - I did make the module only load for the admin at some point, but it was several versions back. Try going into: EmailNewUser.info.json and changing: "autoload": "template=admin", to: "autoload": true, If that works, I'll consider changing it back for you in the main module code. Let me know if that works for you.
  13. Nico - are you thinking of a Typo3 plugin for Migrator?
  14. You don't need imagemagick to do watermarks. horst has an amazing module that can do it for you via GD which is part of PHP: http://modules.processwire.com/modules/page-image-manipulator/ If you do want to use imagemagick, I would suggest the pecl imagick extension (http://pecl.php.net/package/imagick) - it can handle almost everything that imagemagick can handle and allows you to do it directly from php, rather than via exec system calls.
  15. This sounds like an .htaccess problem. If you are running Lighttpd instead of apache, you will need to adjust the included .htaccess rules - mainly the rewrite rules, but potentially others too. Google "Lighttpd .htaccess" for some assistance on that front. Currently PW only officially supports apache by default, but there is a guide to getting it up and running with nginx. I don't think there is anything yet for Lighttpd. Maybe if you figure things out, you could write something up.
  16. What about making use of the Core InputfieldSelector field? It is what drives Lister's sections. I haven't played around with it much yet, but it might help you achieve what you are looking for.
  17. Not that I necessarily think it is a good idea that you're logging people in using the password in the url! But I thought it would be a good idea to add this functionality anyway - so with the new version you can now control the character sets used in the automatically generated password, as well as its length. Turning off the "Special Characters" set should take care of what you need. Let me know if that works for you.
  18. Out of curiosity - does if($page->sidebar != '') work with the Markdown formatter enabled? What do you get if you: echo '"'.$page->sidebar.'"'; Is there anything ouput between the double quotes when the field is empty?
  19. <?php $graduates = $pages->find("template=graduate-detail, sort=-date"); foreach ($graduates as $graduate) { echo " <img src='{$graduate->graduate_photo->first()->url}' /> <h3>{$graduate->title}</h3> {$graduate->graduate_summary}<br/> <a href='{$graduate->url}'>Read more</a> <hr/> "; } ?>
  20. tobaco - you can control the fields visible in profile edit mode - just go to the settings for the core module called User Profile
  21. Looks like you have a multi-image field without using ->first()
  22. Hi Andi, The wordpress migrator works great with kongondo's blog module. You just need to make sure the field and template names match. These are fully configurable in the wordpress migrator settings. If you have already installed the blog modules these should be easy to figure out, but let us know if you have any questions.
  23. I have just committed an update that adds an option to send a test message from the module settings page. The fields in the email body will come from the sending user's account so you must have an email entered for your account and if you have fields like first name etc in the body template, then you should have those completed for your account also. If your body template makes use of the {pass} code, in the test email you will see "password" instead of your actual password. Please let me know if you find any problems with this new version or any other ideas for improvements.
  24. I went ahead and made it an option. By default it is added to the shortcut button, but you have the option to prevent this. Also made a couple of other minor fixes / tweaks. Joss - let me know if that works ok for you.
  25. You might also want to make sure Admin > Pages > Pages Delete is gone - I think that is what you'll need to manually delete - the uninstall routine for this was broken for a bit, although it is fixed in the latest version.
×
×
  • Create New...