Sérgio Jardim

Members
  • Content count

    273
  • Joined

  • Last visited

  • Days Won

    7

Sérgio Jardim last won the day on July 19

Sérgio Jardim had the most liked content!

Community Reputation

379 Excellent

About Sérgio Jardim

Profile Information

  • Gender
    Male
  • Location
    Belo Horizonte, Brazil

Recent Profile Visitors

4,279 profile views
  1. Hello, zaib! Welcome to the forums. To add a language to PW's admin, you need to: Install language modules ->https://modules.processwire.com/modules/language-support/ Add a language pack, that is nothing but a bunch of json files contaning already translated strings. But I'm afraid there is no Arabic language pack available. Which means that no one created one yet. As there's no language pack, you need to translate the strings yourself. Check the language forum: https://processwire.com/talk/forum/14-multi-language-support/
  2. Did you set autoload to true? I was getting the same problem with a module and I read somewhere that it will only invoke the ready method if autoload's true.
  3. Hi, @skovar! In the end, I decided to not use the module on the project I was working on because some requirements changed, but I think it's working, but I didn't try it with the latest version of PW. What I mean is that with my pull request, the module can upload the image variations.
  4. You probably set your publish_date field to automatically set a default date (NOW()) on page save.
  5. Yes, it is. Go to the Input tab on the field settings and add a value to "Columns of Checkboxes". I forgot to say that the options are going to be divided automatically, you cannot control the column order like you mentioned.
  6. Maybe this gives you ideas: http://foundation.zurb.com/emails/inliner-v2.html
  7. Very cool project! That's a great use case for PW you got!
  8. @kdarmody I think the tickets are expired, but I can try! Send me your first and last names and email via private message and I'll send it to you using their form.
  9. Add a password field to the album template; On the page, create a password and save; Add the form to the template; Add this code, or something similar: if($input->post->album_password) { //save on session variable so if the user reloads the page, he/she can still be logged in $session->album_password = $input->post->album_password; } if($session->album_password == $page->password) { //show content here } elseif($input->post->album_password && $session->album_password != $page->password) { $error = "Incorrect password"; //echo error }
  10. Instead of doing that, why won't you just add a simple password field to the album page? So, you won't need to worry about sessions and admin access.
  11. As far as I know, all translations are kept as json files on assets/files folder. I don't think they will be deleted if you uninstall the module. Give it a try but backup the json files first.
  12. Strange, I didn't have this problem after migrating from Mac to Windows (the other way around). But try uninstalling and installing the module again.
  13. Maybe you can create a textformatter to add the classes for you automatically after page save. Or, in your sass file, extend the .title class for all headers.
  14. You're right! I didn't know that.
  15. Instead of $pages->count you may prefer to use $pages->findOne, so you can search for pages hidden or unpublished. See: https://processwire.com/api/ref/pages/find-one/ So: <?php $firstname = $sanitizer->text($input->get->firstname); // firstname should be the name of the input field $lastname = $sanitizer->text($input->get->lastname); $fullname = $firstname . $lastname; $sitetocheck = strtolower($fullname); $p = $pages->findOne("name=$sitetocheck"); if ( $p->id ) { echo "Sorry, seems you 're already registered"; } else { $p = new Page(); $p->template = 'basic-page'; // set template $p->parent = wire('pages')->get('/about/'); // set the parent $p->name = '$fullname'; $p->title = '$fullname'; $p->save(); echo "Thanks for registration"; } ?>