1
davidhvoss
Removing "Lost Your Password" Option
  • 2007/7/25 0:42

  • davidhvoss

  • Just popping in

  • Posts: 5

  • Since: 2007/7/25


I use my site with aMember, so I don't want people registering via XOOPS or trying to obtain a Lost Password via Xoops.

Does anyone know how I can edit out or disable the

"Not registered? Click here."

and the

"Lost your Password?"

options?

It seems they are on the user.php page, but I've combed that file and cannot find out how to disable these.

I have deleted a few lines in system_block_login but that doesn't seem to work. I deleted these:

<{$block.lang_lostpass}>





<{$block.lang_registernow}>

So, I'm left scratching my head. I've checked the forums for over 2 hours and there is nothing out there that has worked for me.

2
snow77
Re: Removing "Lost Your Password" Option
  • 2007/7/25 1:18

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


You did the right thing. I imagine it's the code from system_block_login.html.

Now after doing that change to your file, and only if you have XOOPS version 2.0.14 or greater, don't save it again in modules > system > templates > blocks. Save your modified system_block_login.html in YourThemeFolder > modules > system > blocks > system_block_login.html. This will make your modified template stay in your theme folder and take effect by template overriding and later on when you upgrade your XOOPS in the future and overwrite your core files you won't lose your modification because it's in your theme folder.

When you are making changes to your theme and templates you should turn to YES the option: Check templates for modifications ?
In system > preferences > general settings. When it's on NO the site makes use of the cache design templates and that's why you don't see the changes. When you finish making changes turn it back to No.

Alternately you can leave that set to yes and erase all the files templates_c except the index.html.

The module xoopsinfo has a nice option where you can keep track of which templates you are using with the override method.

I almost forgot something. In system > preferences > user info settings, disallow new user registration.

3
cybersensei
Re: Removing "Lost Your Password" Option

Very nice Snow! Very well described. I took the shortest route and zero-stringed in the declaration of '_MB_SYSTEM_LPASS' in the blocks.php file. This saved me the effort of changing all the themes and rebuilding the templates. Of course, if you run multiple languages, you'd need to change it in all the language files.

4
davidhvoss
Re: Removing "Lost Your Password" Option
  • 2007/7/26 21:27

  • davidhvoss

  • Just popping in

  • Posts: 5

  • Since: 2007/7/25


Thanks for the reply guys.

I tried both methods.

The first method, I could not find the folders you mentioned after you stated to save it in "YourThemeFolder". I didn't know where to save the file and tried everywhere (at least 2 hours on this issue)

The second method, I could not find a file called "blocks.php". I tried other files, no luck.

So, here's what I did. I edited the lostpass.php file to this:



Password Reset



LOST PASSWORD INSTRUCTIONS


If you have lost your password, please use the lost password function from our main login page. Here's how:


(1) Close your Internet browser.


(2) Open your Internet browser and go to http://www.mysite.org/portal


You will then see the prompt to obtain a lost password.






Not pretty, but it works just fine.

5
snow77
Re: Removing "Lost Your Password" Option
  • 2007/7/26 21:39

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


ahhh, sorry to have had you look so much, as I didn't explain further saying that those folders needed to be created:

Example:

xoopsroot/themes/default/modules/system/YOUR-EDITED-SYSTEM-TEMPLATE
xoopsroot/themes/default/modules/system/blocks/YOUR-EDITED-SYSTEM-BLOCK-TEMPLATE

"default" is the name of the folder of the theme you are using, your supposed to create the "modules" folder inside there and inside there the folder with the name of module you wish to edit it's template...it can be "system", "news", "cbb",,,, any module and inside the module folder you place the templates, if it's a block template you create another folder called blocks and place the template there.

6
attock
Re: Removing "Lost Your Password" Option
  • 2007/7/27 0:52

  • attock

  • Not too shy to talk

  • Posts: 138

  • Since: 2006/8/20


Theres always something new to learn, thank you for the post.

Snow77 can you go over this again, please?
Quote:
templates > blocks. Save your modified system_block_login.html in YourThemeFolder > modules > system > blocks > system_block_login.html. This will make your modified template stay in your theme folder and take effect by template overriding and later on when you upgrade your XOOPS in the future and overwrite your core files you won't lose your modification because it's in your theme folder.



This scheme will allow us to choose themes (via the theme block) with each theme having its own set of templates that are located under /chosentheme/modules/XXXX/Xxxxtemp? So In other words, each theme will have it own set of templates.


Also, wassup with the templates option in admin>pref. Those are MySQL based templates, if I am not mistaken. Which leads to another question, can we possibly create templates for every theme so that the template gets to be choosen when a user choose from a selection of theme. I havn't seen any such option, all I can see is the 'default template option'.


I used to think wonder if there was a way to do so. Am I getting this right?


Thank you

btw I am using XOOPS 2.0.16

7
jtapp
Re: Removing "Lost Your Password" Option
  • 2008/5/20 17:18

  • jtapp

  • Just popping in

  • Posts: 40

  • Since: 2008/4/4 3


HELP! This old post really screwed up my settings.
Can somebody help?

I was trying to remove the "Register" button from my Login menu.
Applying the recommendations from this post made the button a dead link, but I can't get rid of the "Register!" word.

So then I tried to put it back to the way it was and I can't seem to apply the changes.
I'm now thinking I would like to put it back the way it was and then change message on the page that says "registration is currently inactive" - I want to be in control of the registration of the portal so people have to email me...

8
Anonymous
Re: Removing "Lost Your Password" Option
  • 2008/5/20 17:35

  • Anonymous

  • Posts: 0

  • Since:


Quote:
jtapp wrote:

So then I tried to put it back to the way it was and I can't seem to apply the changes.


Right.....if you have restored your original files to the original location from a backup (you did take a backup, didn't you?) then login as and admin.

Then got to Admin>Preferences>General Settings

Scroll down the page to "Check templates for modifications?" set that to "Yes" then click on the "Submit" button at the bottom of the page. Then logout.

Use your FTP software to remove all the files (except index.html) in the /templates_c folder.

Go back to your website and see what has happened. If all is well then login as admin and set the "Check templates for modifications?" back to no.

Report back here

9
jtapp
Re: Removing "Lost Your Password" Option
  • 2008/5/20 18:32

  • jtapp

  • Just popping in

  • Posts: 40

  • Since: 2008/4/4 3


Ok - Part of my problem was I edited the file called system_block_login.html in the xoops/modules/system/templates/blocks/ section AND I edited the same file in the /xoops/themes/phpkaox/modules/system/ section. I still can't figure out which one actually impacted me, but - I'm back in business.

I currently have check for changes to templates turned off and I have the allow new registration turned off. My version number is XOOPS 2.0.15.

Unless I hear otherwise, I'm now thinking the easiest way would be just to edit the message that says "Sorry, we are currently closed for new user registration" - my message would be something like Registration to this portal is reserved for blah, blah blah.. please click here to request a username and password (an email link) if you fit this criteria.

What are your thoughts?

10
Anonymous
Re: Removing "Lost Your Password" Option
  • 2008/5/20 18:48

  • Anonymous

  • Posts: 0

  • Since:


My thoughts are that you should, on your PC, edit this file:

xoops_root/modules/system/templates/blocks/system_block_login.html

Remove these three lines of code:
<a href="<{$xoops_url}>/user.php#lost"><{$block.lang_lostpass}>a>
<
br /><br />
<
a href="<{$xoops_url}>/register.php"><{$block.lang_registernow}>a>


Then, in this order:

1. Login to your website and set "Check templates for modifications?" to "Yes"
2. use your FTP client to rename the original template file to system_block_login.old
3. upload the newly modified system_block_login.html
4. go to your homepage and refresh it
5. set "Check templates for modifications?" to "No"
6. use your FTP client to rename register.php to register.old
7. set "Enable registrations" to "Yes"

If it were me I'd either replace the three lines of deleted code in system_block_login.html with some text saying who to contact for a registration or make a custom block saying the same thing.

Login

Who's Online

337 user(s) are online (205 user(s) are browsing Support Forums)


Members: 0


Guests: 337


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits