SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Location
    Glasgow, Scotland
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Storing a user's layout/widget customisations

    I'm sure this is a common question but the search terms I tried didn't give any results.

    I'm looking to introduce functionality that sites like netvibes and BBC have done where you can control the look and feel of the page by dragging, dropping, closing and creating various widgets.

    Most of the technology is stuff I've worked with before, but I'm not sure how to save and store the layouts. Is there a best practice way to do this?

    Thanks for any help you can give.

  2. #2
    SitePoint Guru
    Join Date
    Apr 2006
    Posts
    802
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Best way to save user preferences is to authenticate users (with cookies or sessions if supported) and save the data in a database.
    You can save a small amount of data in the id cookie, but cookies have a way of vanishing, and without the database, there is no way to recover.

  3. #3
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,716
    Mentioned
    103 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by Teeej View Post
    I'm looking to introduce functionality that sites like netvibes and BBC have done where you can control the look and feel of the page by dragging, dropping, closing and creating various widgets.

    Most of the technology is stuff I've worked with before, but I'm not sure how to save and store the layouts. Is there a best practice way to do this?
    http://developer.yahoo.com/ypatterns...ttern=dragdrop
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  4. #4
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Location
    Glasgow, Scotland
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mrhoo View Post
    Best way to save user preferences is to authenticate users (with cookies or sessions if supported) and save the data in a database.
    You can save a small amount of data in the id cookie, but cookies have a way of vanishing, and without the database, there is no way to recover.
    Yep, I understand the need to store it in the database for users to cover all sessions (and its simplified since the personalisation will only need to happen in their account homepage).

    What I'm wondering is solutions on how to store these values in the database to take up minimum room. I'm thinking right now that I will give all possible widgets an ID (I'm sure this is how BBC does it).. and then somehow assign each possible layout position its own "id" too.


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
  •