martind

Members
  • Content count

    70
  • Joined

  • Last visited

Community Reputation

9 Neutral

About martind

  • Rank
    Distinguished Member

Contact Methods

  • Website URL
    http://www.art-house.at

Profile Information

  • Gender
    Male
  • Location
    Austria

Recent Profile Visitors

2,857 profile views
  1. martind

    damn, you are right wanze. thank you.
  2. martind

    to further describe this a bit. home.php $form_login = "<form id='loginForm' class='uk-form' action='/proc/login/' method='post'>\n"; $form_login .= "<fieldset data-uk-margin>\n"; $form_login .= "<legend>Login</legend> <input type='text' name='login_name' placeholder='E-Mail'> <input type='text' name='password' placeholder='password'> <input type='submit' class='uk-button' value='Login' />\n"; $form_login .= "</fieldset>\n"; $form_login .= "</form>\n"; xx.js $('#loginForm').ajaxForm({ dataType: 'json', success: processFormSuccess }); function processFormSuccess(data) { // 'data' is the json object returned from ajax.php if(data.statusCode == 2) { $('#login_content').html(data.responseText); $('#reg_login').html(data.username); $('.hide_loggedin').hide(); $('.show_loggedin').show(); }else{ $('#reg_messages').html(data.responseText).fadeIn('fast'); } } ajax.php if($input->urlSegment1 == "login"){ $r = array( "username" => "", "userid" => "", "email" => "", "responseText" => "", "einreichCode" => "", "statusCode" => 0 ); if ($input->post->login_name && $input->post->password) { $username = $input->post->login_name; $password = $input->post->password; // find user with email $ufind = $pages->get('template=user, email='.$sanitizer->email($username)); if($ufind->id) { try{ $u = $session->login($ufind->name, $password); if ($u->id) { $log->save('login', "Login by {$u->screen_name} ({$u->id})."); $r['responseText'] .= "<p>welcomoe back, {$u->screen_name}.</p>"; $r['einreichCode'] = $password; $r['email'] = $u->email; $r['userid'] = $u->id; $r['username'] = $u->screen_name; $r['statusCode'] = 2; } else { $log->save('login', "Login fault"); $r['responseText'] .= "<p>Falsche E-Mail <strong>>>{$username}<<</strong> oder Einreich-ID <strong>>>{$password}<<</strong>. Login fehlgeschlagen.<br > Versuchen Sie es erneut oder kontaktieren Sie uns unter <a href='mailto:admin@xx.net'>admin@xx.net</a></p>"; } } catch(Exception $e){ $log->save('login', $e->getMessage()); } } }else{ $log->save('login', "Fehler. Keine Login Daten."); } $response = json_encode($r); echo $response; } ... so, everything of this works as expected, the js function switches my home-site to logged-In mode, even when i directly call my pw-admin, the user is logged-in, but when reloading the home-site, it is not. Any way to effect this? thanks, martin
  3. martind

    hi, i have a login form on my page which is handled within a template called by ajax. Login works fine, but only if the site doesn't get reloaded - which isn't the intention but may occur. So is there a way to manually reset the session data from within my form-handler template after successfully calling $session->login($username, $password), to have it working after a page reload? thanks, martin
  4. ok, seems to be ok with actual master 3.0.42
  5. Fatal error: Call to a member function ready() on a non-object in /.../wire/core/ProcessWire.php on line 386 the error above comes up when transfering a ProcessWire 3.0.28 Setup from dev to live host. php version is 5.5.9 cleaning up cache folder and file-compiler cache or temporary emptying the /site/modules/ folder can`t resolve the issue. Any idea?
  6. martind

    2 years later very useful again .... thank you wanze!
  7. seems that field dependencies have nothing to do with this problem, narrowed it down a bit, an image field and a ckeditor- textarea in regular mode letted me reproduce this in the most simple case. workaround, user ckeditor inline-mode .
  8. ok, i found a workaround for this. the template has two fieldsets, if the page field that gets referred from the other fields with dependencies has to be exactly between the both fieldsets, then the ckeditor field works without problems and keeps in ltr mode. page-field on any other position switches the textarea to rtl.
  9. hi, we have a funny behavior with field dependencies here. inside a table-extended field, the corresponding template has declared field dependencies on a pages field (categories) with single select radio buttons. this works as expected for all the fields with dependencies, except for one of the possible selections, this switches a completly uninvolved CKeditor field on the template into rtl-mode (cursor jumps to first position after each keypress). Any idea whats going on? thanks, martin
  10. martind

    ok, thats something i can live with, thank you. another question: when using something like $this->message($this->_("blabla...")); in the inputfield module we spoke about, shouldn`t this work?
  11. martind

    ok, thank, that helped, declaring $inputfield->editPage = $page; in the Fieldtypes hookProcessInput function i have the page-object in the inputfield module. inside the ProcessInput function i create my image variants and with $this->editPage->app_img->add($this->destinationPath.$filename."-app-web.jpg"); $this->editPage->save(); ... i can copy the image to the app_img field in the background and it appears when saving the page. Is it possible to actualize the image-field after the add() is done?
  12. martind

    https://processwire.com/talk/topic/2691-getting-current-page-in-a-inputfield-or-fieldtype-module/ ... in this post the behavour got discussed, but i cant get ryans solution to work.
  13. martind

    no. i've cloned the inputfield-file module to InputfieldFileApp.module (and copied FieldtypeFile.module as FieldtypeFileApp.module inside the folder). The new filefield works, i can use some custom functions inside, this is good. But now, i want to copy a specific version of a new uploaded file to another field, an image field on the same template. inside InputfieldFileApp.module wire('page') is the edit page, not the page the field is on. thats logical, but doesn't help me out.
  14. martind

    Thank you kobrakai, i`ve problems to get the $page varible in my inputfield module. i'm not really familiar with modules in general, so maybe i don`t understand someting common here.