Jump to content

tires

Members
  • Posts

    225
  • Joined

  • Last visited

Everything posted by tires

  1. Many thanks to both of you! I solved it this way and put the following hooks in my site/ready.php ... First hook to grab the URL: $this->addHookBefore('ProcessLogin::buildLoginForm', function(HookEvent $event) { // --- Split URL --- // $actual_link = explode('/',(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"); // --- Putting the last i.e. fifth part of the URL in a session cookie "weiterleiter" --- // $this->wire('session')->set('weiterleiter', $actual_link[5]); }); Second hook to redirect after login: $this->addHookAfter('Session::loginSuccess', null, function($event) { // --- Get session cookie "weiterleiter" and write it in $weiter --- // $weiter = $this->wire('session')->get('weiterleiter'); // --- If the $weiter is not empty add the path and write it in $url --- // if(!empty($weiter)) $url = "artikel/".$weiter; // --- Redirect to the URL --- // $this->wire('session')->redirect($url); // --- Delete the session-Cookie ---// $this->wire('session')->remove('weiterleiter'); }); That works for me! Is there a smarter way to do this? Or a smarter way to get the url by segments?
  2. To allow the user to check the box, I need to give the role permission to view and edit the field. I also apparently need to give the role page editing permission ...
  3. Thank you! While trying to implement your solution I found an even easier way. I restricted the access in the field settings to specific roles. This works pretty well!
  4. HI! I would like to show some fields (checkboxes) in the user profile depending on the role of the user. I.e. If the user has the role "checker 1" the first check box i shown when he is editing his profile. If the user has the role "checker 2" the second check box i shown in his profile. BTW. I am using the LoginRegister module for users to edit they profile if this makes a difference.
  5. It would be a pity if the module was not continued! I'm afraid I can't contribute in any helpful way. Unfortunately i lack the skills ...
  6. By visiting the hash URL to checking the mail manually i get the following error message: Deprecated: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in /mydomain/mysite/site/modules/ProcessEmailToPage/flourishlib/fMailbox.php on line 505 How can i avoid this?
  7. Ok, i find it out: If i add "$config->pagefileSecure = true;" to my site/config.php all files are secure immediately! I does't have to do any further steps to secure old files.
  8. After a few month walk by i just want to ask again: Is there a way to change existing files into secure files? If i understand this right after i add the $config->pagefileSecure = true to my config file all files from now on are secure ... but not the old ones, right?
  9. Check this: in the .htaccess the "RewriteBase" ... should be "/" in site/config.php the $config->httpHosts entries ... is the url entered correctly in site/config.php set the $config->debug to "true" to get further error messages
  10. Thanks! Do you have any idea how to avoid a GET var and just work with the normal URL? And where to grab this URL so i could redirect after login? Do i need another hook for this purpose? This test hook doesn't output a segment at all: $this->addHookBefore('ProcessLogin::buildLoginForm', function(HookEvent $event) { $segment = $this->wire('input')->urlSegment1(); echo "This is my" . $segment; });
  11. Hi! I made a little intranet with processwire. If there is a new article a mail containing the URL (https://mysite.com/article/name-of-my-article/) is sended to each user. If the user klicks on the url and he is not already logged in he is now redirected to the login page (in this case a frontend login with Login/Register module). After login he is redirected to the start page but not to the URL from the mail. What is the most simple way to get a proper redirect to the expected URL? Do i have to work with a cookie? Where do i have to write and read this cookie? Thanks!
  12. Hi! I try to add one of my lister bookmarks to the main navigation in the backend. Is there a simple way to do it? And my second question: is there a way to render the bookmarked pages in frontend? May i use a bookmark as a select for pages->find? Thanks!
  13. Thanks! The RestrictTabView module seems to be a good way. Do you have a sample code for a hook to hide the crop / focus etc.?
  14. Hello! I wonder if i can create a minimalist backend for some user groups. They don't have to see the unpublish and hide option in the page tree, neither the page settings tab. For image fields the crop, focus etc. options as well as the actions are not necessary ... Is there an easy way to achieve this? Or a module? Cheers and thanks!
  15. If i undertand it correct you just need: $herstellerfilter="manufactor='Hersteller abc'"; $pages->find("template.name=produkt, parent.name=meine_produkte, $herstellerfilter");
  16. Hello! Is there a way to output a notification if the forgot password verification code is expired and the user is redirected to the login form therefore. At the moment there is just the redirect (after 60 minute run off) to the login form which could be a bit confusing for the user. The login form currently looks like this: $loginRegister = $modules->get('LoginRegister'); echo $loginRegister->execute(); Cheers and thanks!
  17. Thanks for your answers! I think this was because of some smpt limits at the provider. I now solved it with wiremail without smtp an it work pretty well.
  18. Thanks for your answer! May be its blocked. But where? At the user or on the server? Or is it the bcc?
  19. Hi! I've got an issue with the Wiremail SMTP module. The settings test in the module works without problems. But not the mails send via the website. In the logs "wiremailsmtp_errors" i always got this strange message: Error in hnsmtp::send : 250 OK What does that mean? Where or how can i get more infos or details errors? The background: I send mails everytime a page is published to all users via the ready.php . The mail are sent to my mail adress with all the user mail adresses in bcc. Thanks for any ideas & cheers!
  20. Hi! I need an alternative rendering for my pages for printing. In this case i can't do it with css but i need a special template or something for the print view. How can i achieve this? THANKS!
  21. Thank you! Didn't know that. I thought that were just the allowed hosts.
  22. O wait, is this the first adress under "$config->httpHosts" in the site/config.php? Could this be?
  23. Hello! I just moved a website from the development to the live server. Now there is a strange behavior. If i output the page->httpUrl as well as i click on "view" in the page tree the development server url is shown. I have no idea where this comes from. Do you have?
  24. Thanks a lot! That helps me! I recognized that the secure directories now looks like this "-myfolder". But if i echo the file-url the path is without the "-" i.e. "myfolder/myfile.pdf". Is that how it should work? And is there a solution for this problem: Thanks!!!
  25. BTW. Is there a way to check if a file is secure or not? Or to check if there are insecure files on my website? Thanks!
×
×
  • Create New...