Jump to content

Frank Vèssia

Members
  • Posts

    601
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Frank Vèssia

  1. amazing, i will use for sure in all of my old websites switched to PW. I guess a good improvement could be adding a selector of pw pages in "Redirect to" with classic tree view so you can choose to write an external url or internal page.
  2. Ok, my fault, i was checking the folder permissions on old website directories and not in the new ;D
  3. I moved a site from one domain to another copying all files. Now when i create a page o trying to edit one i get this error: DirectoryIterator::__construct(/public_html/site/assets/cache/Page/6395/) [directoryiterator.--construct]: failed to open dir: No such file or directory it seems a dir permissions but i checked and i have all to 777
  4. I will try immediatly, looks nice
  5. Now i have 332 accounts.
  6. ok, i disabled for now any hash. Another question: there is no any pagination in users page in admin??
  7. the cache time is already set to 0. this is my template <? if($user->isLoggedin()==true) { if ($user->isSuperuser()==true){ $session->redirect("/processwire/"); }else{ $session->redirect("/members/" .$user); } } require_once('./func.inc'); // check for login before outputting markup if($input->post->user && $input->post->pass) { $user = $sanitizer->username($input->post->user); $pass = $input->post->pass; if($session->login($user, $pass)) { // login successful $session->redirect("/members/". $user); } } ?> <!DOCTYPE html> <html lang="en"> <? require_once('./head.inc'); ?> <body> <div id="container"> <? include('./top.inc'); ?> <div class="clearfix"></div> <div id="login"> <h1>Login</h1> <div id="block"> <form action='./' method='post'> <?php if($input->post->user) echo "<h2 class='error'>Login failed</h2>"; ?> <label>User</label><input type='text' name='user' class="uname" /><br /> <label>Password</label><input type='password' name='pass' class="uname" /><br /> <input type='submit' name='submit' value='Login' class="loginbutton" /><br /> </form> </div> <div id="block"> <?=$page->body?> </div> <div class="clearfix"></div> </div> <div class="clearfix"></div> </div> <? include('./footer.inc'); ?> </body> </html>
  8. I'm making a import script from my old db to PW db. My problem is users password field. In my db passwords are already crypted. When i create a new pw user like '$user->pass = "password"' pw automatically create the md5 version. Is there a way to skip this process and save the password as i have in my db?
  9. i made a control for loggedin users and redirect them in different pages for admins and registered users. if($user->isLoggedin()) { if ($user->isSuperuser()){ $session->redirect("/processwire/"); }else{ $session->redirect("/members/" .$user); } } everytime redirect goes to /members/user/ but if i refresh the redirect for superuser works, it seems the first time i login i cannot see the isSuperuser status...
  10. thanks, i will try
  11. ProcessWire News + Announcements ProcessWire Tips and Tricks Core Development
  12. Any idea to menage a lost password function for users?
  13. Thanks Ryan, i think this is a good start and meanwhile i'll wait the new system.
  14. I made it and it works good with just some modifications. this is my final code: $u = new User(); $u->name = $username; $u->pass = $password; $u->all the custom fields here $u->addRole($role); $p = $pages->get("/members/" . $user->name); if(!$p->id){ $p = new Page();} $p->parent = $pages->get("/members/"); $p->template = $templates->get("member"); $p->name = $u->name; foreach($p->fields as $field) { $p->set($field->name, $u->get($field->name)); } $u->save(); $p->save(); and this is the code after login: if($user->isLoggedin()==true){ $p = $pages->get("/members/$user/"); foreach($p->fields as $field) { $user->set($field->name, $p->get($field->name)); } }
  15. I've checked and you are right, but the strage thing is that also processlogin in not cheked in that role, so why i can login and not logout??
  16. my admin tree view is very long and it's divided in 3 pages. Now i want to move a page that is located in 2nd page to 1st page but it's impossible ;D and i cannot find a way to suggest and implementation for this situation. :-\
  17. I've logged in as test user, no admin rights. Now i cannot logout. If a go in admin the system tell me I don't have the permissions, and this is ok but when i click on logout right bottom link nothing appends, i just go to /processwire/logout/ but the page is the same with the access error displayed.
  18. big thanks as always
  19. Thanks Ryan, i will try this but i guess in the future when you will change users system i will have some problems updating PW...right ? (if i want to use the new system letting down this 'page trick')
  20. I'm starting using the user function to create custom user fields, but it seems not working. this is my code: $u = new User(); $u->name = $username; $u->pass = $password; $u->email = $email; $u->order_id = $order_id; $u->ipaddress = $ipaddress; $u->amount = $amount; $u->signupdate = $signupdate; $u->addRole($role); $u->save(); $session->redirect('/congratulation/'); the user was created but with only name, pass and role...i miss something? (Ryan,in previous post you told me it's not necessary to create the fields in the db first...)
  21. ops...yes. ;D i have this bad habit sometimes to use italian words for fields...btw you should correct this.
  22. I created a new template, i created two new fields for this template than i created a page with this template on second level, root->category->page. After this i get blank page, completely. Get back in the browser and clicked edit on this new page i can see in the tree view. the url is: http://ioaffiliato.com/processwire/page/edit/?id=5792
  23. When i try to write the title tag in a link on tinymce (<a title=''>)and save the page, the title disappear...
  24. I got this error when edit a page. Catchable fatal error: Argument 1 passed to WireData::setArray() must be an array, boolean given, called in /home/hdps/domains/ioaffiliato.com/public_html/wire/core/Data.php on line 37 and defined in /home/hdps/domains/ioaffiliato.com/public_html/wire/core/Data.php on line 68
  25. I used for two website and i cannot find any fault, it's perfect and easy to use, maybe you can add a function to cut some long text in itemDescriptionField because sometimes i could not have a summary text in my template in addition to body field and for feed it's good to have small text, but this is not a big problem.
×
×
  • Create New...