• Content Count

  • Joined

  • Last visited

Community Reputation

4 Neutral

About Orodreth

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Orodreth

    Thanks Kongondo. A quick test to include the CSS and JS looks promising. Continuing issues may be related to the LoginRegister markup needing some revisions to get it working completely.
  2. Orodreth

    FlyDev, the LoginRegister module says that is does not support image fields, but it can be modified to do so, as you suggest. The snippet shown for the hook is to SAVE images that are input to the profile form. Is there another module or code samples that show more robust image field manipulations (choose file, generate and display thumbnail, save image, show existing image, delete image, overwrite image on save). The Image Field seems to have a lot of that functionality, but to use the Image Field on the LoginRegister, it looks like it requires some JS and CSS that exist in the admin section?
  3. Orodreth

    I have Processwire 3.0.98 and LoginRegister module, and I am setting up the site functionality before making it pretty. So my site is installed with default PW theme/profile (no custom js or css yet). It looks like it is using the UIKit Admin theme on the admin side. The HTML output the user sees (client side / front end) for the Login, Register, Edit Profile pages looks like it could use the UiKit and JQuery css and javascript that is used on the admin side. Is there a way to include all of the JQuery and UiKit css and js to the /site/ front end?
  4. Orodreth

    I am using LoginRegister module (with PW3.x) and wanted to get CKEditor working for the user profile page bio. The modification from gebeer SOLVED it. Thanks.
  5. LAPS, I am also using the LoginRegister module along with Kongondo Blog module, and wanted to add Favorite functionality for blog posts and users. This related thread gave me a good start: https://processwire.com/talk/topic/18618-best-way-to-handle-saving-an-item-as-a-favorite/ Guessing there will be more users than posts (and the pages may be sorted by favorite count in the future), I decided on using a page field "blog_favs" with input "templates : user" attached to my template "post". And I decided the Add/Remove functionality would be URL query based. Here is the code that I implemented in /site/Modules/MarkupBlog/MarkupBlog.module /** * Render favs * * Used by renderPostHead(). * * @access private * @param PageArray $blog_favs is field in blog_post template. * @return string $out Markup of favs * */ private function renderFavs($page, $small = false) { $options = $this->options; $out = ""; // if page field not available, break if ( !$page->blog_favs ) { return $out; } // if post display is summary snippet skip full UI // if user logged in, use full UI and functionality if ( $small != true && $this->wire('user')->isLoggedin() ) { $uid = $this->wire('user')->id; // uid is int $favExists = 0; // check query string for Add/Remove function $queryCheck = $this->wire('sanitizer')->entities($this->wire('input')->queryString); $queryAddFav = "add_fav={$page->id}"; $queryRemoveFav = "remove_fav={$page->id}"; $doSaveFav = 0; // on AddFav request, assume we are going to save fav $doRemoveFav = 0; // on RemoveFav request, assume we are going to remove fav if ( $queryCheck ) { if ( $queryCheck == $queryAddFav ) { $doSaveFav = 1; } if ( $queryCheck == $queryRemoveFav ) { $doRemoveFav = 1; } } // only loop through blog_favs if there are entries // only loop once if ( count($page->blog_favs) > 0 ) { foreach( $page->blog_favs as $fav ) { $fav_int = (int)(string)$fav; // convert saved object to string then to int (!) if ( $fav_int == $uid ) { if ( $doRemoveFav == 1 ) { $page->of(false); $page->blog_favs->remove($fav); $page->save('blog_favs'); $out .= "<div>" . $options['post_removed_fav_text'] . "</div>"; } else { $favExists = 1; } break; } } } // if AddFav, only if user not already faved this post if ( $doSaveFav == 1 && $favExists == 0 ) { $page->of(false); $page->blog_favs->add($uid); // $uid is int $page->save('blog_favs'); $favExists = 1; $out .= "<div>" . $options['post_added_fav_text'] . "</div>"; } // show Add or Remove links for user if ( $favExists == 0 ) { $out .= "<div><a href='{$page->url}?{$queryAddFav}'>" . $options['post_add_fav_text'] . "</a></div>"; } else { $out .= "<div><a href='{$page->url}?{$queryRemoveFav}'>" . $options['post_remove_fav_text'] . "</a></div>"; } } // always display basic UI Favorites Counter (this is at end to capture add/remove changes) $out .= "<span class='favs'>" . $options['post_favs_text'] . " " . count($page->blog_favs) . "</span>"; return $out; } I make no claims on performance or code elegance, but if any of this is helpful to you, enjoy!!!
  6. Orodreth

    Processwire 3.0.98 with Form Builder 0.3.4 trying to add CKEditor 4.8.0 to form... When pwlink and pwimage are enabled, there are 404 "File Not Found" errors when displaying the CKEditor: 404 /wire/modules/Inputfield/InputfieldCKEditor/ckeditor-4.8.0/plugins/pwimage/plugin.js 404 /wire/modules/Inputfield/InputfieldCKEditor/ckeditor-4.8.0/plugins/pwlink/plugin.js error on line 98 of /wire/modules/Inputfield/InputfieldCKEditor/ckeditor-4.8.0/ckeditor.js Moving the directories works, or manually commenting out the settings. Looks like the InputfieldCKEditor.module is conditionally removing the two configs... if($this->hasFieldtype === false) { // not applicable when no page attached unset($settings['pwlink'], $settings['pwimage']); unset($settings['plugins']['pwlink'], $settings['plugins']['pwimage']); } ...but there are errors when using pwlink and pwimage buttons. CKEditor pwimage and pwlink use a modal that works in admin/ but not on front-end
  7. Orodreth

    Fixed User Name update when changing email: ... protected function ___processProfileForm(InputfieldForm $form) { ... if($this->allowFeature('login-email')) { // update name to be consistent with email $name = $this->emailToName($email); //-- THIS VALIDATES EMAIL-TO-NAME ... BUT DOES NOT CHANGE USER NAME $reason = ''; if(!$this->allowName($name, $reason)) { $emailField->error($this->_('Unable to change to new email address') . " ($reason)"); $emailField->val($user->email); $email = ''; } else { $user->set('name', $name); //-- ADDED THIS ELSE CONDITION TO UPDATE USER NAME } } if(strlen($email)) { $user->set('email', $email); $this->message(sprintf($message, $emailField->label)); } ...
  8. Orodreth

    I have a new install of ProcessWire 3.0.98 and have installed the module LoginRegister, which seems to be functioning as expected, with the following exception: The module is configured with [x] Use email address for login rather than user name After registration is confirmed and the user has an account, and they are logged in, they can edit profile. If the user changes email address on the profile and submits the form, it will change the email address correctly. But the user name is not being updated to the new email - as confirmed by going into Admin > Users and seeing the user with modified email, but original "name". The module appears to have a section on profile edit that will update the user name if the email address login is active... LoginRegister.module line 924: // update name to be consistent with email Is there another settings that I have to change to make this functional?
  9. Orodreth

    Hi Kongondo! I am really liking your Blog module (v2.4.1). And I have a question (processwire 3.0.62): Under the section for Tags, I have a child tag that is parented to /tags/ Then I created a grandchild tag and it is parented to /tags/ but I want to change its parent to /tags/child/ When I try to do so, the UI only shows parent /child/ and when I save I get an error saying that the parent should be /tags/child/ Do I need to do something extra? Or is the parenting child to grandchild broken somehow?