• Content count

  • Joined

  • Last visited

Community Reputation

7 Neutral

About Doc

  • Rank
    Full Member
  • Birthday

Profile Information

  • Gender
  • Location
  1. Thanks to both of you. The support is awesome here I'll use LostKobrakai's proposal to filter the right user. I shouldn't have added the same email, but, I like the idea to filter them correctly as they don't have the same privileges.
  2. Hi, I've just hit a problem I didn't think of. I've registered a fake player on my website (still in dev) with the email I've used for the administrator. So, when I connect, password doesn't match and I can't sign me up. I'm using : (sum up) $connect_user = $users->get("email=$email"); if($connect_user && $connect_user->id) { $username = $connect_user->name; } else { echo "unknown email"; } // if everything is ok : if ($session->login($username, $password) !== null) { // Go on It only retrieves the admin (guest, superuser) roles but not the player I'm looking for, who has another kind of role. Is there a way to add the role filter in the $users->get ? I've used too : $connect_user = $users->find("email=$email"); but it brings back different stuff than $users->get. Thanks
  3. hey @szabesz, thanks for all those links ! I'm going to read all that and will post here the one I choose.
  4. Hi, I'm looking for a nice forum I could use with PW. I'd like to use the same credentials for the PW website and for the forum. Any advice on that ? Thanks
  5. Hello, When do you choose to use $input->whitelist($key, $value) rather than $session->myvar (with myvar = 3 for example) ? The documentation uses the example of the MarkupPagerNav module : "An example is the MarkupPagerNav plugin module, which provides an easy way for you to have pagination. Lets say that you used it to paginate search engine results. [...]" (from But If I don't have pagination, but some variables to store for each member of my website, do I have any interest to store them with whitelist rather than within sessions ? Thanks
  6. Good to know, thank you ! My tests were made inside /site/... .
  7. Hello, I'd like to put some backend files for example in /backend. I'd like to access them directly with (behind a htaccess for example). How can I do that without declaring that file as a template/page ? Right now all I have is a "this localhost page can't be found". Thanks
  8. Understood, thank you both.
  9. Yes, I understand that. But then, how can I translate the parameters too ? Do I have to do this separately ?
  10. Thanks @Martijn Geerts It kinda works but I don't get the opportunity to translate the parameters actually. I write in my translation file '/path/to/myfile.php ' I write : __('Hello %1$s how do you %2$s?', '/path/to/'), 'Doc', 'do') but through the admin, the only sentence I see waiting for translation is : 'Hello %1$s how do you %2$s?'
  11. Hi guys, I've just discovered (thanks to you) textdomain, which works fine. Now I'd like to use that functionality with sprintf rather than echo __("my string to translate", "my path") Is it possible ? Thanks
  12. Hi, When I'm registering a user : $u = new User(); $u->name = $username; $u->pass = $password; $u->addRole("guest"); $u->save(); ... is there a way to tell that the user was correctly saved ? Can I merely check with : if ($user->id) // OK else // KO I'm asking that because when I'm registering a new user, I'm also saving that $user->id in another table. So I'm wondering is there any clean way to check that, otherwise I'll use a basic check on the existence of $user->id. Thanks
  13. Thanks @Sérgio, I should have read more attentively that part, I didn't know those textdomain where the thing I was looking for. The doc wasn't crystal clear for me, but this post made me understand the way to do it :
  14. Hi guys, I've just had this wonderful idea : I know that multi-language field (example : $page->myfield) are useful whatever the page. I mean you can define a multi-language field in your homepage and make use of that same field in another page and benefit of the different translations there too. Is it the same for translatable string (such as echo __("blablabla")) ? Am I able to translate some strings in one template and benefit of those translated strings in another template ? Thanks