Topic: using access_user with login form index.php (Read 2065 times)
Chicken-run Manager
Posts: 9
62 credits Members referred : 0
« on: Mar 11, 2007, 11:43:52 am »
hi olaf,
at the moment access_user has no layouttemplate integrated. so my question is, how can i, besides to the login.php use a login form on my index.php. the index.php should not be protected.
in some other classes with inlcluding a layout.php or somethink like that you can use functions like _loginform to put a login form where ever you want. also a already logged function (to replace such a form with user infos after login) would be great.
what about?
mediman
Cyberpunk Wannabe
Gender:
Posts: 43
280 credits Members referred : 0
you can use functions like _loginform to put a login form where ever you want. also a already logged function (to replace such a form with user infos after login) would be great.
what about?
mediman
Hi Mediman!
My students created a concept site like you are discribing. All they did was split the pages into two parts, the php part (above the <!DOCTYPE tag) on one page and the "html" part (starting at the <!DOCTYPE tag and below) on another page.
For Example: example.php became examplep.php (php part) and exampleh.php (html part).
Then they used PHP include statements to put it all together into the index.php page, adjusting the html parts as needed. Actually, it was really rather simple!
Through the end of the school year (March 31 here in the Philippines) their concept site is on the internet at http:/soho.acts-29.net
Go ahead and register on this concept site and you will see another unique feature... the menu gets larger! It is based on the user level! Ungegistered (public) access_users are at level 0, once you register and log in you are at level 1 and can see an expanded menu based on your level. Your level number is posted at the bottem of the menu.
Likewise, when you login the "register" link is replaced with "settings" (for changing your profile) and the "forgot password" is replaced with "logout <user>".
In the same way the login boxes (login and password) at the top of the menu vanish when you are already logged in.
If you would like to see how the menu gets larger with higher levels use these dummy accounts.
These are email address so replace the "AT" with @ before using them.
The PASSWORD is always : "test" (without the quotes)
You cannot change settings (profile) on the dummy accounts so if you want to test the settings (profile) you will need to register. Your email address will ONLY be used to send you the confirmation email, nothing else (no spam, but if you are worried, go ahead and use a "throw away" address!)
One final note:
This site uses the Email Address Mods (access_email) discribed at: http://www.webdigity.com/index.php/board,88.0.html So for testing you need to login with a password and email address instead of a login username.
Nontheless, because the access_email mod can be used in either email or login mode, and the login mode is identical code to access_user, this setup would also work exactly the same way with the unmodified access_user_class with no code change. (Just change the html part to display "Login: Name" instead of "Login: Email Address")
I hope this helps you...
LAN
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
at the moment access_user has no layouttemplate integrated. so my question is, how can i, besides to the login.php use a login form on my index.php. the index.php should not be protected.
in some other classes with inlcluding a layout.php or somethink like that you can use functions like _loginform to put a login form where ever you want. also a already logged function (to replace such a form with user infos after login) would be great.
what about?
mediman
Hi Mediman,
do you have further questions about this item?
Chicken-run Manager
Posts: 9
62 credits Members referred : 0
« Reply #3 on: Mar 12, 2007, 12:40:02 pm »
Quote
Hi Mediman,
do you have further questions about this item?
I'll send you an email, when the "transfer" is done Then we can hopefully start to work
mediman
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374