1. Add Login page for DLE websites

Add Login page for DLE websites

  |   8
Add Login page for DLE websites

Lately we have seen many websites are closed down and closed to public access and only allow "Members" to see contents, this tutorial will help you to use login block for members to login, it also allow guests to register to your website, the login page can be easily integrated into Admin CP, you can turn on of off anytime you want, but be warned that enable login will automatically disable contents to public also will disable search engine from finding your site contents unless you create login account with search engine like Google Sitemap for example.

This login page will use the alternative main.tpl, in this case I will use it as main_login.tpl, this option will be added in Admin CP, so you can easily turn in on or off easily...This hack had been tested with all 8.x and 9.x but have not test with any of 7.x versions but I assume it should work with all versions, if you have any issues with any versions, please let me know so I can test with that specific version.

Installation:


Information!You must register before you can view this text. Please register or Login

- I have reserved the original code for replace so just in case you need in the future but you can remove that line if you want

- For guests, they can access to only s few pages of your site, in this case I only added "lostpassword" and "register" pages for guests to register and for members to reset password in case they forgot

- In pages: Reset password and register will automatically use your default "main.tpl" of your theme

- The default URL if not login is http://site.com/?do=login

- After users logged in, it will automatically switch to use "main.tpl"

- To turn on the login page, go to DLE Admin CP > System Settings, the option will be located under "Offline reason" as the last option for "General Settings" tab, simply select on dropdown list to set to "Yes" for "Enable Login Page:"

Login Required!Only registered users can download files. Please register or Login

Credits:
- spamhater for write this simple hack and asked me to find the way to integrate in DLE Admin CP
- http://www.bestcssbuttongenerator.com for CSS 3 button generators that used in main_login.tpl in attached file
Dear visitor, you are browsing our website as Guest.
We strongly recommend you to register and login to view hidden contents.

Details

+31

Comments 8

MisterCaca
MisterCaca
Members
Commented By MisterCaca on September 18, 2013 (2:48 pm)
Thanks.
"- In pages: Reset password and register will automatically use your default "main.tpl" of your theme"
It's possible recovery the password and register without enter in the website?
N/A 18Forum topics : 25Forum replies : 86Forum likes : 1
noobos
noobos
DLE TEAM
Commented By noobos on September 18, 2013 (5:16 pm)
Yes, you can use popup or some kind, use some code from registration.tpl and lostpassword.tpl however, the submit confirmation still need to be validated which mean you still need to use main.tpl, however, you can easily use aviable/not-aviable with group/not-group tags for anything you don't want to show in those pages.
16 302Forum topics : 12Forum replies : 1036Forum likes : 170
MisterCaca
MisterCaca
Members
Commented By MisterCaca on September 18, 2013 (6:05 pm)
Quote: noobos
Yes, you can use popup or some kind, use some code from registration.tpl and lostpassword.tpl however, the submit confirmation still need to be validated which mean you still need to use main.tpl, however, you can easily use aviable/not-aviable with group/not-group tags for anything you don't want to show in those pages.

Thanks!
How i can do that? Give me a example if u can. wink
N/A 18Forum topics : 25Forum replies : 86Forum likes : 1
sawanbanna
sawanbanna
DLE TEAM
Commented By sawanbanna on September 18, 2013 (6:47 pm)
easy, visit your site http://yoursite.com/?do=register and copy the html code from that page (not page rules if you enable it) and paste the code in popup script which you can use any popup windows like colorbox, fancybox...we has done it so many times in many websites like http://vip.xtragfx.com it;s very simple just copy the code and add to popup area of jquery your use
31 409Forum topics : 23Forum replies : 979Forum likes : 150

« Live as if you were to die tomorrow. Learn as if you were to live forever! »
MisterCaca
MisterCaca
Members
Commented By MisterCaca on September 19, 2013 (1:27 pm)
Thanks sawanbanna, but don't work correctly, i don't why. The popup works fine, but the content not.
N/A 18Forum topics : 25Forum replies : 86Forum likes : 1
King-Zeus
King-Zeus
V.I.P.
Commented By King-Zeus on October 5, 2013 (11:26 am)
thank you very much
N/A 32Forum topics : 6Forum replies : 15Forum likes : 0
code3h
code3h
V.I.P.
Commented By code3h on October 12, 2013 (1:25 pm)
I been looking for this, thanks :)

Working good on 10.0 :)
9 22Forum topics : 22Forum replies : 66Forum likes : 0
DLEStarter
DLEStarter
DLE TEAM
Commented By DLEStarter on September 27, 2014 (4:54 pm)
Update for DLE 10.2 and 10.3...
29 225Forum topics : 9Forum replies : 558Forum likes : 116
Information!Would you like to leave your comment? Please Login to your account to leave comments. Don't have an account? You can create a free account now.
DLEStarter Notice!Please note...Every hack and every module will get additional queries from your database and some hacks and some modules may result your server overload, so install only what you "need", remove any hacks and modules from your script when you don't need them, all hacks and modules appears in this website are not guaranteed by DLEStarter Team for your script security and compatibility, please read instruction carefully and use hacks and modules at your own risk...Thank you.