modifiedcontent
Members-
Posts
286 -
Joined
-
Last visited
Everything posted by modifiedcontent
-
Another very dumb basic question; what could this error mean? Followed by a whole bunch of file addresses. Can someone translate this error; what should I check? I am troubleshooting a custom login/register system. I get this error when I enter gibberish in the username login field to produce a nice 'wrong username or password' message. A 'forgot password' form on the same page, not displayed while logging in, gets the 500 Internal Server Error.
-
Thanks @netcarver. I could not figure out how to use that ProcessForgotPasswords module. There were no instructions anywhere. It looks like it depends on other modules or assumes your login/register process is structured a certain way. Thanks for the other suggestions. Replacing md5() was going to be next.
-
The modules don't really work for me. I have a custom login and registration process directly in template files and just want to add password reset. I don't need admin etc. The following works: My PHP knowledge is very limited - I don't understand namespace, hooks, etc. etc. I have to start from a basic proof-of-concept and then improve on that as needed. Are there obvious mistakes in the code above? Obvious security risks? The process is really slow; it takes forever after clicking submit to find the user in the database. Could the code be more efficient? Any comments / suggestions much appreciated.
-
@netcarver, any news on your solution?
-
I have to come up with a 'forgot password' feature for my custom login/register process. I hoped I could just use the core module ProcessForgotPassword, but see it hasn't been updated since 2012 and it is not clear to me how to use it. How do I add ProcessForgotPassword to my login form/template? The module is installed in the backend, but then what? Are there instructions anywhere? Is @Pierre-Luc's module safe to use for the latest Processwire versions? What/where is the latest version? Is anyone else using it with improvements? Are there other solutions/modules? I'll probably work on this next weekend and post more findings.
-
Is there a way to do $users->get( superuser )? Or can there be more than one superuser? Get the first superuser? Without having to use a name like 'admin'.
-
How do I use this module on the front-end, in a template? My field 'summary' is configured to use CKEditor and it works fine in the admin area. It tried getting something to show up on the front-end by adding this to a template: <?php $modules->get('InputfieldCKEditor'); echo $page->edit('summary'); ?> <edit summary></edit> <div edit="summary"></div> Nothing shows up. I guess I need to add something to head, but could only find very ambiguous info. This info only applies to back-end? @gebeer tried to explain here, but I don't use 'delayed output strategy' and could not get his instructions to work. Is there a dumbed down version anywhere? Where is the js file I should link to? And a css file? I have been using my own CKEditor, with the files in a js folder in templates. I just want to replace it with the "native" Processwire version.
-
CKEditor settings per template and/or role
modifiedcontent replied to gebeer's topic in Wishlist & Roadmap
Thanks gebeer. I have also found the instructions here. Did you find solutions for your original question from 2016, CKEditor settings per template and/or role? I'll have to figure that out next and will post here what I find out. -
CKEditor settings per template and/or role
modifiedcontent replied to gebeer's topic in Wishlist & Roadmap
Is CKeditor now part of Processwire? I use CKeditor in a template, but using a version I downloaded in a template js folder. What is the correct way to use CKeditor in a template, on the front-end? -
What is in 2020 the best way to provide an image upload feature for members/registered users, for a profile picture etc.? Is there now a built-in option? Or a module? I only found this old non-stable module here and forum threads from 2012-16. I have a cobbled together solution from about 2017 that kinda works. I can post details later if necessary. I want to replace or improve it.
-
Front-end form to let Member edit specific fields
modifiedcontent replied to modifiedcontent's topic in General Support
How would I even use Tracy Debugger console for this? I want to test what happens in a Member account, where I don't have access to Tracy Debugger. I don't want to risk messing up my SuperUser admin account by running random code in that Debugger console. What is Process Tracy Adminer that is suddenly also installed in my site? Tracy Debugger installs way more stuff than I am comfortable with and I have no clue how to use it to troubleshoot my particular problem. The variables are fine. This used to work fine in my site. I was just looking for basics of how to edit a field via a simple form on the front-end. Is there an example anywhere? Has anything changed about that in the last few years? This "works": if($input->post->bio) { $user->of(false); $user->body = $sanitizer->text($input->post->bio); $user->save(); } This doesn't: if($input->post->updateprofile) { $user->of(false); $user->body = $sanitizer->text($input->post->bio); $user->save(); } Both with a form like this: <form method=post id=updateprofile> <textarea placeholder='biography or description' id=bio name=bio><?php echo $user->body; ?></textarea> <button type=submit name=updateprofile>Update Profile</button> </form> So I guess using <button> instead of <input> broke it? Apparently yes, changing it back to <input type=submit ... fixed it. -
Front-end form to let Member edit specific fields
modifiedcontent replied to modifiedcontent's topic in General Support
body and fullname are both set to user-editable in their own profile; the code I have used to work, just no longer doesn't for some reason. I set Access control for the User template to No*, but that didn't fix the edit forms. * bad idea? Should my general approach work or does anyone see obvious problems? This just doesn't seem to do anything: if($input->post->updateprofile) { $user->of(false); // turn off output formatting $user->fullname = $sanitizer->text($input->post->fullname); $user->body = 'Just enter something when I click the updateprofile button'; $user->save(); } I have ProcessWire 3.0.161 dev, with as few modules as possible. This page should be all plain code. No hooks used. Code already simplified to bare essentials. -
Front-end form to let Member edit specific fields
modifiedcontent replied to modifiedcontent's topic in General Support
Thanks @dragan. I actually have a super basic password update somewhere that works. I'll update that with some of your suggestions. I stripped down my Member Account management script to bare essentials and it still doesn't work: <?php if($input->post->updateprofile) { $user->of(false); // turn off output formatting $user->fullname = $sanitizer->text($input->post->fullname); $user->body = $sanitizer->text($input->post->bio); $user->save(); } ?> <form method=post id=updateprofile> <div class=field> <label for=fullname>Full Name</label> <input placeholder='Firstname Lastname' type=text name=fullname value='<?php echo $user->fullname; ?>' /> </div> <div class=field> <p>Please introduce yourself</p> <label for=bio></label> <textarea placeholder='biography or description' id=bio name=bio><?php echo $user->body; ?></textarea> </div> <div class=buttonrow> <button type=submit name=updateprofile>Update Profile</button> </div> </form> What am I missing? -
Front-end form to let Member edit specific fields
modifiedcontent replied to modifiedcontent's topic in General Support
@kongondo, thank you again for your response. Yes, just a plain text field to start with, like a body field. Or/and the password field. Basic fields that a member role would need to edit. I did not provide details on why it no longer works, because there could be many factors specific to my site/template, like the use of Ckeditor. I just want to strip it down to the most basic working example. I was not able to find 2020 instructions, only threads from 2012-14 and information about Form Builder and the front-end editing and login/register modules. Can you point me in the right general direction? Did anything change in upgrades since about 2016 that breaks the code/approach posted above or is it still basically the same? -
How can I let a Member - or whatever Role - edit a specific field from the front-end? If I do a search on "front-end editing" etc. a lot of stuff comes up that doesn't really fit my case. I'll use the front-end editing module for some cases, but in this case I am looking how to put a structure account management interface together. I also know there is now a login/register module, but I already have my own login/register system and don't want to start over. I also know about Form Builder, but that looks like overkill. I am trying to understand basic principles that I can use across my site, don't want a module "to do it all for me out of the box". I had a front-end edit form for members that used to work fine, something like this with role checks etc.: But it no longer works. I know there is a better way to do that password update form - what is it...? - and it is probably a bad idea to mash up several things in one form. I also use Ckeditor on the bio/body field which may cause issues. I also had a messy profile picture upload in the form, years old, probably better ways to do that now. So going back to basics, if I want to give logged-in Member a simple front-end form to edit a specific field, what would I put in the template? Which directions should I follow?
-
Front-end editing 'No changes to save' error
modifiedcontent replied to modifiedcontent's topic in Themes and Profiles
I still haven't found a solution for this. Any suggestions what could cause it or how to troubleshoot it? Has anyone else seen this issue? It works fine in some pages, but not in others. -
How to make a simple 'Delete My Account' link for users
modifiedcontent replied to modifiedcontent's topic in General Support
@kongondo, this worked very well. Thanks! Just followed your last post. In the 'delete confirmed' template file I added some last warning text, like: 'If you click the button below, all your data will be removed from our system and you will be locked out. Are you sure you want to do that?' Button like this: <form method=post> <input type=submit name=terminate value='yes, delete my account'> </form> The first 'delete account' button is similar. And then your code wrapped in something like this, on top of the 'delete confirmed' template file: if( $input->post->terminate && !$user->isSuperuser() ) { ... } Checking for superuser again is not strictly necessary I guess and there are probably better ways, like in the first part. I made the 'delete confirmed' template file hidden and only accessible for 'members', not for random guests. I'll keep testing with this and will report back if I find problems or improvements/additions. That use of $cache was new for me. Very interesting, useful. -
My member role does not have any create/add/edit rights, but members can still access /admin and see the page tree etc, although they can't create/add/edit anything, only view. Is there a way to keep members out of /admin altogether? I double-checked; 'member' does not have access permission on the Admin template, so I don't understand why they still get access anyway. On the other hand ideally I would like to give members targeted access to specific /admin pages where they do have create/add/edit rights, like their profile? I thought that was the way it was supposed to work. What am I missing?
-
How to make a simple 'Delete My Account' link for users
modifiedcontent replied to modifiedcontent's topic in General Support
Thanks kongondo, I was just working on this - UK coffee/brunch time - and getting nowhere. I'll go over your very clear instructions and report back. -
How to make a simple 'Delete My Account' link for users
modifiedcontent replied to modifiedcontent's topic in General Support
I am looking for a solution for this again this weekend. If anyone has any ideas, please let me know. Anyway I'll post more findings later and hopefully a solution. -
Horizontal scroll bar with UIkit admin
modifiedcontent replied to modifiedcontent's topic in General Support
Thanks bernhard, but no, I just get the horizontal scrollbar in every view, full screen on a laptop. The scrollbar also doesn't really scroll to anything; something is 1 or 2% over somewhere.- 4 replies
-
- uikit 3
- admin theme boss
-
(and 2 more)
Tagged with:
-
Horizontal scroll bar with UIkit admin
modifiedcontent replied to modifiedcontent's topic in General Support
Thanks @diogo - for one random admin page that identifies the following elements: <div id="pw-panel-container-1" class="pw-panel-container pw-panel-container-closed pw-panel-tab pw-panel-left" data-href="/admin/page/?modal=panel&pw_panel=1" style="outline: red dotted 1px !important;"><a class="pw-panel-button pw-panel-button-closed ui-button ui-state-default pw-panel-button-text pw-panel-button-hidden" href="/admin/page/?modal=panel&pw_panel=1" style="right: -46px;"><small class="ui-button-text"><i class="fa fa-fw fa-tree"></i><span>Tree</span></small></a></div> <div id="pw-panel-container-2" class="pw-panel-container pw-panel-container-closed pw-panel-tab pw-panel-left pw-panel-reload" data-href="https://mywebsite.com/?modal=panel&pw_panel=1" style="outline: red dotted 1px !important;"><a class="pw-panel-button pw-panel-button-closed ui-button ui-state-default pw-panel-button-text pw-panel-button-hidden" href="https://mywebsite.com/?modal=panel&pw_panel=1" style="right: -46px;"><small class="ui-button-text"><i class="fa fa-fw fa-eye"></i><span>Page View</span></small></a></div> I have tried changing widths and paddings etc., but nothing makes the horizontal scrollbar disappear. I know I can just put overflow-x: hidden somewhere, but tried that once and it caused a problem somewhere else and I didn't want to spend more time on it. Isn't this a (known) bug in UIkit? I vaguely remember seeing something like that the first time I looked into this.- 4 replies
-
- uikit 3
- admin theme boss
-
(and 2 more)
Tagged with:
-
Small annoyance: I get a horizontal scrollbar in UIkit admin area - or actually Admin Theme Boss based on Uikit 3. I tried to fix it with CSS, but had trouble isolating/targeting it and don't want to mess with module or core files. I think this issue has been reported before. Is there a recommended fix?
- 4 replies
-
- uikit 3
- admin theme boss
-
(and 2 more)
Tagged with: