Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/17/2019 in all areas

  1. Just stumbled across this old thread. I found a very good source for a well maintained world countries list! Available in multiple languages, in CSV, JSON and SQL formats, with associated alpha-2, alpha-3, and numeric codes as defined by the ISO 3166 standard, and with national flags included: http://stefangabos.github.io/world_countries/
    4 points
  2. gebeer, thanks for your reply and answering such a basic question :-) Yes, this is exactly I was trying to achieve. I really like the Processwire forum. It is such a friendly community with helpful replies.
    2 points
  3. This is basic PHP looping over an array. Since $blogimages is an array, you need to foreach over it to output every image in that array <?php $blogposts = $pages->find("template=blog-post"); foreach($blogposts as $blogpost){ $blogimages = $blogpost->images; foreach($blogimages as $image){ $imgthumb = $image->size(500, 300); echo "<img src='{$imgthumb->url}' alt='{$imgthumb->description}'>"; } echo "<h2><a href='{$blogpost->url}' >{$blogpost->title}</a></h2>"; echo "<p>{$blogpost->body}</p>"; echo "<br>"; } ?>
    2 points
  4. @Knubbi I can't believe anyone is still considering 1&1 as a viable hosting option for... anything really. According to this, you should be able to do so. And according to this, you should grab your things and run for the hills. I can't recommend any hoster in Germany (I live in Switzerland, and all clients insist on a .ch hosting company), but I'm sure you'll find something more professional, serious and stable than what you currently have. In the long run, the extra bucks you spend will be money well-spent. (but of course, there are black sheep everywhere in the industry, not just in the lower-price area)
    1 point
  5. Processwire is a gift that keeps on giving. Yup, that's the one.
    1 point
  6. Update: Menu Builder 0.2.6 Changelog Added the properties numChildren, totalChildren and showMoreText for use with getMenuItems(). Added option maximum_children_per_parent to limit the maximum number of (included) children a menu item can return. Thanks @derelektrischemoench for inspiration/request. Fixed CSS issue that affected menu items' trash cans in the backend. Thanks @duncan. Refactored code to improve efficiency. In dev branch only for testing. I have also updated the docs, especially around getMenuItems(). @derelektrischemoench, See this gist for an example recursive menu builder function that uses maximum_children_per_parent and showMore. OK, breaktime over, back to Padloper! :-).
    1 point
  7. You can customize everything with bookmarks (Pages->Find->Bookmarks). Just select which fields you want to output. As for other solutions: if you want to see thumbnails in page tree, there's a module for that.
    1 point
  8. I have now, and it works perfectly. Thanks! ?
    1 point
  9. @Robin S - on mobile so can't test but have you tried the Dumps Recorder panel? If that doesn't help I'll try to investigate later.
    1 point
  10. Hi, here is ProcessPageToggle module and it is almost the same like @dragan post link to another forum thread, or what can be found inside Processwire Copy/Clone module. This is basic variant and need to be configured inside file, as example: // ProcessPageToggle.module // set action button label protected $actionLabel = 'Favorite'; // set page template(s) protected $templates = array('blog'); // set page checkbox field name protected $targetField = 'favorite'; Download, edit, and install like any other PW module. ProcessPageToggle.module
    1 point
  11. Hi @kongondo, thank you for your feedback. I am glad that you like my suggestions. And I would be happy to help you with testing!
    1 point
  12. Interesting. It looks exactly as if it was drawn using yEd ( https://www.yworks.com/yed-live/ or installable version for Windows) Regarding the Page Builder, as @elabx said, there's nothing plug and play at the moment. See https://www.google.com/search?q=site%3Aprocesswire.com+page+builder
    1 point
  13. @cb2004 I did this many years ago for a Textpattern site when I wanted to migrate the passwords from old style hashes to newer ones. I haven't got anything for PW, sorry. The methodology is pretty much what I laid out in the post above yours. Maybe others could advise you about the best hooks to use, but I'd guess at doing a before hook on session::authenticate(). Something like this in site/ready.php would be a start (totally untested)... wire('session')->addHookBefore('authenticate', function($event) { $user = $event->arguments(0); $pass = $event->arguments(1); $imported_md5_password_hash = trim($user->md5_field); // Is there a value for the imported md5 field? if ('' !== $imported_md5_password_hash) { // Yes! then create the md5 of what the user just typed in. // NB: You need to change this code so that the value generated here follows the algorithm for the generation of // the password set you imported. $md5 = md5($pass); // and see if it matches the stored value for this user if ($md5 === $imported_md5_password_hash) { // it does, so create and store the PW version of the $pass the user just typed in... $user->of(false); $user->pass = $pass; // @see https://github.com/processwire/processwire/blob/master/wire/core/User.php#L23 $user->md5_field = ''; // Clear the md5 field so this path is bypassed on next login. $user->save(); } } }); If the match on the MD5 hash works, it stores the PW-hashed version of the user's password and saves. As this is a before hook, and the password compare and replace happens here, I think that's all that should be needed. Of course, you still need to import those hashes into the "md5_field" above (rename as needed.) Adding an md5_field to the user template allows you to easily locate which users have updated and which haven't using normal PW selectors. YMMV - but I hope that starts you off in the right direction.
    1 point
  14. Put it on Githhub again..https://github.com/SiNNuT/countries/ Not actively maintained, but i don't think there were a lot of new countries the last year.
    1 point
×
×
  • Create New...