Jump to content

AndZyk

Members
  • Posts

    591
  • Joined

  • Last visited

  • Days Won

    6

AndZyk last won the day on April 8

AndZyk had the most liked content!

About AndZyk

  • Birthday 09/12/1987

Profile Information

  • Gender
    Male
  • Location
    Furtwangen, Germany

Recent Profile Visitors

4,838 profile views

AndZyk's Achievements

Hero Member

Hero Member (6/6)

834

Reputation

3

Community Answers

  1. Hello @Roel, here is a tutorial how to upgrade ProcessWire: https://processwire.com/docs/start/install/upgrade/ For upgrading ProcessWire and modules I would recommend the module ProcessWire Upgrade: https://processwire.com/modules/process-wire-upgrade/ Regards, Andreas
  2. I am not sure, if this module works for exporting users as CSV. You could write your own CSV export script, like also mentioned in the thread posted above: Just write the code at the beginning of your template: <?php header('Content-Type: text/csv'); header('Content-Disposition: attachment; filename="blog-posts.csv"'); $items = $pages->find("template=blog-post"); echo "title,url" . PHP_EOL; // Add more fields here foreach($items as $item) { echo "\"$item->title\",\"$item->url\"" . PHP_EOL; // Add more fields here } return $this->halt(); For users this script could look like this: <?php header('Content-Type: text/csv'); header('Content-Disposition: attachment; filename="users.csv"'); $items = $pages->find("template=user, include=all"); echo "name,url,email,password" . PHP_EOL; foreach($items as $item) { echo "\"$item->name\",\"$item->url\",\"$item->email\",\"$item->pass\"" . PHP_EOL; } return $this->halt(); But the user password is stored encrypted, so I don't think that this would help you much. Or don't switch to WordPress. πŸ˜‰ Regards, Andreas
  3. Hello @nicolant, maybe you could try this module mentioned here: But I would always store HTML, CSS and JS files in the templates directory. πŸ˜‰ Regards, Andreas
  4. @sladedesign You mean the module BatchChildEditor? I don't have much experience with this module but you can enable the Export CSV mode under Mode Settings in the module configuration. There you can also configure the CSV export settings. Then you have to set where the editing tools are available and you can see them under the children tab of those pages. There you can export the children of the page as CSV. Do you want to export your blog posts from ProcessWire as CSV to import them into a WordPress website? Or what is it you want to achieve?
  5. Thank you for your explanation. In this case maybe a multi-instance or multi-site would be better: https://processwire.com/docs/more/multi-site-support/ I don't think it is possible to have two different home pages with one installation that easy. πŸ˜‰
  6. Hello @Manaus, it should be possible to create new pages without a template file. Does this template or the parent template some special restrictions under the Family settings? Regards, Andreas
  7. Thank you for explanation. This is working for me: <?php if ($input->urlSegment1) { $userID = $sanitizer->int($input->urlSegment1()); $u = $users->get($userID); if ($u->id) { if ($u->hasRole("login-register")) { echo $u->name; echo $u->email; } else { wire404(); } } else { wire404(); } } If you always get a 404 error, then maybe your ctype_digit check fails. Regards, Andreas
  8. Hello @Liam88, do you mean the free Login Register module or the commercial Login Register Pro module? I have no experience with the commercial module but I think neither require URL segments. You either just let the module do its default behavior: <?= $modules->get('LoginRegister')->execute() ?> Or you customize it: <?php if($user->isLoggedin() && !$input->get('profile') && !$input->get('logout')) { // you take over and render your own output or redirect elsewhere $session->redirect('/some/other/page/'); } else { // let the LoginRegister module have control echo $modules->get('LoginRegister')->execute(); } Source Regards, Andreas
  9. Hello @ZAP, this may not be the answer you are looking for, but I would really consider your approach in making a website available for multiple domains. For search engines that could be considered duplicate content and for users it could be annoying, because f.e. they would have to approve the cookie consent again. I would recommend you to figure out what the default language and domain of your website should be (English or Portuguese) and then redirect the other domain to the language of the default domain (portuguese.org to english.org/pt/). The default language (in this case english.org) doesn't require a language URL (/en/). If you look at major companies like f.e. Apple, Adobe, Microsoft or Amazon that is how they handle it. If you really want to do this, you could look at this solution: Regards, Andreas
  10. If you just want to delete all WebP files you also could do this via the command line in your site/assets/files: find . -name "*.webp" -type f -delete Source But only if you don't have WebP files manually uploaded in your file fields, so be careful. The module posted above is more safe I think. πŸ˜‰ There was also a receipe by Ryan a while ago, but I cannot find it.
  11. In ProcessWire everything is a page. There is no separation between pages and posts like in WordPress. So yes, the solutions in this thread should work too. πŸ˜‰
  12. Hello @slatedesign, for CSV have a look at this topic: As for XML I don't know why you would need this. Regards, Andreas
  13. Hello @Martinus, maybe findRaw() could simplify your solution: $a = $pages->findRaw("parent=/products/, seller=amazon, rating>0", "rating"); print_r ($a); // check array echo array_sum($a); // sum of all values in array Regards, Andreas
  14. I was referring to the selector string options of a page field under the input tab. If your case is more complicated than that, sorry I don't think I can help you. πŸ˜‰
  15. Hello @MarkE, I think you need to add "include=all" or "check_access=0" to the selector of your select options field for other user roles: https://processwire.com/docs/selectors/#access_control $pages->find("template=repeater_field, include=all"); Because as you already mentioned repeater pages are children of the Admin tree which other user roles cannot find. Regards, Andreas
Γ—
Γ—
  • Create New...