SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    User admin their own pages

    Ive been teaching myself ruby and RoR for a month or so now...and... I'm stuck!

    The particular project Ive been attempting to build (while learning) is a simple profile site with templates. For example - choose a user name then a theme and fill in the blank comment boxes. Your page is generated at sitename.com/username
    No thing too original or complex.

    I have a sign up / log in / log out section working and I have been trying to work out how each user, once they have logged in, can have their own administer page - like myspace / blogger etc and was wondering the best way to do that. A broad question I know but none of the tutorials I read comment on user control.

    I'm a HTML / css designer so this is all new to me!

    ANY advice would be great. I'm still reading through tutorials so hopefully all will come clear in time.

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Probably the easiest method:

    If you're setting a session-level variable with the user's information after they log in, check for the existence of the user variable and see if the page they're viewing is the page they're allowed to edit (for example, by searching a database).

    If it's not that person, show a regular profile page.

    If it is the right person, show populated form fields where their text would normally be so they can edit their info.

  3. #3
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, but im still totally confused about how to do that. Are there any examples of some thing similar online?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •