pkirsch Posted March 10, 2007 Share Posted March 10, 2007 Hello! I am trying to (on my site) make a part in which (after the user logs in) they can (under their settings page) choose from a dropdown a list of CSS templates I've made (so whenever they login it changes to their chosen template) and i would even like to have the option to upload their own CSS file and apply it! This is really being stupid and annoying! So i would like to know what "You" think is the best Method for achieving this?? Thanks so Much and Have a Great Day! pkirsch Link to comment https://forums.phpfreaks.com/topic/42112-solved-user-custom-css-how-do-i-please-help/ Share on other sites More sharing options...
pkirsch Posted March 10, 2007 Author Share Posted March 10, 2007 *Bump* Link to comment https://forums.phpfreaks.com/topic/42112-solved-user-custom-css-how-do-i-please-help/#findComment-204271 Share on other sites More sharing options...
fert Posted March 10, 2007 Share Posted March 10, 2007 just use sessions to store a path to the style sheet Link to comment https://forums.phpfreaks.com/topic/42112-solved-user-custom-css-how-do-i-please-help/#findComment-204272 Share on other sites More sharing options...
pkirsch Posted March 10, 2007 Author Share Posted March 10, 2007 Thank You Very Much "Fert"! Is It safe to allow the users to upload their own CSS file (I will rename it, and put it into their directory?) Link to comment https://forums.phpfreaks.com/topic/42112-solved-user-custom-css-how-do-i-please-help/#findComment-204281 Share on other sites More sharing options...
legohead6 Posted March 10, 2007 Share Posted March 10, 2007 use a switch and echo the script to include different style sheets.... users could also incript other code in those pages which could be deadly Link to comment https://forums.phpfreaks.com/topic/42112-solved-user-custom-css-how-do-i-please-help/#findComment-204284 Share on other sites More sharing options...
pkirsch Posted March 11, 2007 Author Share Posted March 11, 2007 Like?... What could I do to prevent this? Here's what I came up with! 1. Rename the file. 2. Change the CHMOD to something more appropriate! 3. Clean the file of <Script> tags! What more could i do? Link to comment https://forums.phpfreaks.com/topic/42112-solved-user-custom-css-how-do-i-please-help/#findComment-204710 Share on other sites More sharing options...
sanjayshiwakoti Posted March 11, 2007 Share Posted March 11, 2007 <?php header("Content-type: text/css"); $white = '#fff'; $dkgray = '#333'; $dkgreen = '#008400'; ?> body { background:<?=$white?>; color:<?=$dkgray?>; } h1, h2, h3, h4 { color:<?=$dkgreen?>; } blockquote { color:<?=$dkgreen?>; } you can controll all the stuffs by get variable Link to comment https://forums.phpfreaks.com/topic/42112-solved-user-custom-css-how-do-i-please-help/#findComment-204715 Share on other sites More sharing options...
pkirsch Posted March 11, 2007 Author Share Posted March 11, 2007 Thank You VERY Much! Have A Great Day! pkirsch Link to comment https://forums.phpfreaks.com/topic/42112-solved-user-custom-css-how-do-i-please-help/#findComment-204746 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.