Closed Thread Icon

Topic awaiting preservation: How do they do those customisable layouts in facebook and live... (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=29906" title="Pages that link to Topic awaiting preservation: How do they do those customisable layouts in facebook and live... (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: How do they do those customisable layouts in facebook and live... <span class="small">(Page 1 of 1)</span>\

 
paritycheck
Bipolar (III) Inmate

From: you tell me
Insane since: Mar 2004

posted posted 01-23-2008 10:24

Hey I was wondering - or rather its my bosses latest idea.. lucky me :-S... well he'd like to have a customizable layout for the web project we're working in. You knwo be able to move drag and drop elements and boxes on the page to different positions. Well I got the drag and drop part right but teh boss would like to have it be permanent in some way. You knwo taht he arranges his site workspace and it gets store din the db with his profile so whenever he logs in - his page is set up in teh same way as he left it.. Any idea how this can be done guys?

Blaise
Paranoid (IV) Inmate

From: London
Insane since: Jun 2003

posted posted 01-23-2008 10:53

hmm, perhaps some sort of array which holds the objects ID's in sequence that is recalled from somewhere, be it XML, a DB or whatever. you'll have to have some server-side scripting in there.

But perhaps the array could be stored in a cookie? *yuck*

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

posted posted 01-23-2008 10:59

Well if you already have the drag'n drop part ready, it's just a matter of saving the state ( the order/position of each widget ) in the db and associate it to a user account. Each time an element is droppped to a new position, ping the server to update that state.

Storing the order/position of a widget in the table associating a user account with an application/widget, is simple but might require a bit of rearrangement every once in a while.

Or are you after something else ?

paritycheck
Bipolar (III) Inmate

From: you tell me
Insane since: Mar 2004

posted posted 01-26-2008 08:30

Well quite basically my web app is designed as such that theres a main screen and a small right column. The left column is well your workspace and its where you see the main information. The right column is kinda like a tool area where all my widgets are.

Now my boss has this really 'great' idea that he would like that whenever he sorts the elements on teh right side their position is saved for teh user logged in. Kinda like what facebook has done but on a much more limited scale.

Currently my code is kinda arranged like this:

toolbar = get_one_widget;
toolbar+= get_other_widget;
toolbar+= get_other_widget;
toolbar+= get_other_widget;

echo toolbar;

echo JS to drag the widgets

Quite simple but again how do I get started here?

« BackwardsOnwards »

Show Forum Drop Down Menu