The MU forums have moved to WordPress.org

1 2 3 4

How to get a login on the front page - a la iblogs.com (95 posts)

  1. Farms
    Member
    Posted 18 years ago #

    I'd really really really like to be able to put a login box on the front page (as with http://iblogs.com)

    The amount of people who immediately discard their welcome email with login instructions is painful and I'd rather not fiddle links into all the themes.

    Is this quick and easy or slow and painful?

  2. Stapleton
    Member
    Posted 18 years ago #

    Yes, I would like to do this also, I tried to create a form with the wp-login.php but it turned out to be a redirect for users that already logged in using the wp-admin/.

  3. Ste_000
    Member
    Posted 18 years ago #

    yeah would be very interesting....there is a solution ?

  4. andrewbillits
    Member
    Posted 18 years ago #

    Are logins global now? If so, it's just a matter of throwing a form on the front page and have it post to the login script.

  5. Farms
    Member
    Posted 18 years ago #

    Cool, but isn't that what Stapleton tried? Has anyone else had a go?

  6. andrewbillits
    Member
    Posted 18 years ago #

    oops, yeah, I forgot to mention that you have to hack wp-login.php. I called my wp-login-fp.php and then set the form to post to that. The hack can be farely ugly but since it's in a seperate file it's no big deal. Also if something screws up WPMU will toss the user back to wp-login.php.

  7. Farms
    Member
    Posted 18 years ago #

    care to share :)

  8. lynk
    Member
    Posted 18 years ago #

    I use this on the front page


    <form name="loginform" id="loginform" action="wp-login.php" method="post">
    <label><?php _e('Username:') ?>
    <input type="text" name="log" id="log" value="" size="20" tabindex="1" /></label>
    <label><?php _e('Password:') ?>
    <input type="password" name="pwd" id="pwd" value="" size="20" tabindex="2" /></label>

    <label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="3" />remember me</label>
    <input type="submit" name="submit" id="submit" value="<?php _e('Login'); ?> »" tabindex="4" style="margin:6px 0;" />
    </form>

    cant remember/didnt check if I modified wp-login.php

  9. lynk
    Member
    Posted 18 years ago #

    the above doesn't work :(

  10. Farms
    Member
    Posted 18 years ago #

    Thanx for trying though!

    Hey, if you're working on "interest search/match thingy, like in livejournal" that's pretty darn cool... does it use global categories?

    I would have commented on your blog but I can't get the comments to work in FF.

  11. Ste_000
    Member
    Posted 18 years ago #

    hi have tried to use the lynk code's but don't work....and i see thath the main wp-login do the login also with the all user of blogs

  12. ivanhoe
    Inactive
    Posted 18 years ago #

    maybe you need to add:
    <input type="hidden" name="redirect_to" value="/wp-admin/" />

    to the above example?

    actually I just copy-pasted the html code (everything between <form ... and </form> tags) for the original login form wordpress shows, and it worked just fine from front page as well...

  13. Farms
    Member
    Posted 18 years ago #

    Hmmm.... still doesn't work for me :( Just logs users into the main blog.

    Am not sure how I'd add that ivanhoe, do you have the code you're using?

    Anyone else got it working?

  14. andrewbillits
    Member
    Posted 18 years ago #

    Sorry for the delay. Went out of town for a bit. I'm tweaking my old method right so it'll work with the current version of wpmu now and i'll post if for you all tomorrow.

  15. andrewbillits
    Member
    Posted 18 years ago #

    k, done tweaking. could someone set me up a test account on their site so I can test it? just set up an account post the user and pass here. thanks

  16. gappiah
    Member
    Posted 18 years ago #

    andrewbillits: Do you mean a full WMU test installation, or test (user) account within an existing installation?

  17. Farms
    Member
    Posted 18 years ago #

    Does the latest nightly work? If so I'll happily set up for ya... just give me 24 hrs.

  18. andrewbillits
    Member
    Posted 18 years ago #

    I just need a user set up. no need for a full blown install. I just currently don't have WPMU installed anywhere.

  19. andrewbillits
    Member
    Posted 18 years ago #

    Alright, I've tested it on the following sites so I think it's good to go:

    Anyonesblog.com
    Wordpress.com

    I set up a simple download page and if anyone else would like me to host their wpmu hack/plugin/script I would be more than happy to.

    download it here:

    http://dev.boston-network.com/download/

  20. Ste_000
    Member
    Posted 18 years ago #

    $tempaccount = ""; //Any user account that you don't mind getting wp-login.php hammered

    i don't understand what is that! what i must insert? thanks for your work !

  21. andrewbillits
    Member
    Posted 18 years ago #

    just insert any user account. the script just needs it to process info. just create an account like "demo" or something then put "demo" in that spot.

    EDIT: it won't affect the user in anyway. it's just to process things correctly.

  22. gappiah
    Member
    Posted 18 years ago #

    Doesn't work for me :-)

    It works for the account that was used in the form ... but all other accounts simply re-direct to .../wp-login.php.

    You can create an account and test at http://www.sbiblogs.com (the form is at the bottom ... just testing stuff now).

    Any fix?

  23. andrewbillits
    Member
    Posted 18 years ago #

    i'll work it tonigt and post when the fix is up.

    [edit]
    hmm, i've uploaded the script and set it for wordpress.com and it works fine:

    http://us.idtstudios.com/frontlogin.php

    but you're right, it doesn't seem to work for your site. I wonder what's different between your install and wp.com?

    Can anyone else get it to work?

    [edit]

    I just checked http://ilblog.it and it's working over their. PS. you can delete the blog "testaccount". :)

  24. gappiah
    Member
    Posted 18 years ago #

    I'm currently using 10-11 (Oct-11). Maybe I just have to upgrade ... but I'm not sure if the caching issues are solved now.

  25. andrewbillits
    Member
    Posted 18 years ago #

    alright, i've found a bug (kinda). If a user enters a wrong password then the user is tossed to the wp-login.php of the tempaccount. There is an easy fix though. If you create a user called "login" and then use that as your tempaccount it will just look like this if they enter a wrong pass:

    http://login.yourdomain.com/wp-login.php instead of:

    http://someaccount.yourdomain.com/wp-login.php

  26. Farms
    Member
    Posted 18 years ago #

    You da man.. am going to try this out tomorrow.

  27. Ste_000
    Member
    Posted 18 years ago #

    andrewbillits login works but when i try yet login from the page....appear login error !...i think there is a problem with cookie or other

  28. andrewbillits
    Member
    Posted 18 years ago #

    what's the error? I think I remember running across something like that but I just dismissed it as a cache glitch.

  29. Ste_000
    Member
    Posted 18 years ago #

    for some blogs don't works...for others works....now i test that for two week and i say to you the response ! i think too this a problem of a cache....thanks again ;)

  30. zeug
    Member
    Posted 18 years ago #

    Logging in from the front page I get the wp-login for the right account but have to enter log and pass again to get in. At the moment it's still acting like a link to wp-login.

    Using 6/Nov build at:
    http://artists.photonicsmedia.org/

1 2 3 4

About this Topic

  • Started 18 years ago by Farms
  • Latest reply from franz.skaaning