开发者

How do I manage user profile page customization like twitter does?

开发者 https://www.devze.com 2023-02-06 23:16 出处:网络
I\'m creating a simple webapps (not using any framework) with user profile page. And I\'m thinking to allow some degree of customizations (theme selection, color scheme, header, etc) on their page. Si

I'm creating a simple webapps (not using any framework) with user profile page. And I'm thinking to allow some degree of customizations (theme selection, color scheme, header, etc) on their page. Similar to twitter pro开发者_如何学编程file page.

No layout changes.

Thx for your time.


Well, since you are already developing a Web App, you might as well create a Table in your Database and fill it with a Row for each of your users containing these customization Settings.

BTW: here is a nice QuickStarter for using MySQL in conjunction with PHP: http://www.freewebmasterhelp.com/tutorials/phpmysql/1


A pretty common method is to allow users to select a theme name from a list. Save this as configuration option in the user database table. And let the template for displaying user pages simply include an according theme.css in the html output.

Ideally such an user theme simply overrides a few colors, text styles. If you want to also replace header images, then positioning them as background images is often the simplest alternative. But you might as well make the profile template script handle a few extra configuration fields (per-theme image names). In that case save a theme name, and provide some defaults (filenames or html snippets) in a per-theme settings array.

0

精彩评论

暂无评论...
验证码 换一张
取 消