Jump to content

Vayu Robins

  • Posts

  • Joined

  • Last visited

Everything posted by Vayu Robins

  1. This module is great, thanks for sharing it. I am missing one thing that I would like to hear if it could be integrated. What I really would like to see, is what data has been changed. Just the data value. So when an input field changes value, I would like to know what that value is.
  2. Hi. It seems that there is an issue when the Version Control is set to track input changes on a repeater matrix field. I get the following error when trying to revert to an older entry. Error: Call to a member function getInputfield() on a non-object (line 480 of /Users/vayurobins/Sites/headhunterland.dev/site/assets/cache/FileCompiler/site/modules/VersionControl/ProcessVersionControl.module) Is this module compatible with Profields Repeater Matrix module?
  3. Hi. I was wondering if it is possible use some of the version control data on the frontend? I tried to use this code: $versioncontrol = new VersionControl(); $limit = 25; $start = 0; $page->template->enabled_templates = true; $data = $versioncontrol->getHistory($page, $start, $limit); However, it will not register the template as enabled, even though the template is enabled for version control. What I am trying to do is get the dates for a specific field every time it has been modified.
  4. Thank you very much! You wouldn't have the link to that forum posting where Ryan helped on this?
  5. Hi, I would be interested in finding out how to do this too? I need to make a user registration form and a login form. Can this be done with Form Builder?
  6. No worries @adrian, yes, I can get by with alternative solution listet in this thread! Appreciate your effort and thank you very much.
  7. @Adrian, I have also tried without my loginform and yes the errors go away when not using PageProtector. I will paste in the error I get here, maybe it makes some sense to you. Notice: Undefined variable: template_url in /Users/vayu/Sites/hunterapp.dev/site/templates/main.inc on line 453 Call Stack #TimeMemoryFunctionLocation 10.0037535928{main}( )../index.php:0 20.323619941048execute ( )../index.php:235 30.323719941400Wire->__call( )../index.php:235 40.323719941728Wire->runHooks( )../Wire.php:333 50.323719943872call_user_func_array:{/Users/vayu/Sites/hunterapp.dev/wire/core/Wire.php:398} ( )../Wire.php:398 60.323719945256ProcessPageView->___execute( )../Wire.php:398 70.358820182456render ( )../ProcessPageView.module:187 80.358820182640Wire->__call( )../ProcessPageView.module:187 90.358820182640Wire->runHooks( )../Wire.php:333 100.453420875128PageProtector->protectedCheck( )../Wire.php:459 110.454320878584wireRenderFile( )../PageProtector.module:280 120.454420882272render ( )../Functions.php:1062 130.454420882456Wire->__call( )../Functions.php:1062 140.454420882456Wire->runHooks( )../Wire.php:333 150.454420884408call_user_func_array:{/Users/vayu/Sites/hunterapp.dev/wire/core/Wire.php:398} ( )../Wire.php:398 160.454420884576TemplateFile->___render( )../Wire.php:398 170.454720925160require( '/Users/vayu/Sites/hunterapp.dev/site/templates/login.php' )../TemplateFile.php:182 180.456521111496include( '/Users/vayu/Sites/hunterapp.dev/site/templates/main.inc' )../login.php:62 assets/bootstrap/css/bootstrap.css" rel="stylesheet">
  8. Thanks for asking Adrian. I think I set it up correctly. In the "Login Template" I have chosen to use a template called "login.php". This is the code in that file: $t = new TemplateFile( wire('config')->paths->templates . 'markup/login-form.php' ); include_once("./init.inc"); $headline = $page->get('headline|title'); $content = $loginForm.' '.$page->body. ' ' .$t->render(); include("./main.inc"); It's almost like the code in the init.inc file is not loaded, because all the variables in that file throw errors in main.inc
  9. Thank you Adrian. I tried PageProtector, but it didn't work on my site. I don't know why though, but it was the part where inserting the login form on a template that didn't work. I ended up just adding a login form to the template, checking if the user is logged in or not. Thanks everyone for chipping in with ideas and feedback!
  10. Thanks Horst, I will try to see if I can find a way to use your code snippet. Charles, I am not sure I understand what you are trying to explain. Sorry In the email the user receives, there is a link to a page, that one must be logged in (a member) to be able to see. If the user is not logged in and the user opens the link in a browser, then the user will be redirected to a login page. This is how it works now. What I need, is for the user to be redirected to the original page after login. If the user is not a member, then there will be no access, no matter what.
  11. Thanks for you reply cstevensjr! I understand the confusion and I should have written something else in the settings page. My image was just to show what I wanted to explain, so that if it was possible to insert a tag {id_original}, then that would be great. I should correct what should be written in the inputfield. It should be something like "/login/?case={id_original}". That way I could access the page id after login and redirect back to the original page. Does that make more sense?
  12. Hi. I have a membersite that sends out emails to users with links to specific pages. When the user clicks on the link in the mail and the browser opens the site, the user is redirected to the login page. However, I would like for the user to be redirected back to the page they opened from their mail. I don't see how this can be done in Processwire. I have a template and in the Access settings, I have chosen to redirect to the login page. There is on tag that I can include with {id}, but that returns the ID of the login page. I would like to have a tag that returns the ID of the original page the user has opened. Maybe a tag called {id_original} could be a way to solve it. Is there some other way I can filter the redirect process?
  13. Thanks again! Unfortunately it did not work. The module does not extend Inputfield, Process or ModuleJS. However, I was able to load the files like this: public function init() { wire('config')->styles->append("/wire/modules/Inputfield/InputfieldPageAutocomplete/InputfieldPageAutocomplete.css"); wire('config')->scripts->append("/wire/modules/Inputfield/InputfieldPageAutocomplete/InputfieldPageAutocomplete.min.js"); } But loading these files did not fix the problem, so the InputfieldPageAutocomplete still does not work.
  14. Hi adrian. Thanks for helping. No, the InputfieldPageAutocomplete.min.js is not loaded on this page, and this could of course be the problem. I will look into how I can do this. If there is a certain way to do this in processwire backend, then please let me know. I will try to search for this.
  15. Hi. I am trying to add an extra input field to the FileInputField. I have modified the ImageExtra module. http://modules.processwire.com/modules/image-extra/. I would like to use the InputfieldPageAutocomplete field to add users. However the layout seems wrong and when typing, nothing is suggested, it doesn't find a user. Here is the code I have used: protected function renderUserItemField(Pagefile $pagefile, $id, $n, $current) { $fieldName = $current . '_' . $id; $field = $this->modules->get('InputfieldPageAutocomplete'); $field->setAttribute('name+id', $fieldName); $field->setAttribute('parent_id', 29); $field->startLabel = $this->_('Partner'); $out .= $field->render(); return $out; } I have attached a screenshot of how it is rendered on the page. I hope someone can help me.
  16. Hi. I have created a form with the API, which lets users who are logged in to upload files from the front end. I would like to be able to add the filename to the description field, but cannot seem to find a way to do this. When a form i submitted I use this to add a file to the page. $files = explode( "|", $form->get( "cv_file" )->value ); foreach( $files as $file ){ if( $file && file_exists( $upload_path . $file ) ){ $page->cv_file->add( $upload_path . $file ); //$page->cv_file->file->description' = "TEST"; unlink( $upload_path . $file ); } } $page->of( false ); $page->save(); Is it even possible?
  17. Would it be possible to get the user ID by whom the file was uploaded by? I really could use this information.
  18. Hi. I am using the ForgotPassword module on the front-end. It works great, except we have some trouble with users not getting correct feedback, if they open the reset password link in a different browser. I would like to request that some sort of message be displayed to those user who did not read the instructions and open the link in a different browser. Here is a sample of a modified code in the ForgotPassword.module: public function ___execute() { if($this->user->isLoggedin()){ $this->error($this->_("Unable to complete password reset. Please make sure you are on the same computer and in the same web browser that you originally submitted your request from.")); return; } }
  19. Thank you very much. So far so good... I can't check for status change the same way, but I think maybe I don't need that here.
  20. Soma, is that the $page->addHookAfter( 'Pages::saved', null, 'credit_published' ); you refer to? LostKobraKai, is that the $page->addHookAfter( 'Page::published', null, 'credit_published' ); you refer to? I will try.
  21. In the input field called "Partner" I get the user. I then save the user into the variable $partner. I then get the amount stored in the input field called "Kredit". I add the credit to the users credit.
  • Create New...