exsisting stylesheet changer script into sy9 for swap sytle
Posted: Fri Aug 08, 2008 8:30 pm
hello ,
first off i wanted to thank everyone here for a nice clean blog that i have been using on my website at http://mangablog.machinedragon.com
on my main website , i have created my own php stylesheet switcher , to change between a few themes ive created for my homepage. id like to be able to do a simmilar thing to my blog, but im a lil lost on where to implement it ,
i would like to be able to continue my method into sy9 with the same basic premice of my homepage stylesheet switcher.
since the code ive made is pretty ugly and does alot of strange things ill just go over what it is doing , and if a php guru wants to see the code , ill email it to them.
first , reads style cookie , if none exsists , defaults to my darkback/light text theme
if a cookie exsists , checks against array of predefined theme names
checks header and other tell tale info that the user might be on a mobile device, and simply displays pure html , with no style ,however the style links continue to work because they only change the logos at this time.
if it is not mobile , it writes out the standard statement for the selected theme , and a alternate style link for the other theme. ( gives the chance for a preload in good browsers , and displays in list of themes for firefox.
right now , im still using one of the built in sy9 themes , but before i attempt to make a skin that matches my homepage. i want to know
is it possible to have sy9 read my style cookie, and depending on the predefined list of names, change the style to match what the user selected when they went to my home page.
it may not be possible , because of my blog being on a subdomain, but id be happy with 2 little links at the bottom of the page that change from black text/white back & vice versa
first off i wanted to thank everyone here for a nice clean blog that i have been using on my website at http://mangablog.machinedragon.com
on my main website , i have created my own php stylesheet switcher , to change between a few themes ive created for my homepage. id like to be able to do a simmilar thing to my blog, but im a lil lost on where to implement it ,
i would like to be able to continue my method into sy9 with the same basic premice of my homepage stylesheet switcher.
since the code ive made is pretty ugly and does alot of strange things ill just go over what it is doing , and if a php guru wants to see the code , ill email it to them.
first , reads style cookie , if none exsists , defaults to my darkback/light text theme
if a cookie exsists , checks against array of predefined theme names
checks header and other tell tale info that the user might be on a mobile device, and simply displays pure html , with no style ,however the style links continue to work because they only change the logos at this time.
if it is not mobile , it writes out the standard statement for the selected theme , and a alternate style link for the other theme. ( gives the chance for a preload in good browsers , and displays in list of themes for firefox.
right now , im still using one of the built in sy9 themes , but before i attempt to make a skin that matches my homepage. i want to know
is it possible to have sy9 read my style cookie, and depending on the predefined list of names, change the style to match what the user selected when they went to my home page.
it may not be possible , because of my blog being on a subdomain, but id be happy with 2 little links at the bottom of the page that change from black text/white back & vice versa