|
Post by Wormopolis on May 6, 2009 23:01:39 GMT -8
Browser tested: IE and FF placement: Global Header (plus some editing of other codes) What this does is allows you to have one place in your global header to set up head/base images for later codes like category splitters, post splitters, info center mods, etc... get the skinid for each of your skins by looking at source for var pb_skinid=n or you can put this in your URL to alert you: javascript:alert(pb_skinid) once you know all your skin ids, edit the code, by changing the case numbers. you can add more case blocks in the code my just repeating the lines case n: global_headimg="URL FOR HEADER IMAGE SKIN 1"; global_footimg="URL FOR HEADER IMAGE SKIN 1"; break; use the default case for any skin isnt in the list (in case you forget to edit this code). I suggest setting head and foot images to blank gifs. now in your existing codes, anywhere it asks you for a URL to a head or base image, simply put global_headimg and global_footimg instead. example: your category spliter has variables like: var headerimage="URL TO HEAD IMAGE"; var footerimage="URL TO BASE IMAGE"; simply edit it like: var headerimage=global_headimg; var footerimage=global_footimg; you will be setup! code: <script type="text/javascript"> <!-- // global head/foot variables for codes on diff skins // by Wormopolis - wormocodes.proboards.com // Concept by Storm - swcv5.proboards.com // keep header intact
// use variables below in place of URLs in any code that // require them.
var global_headimg; var global_footimg;
// now edit the URLs below for each skin id you want
switch(pb_skinid) { case 1: global_headimg="URL FOR HEADER IMAGE SKIN 1"; global_footimg="URL FOR HEADER IMAGE SKIN 1"; break; case 2: global_headimg="URL FOR HEADER IMAGE SKIN 2"; global_footimg="URL FOR HEADER IMAGE SKIN 2"; break; case 5: global_headimg="URL FOR HEADER IMAGE SKIN 5"; global_footimg="URL FOR HEADER IMAGE SKIN 5"; break; case 14: global_headimg="URL FOR HEADER IMAGE SKIN 14"; global_footimg="URL FOR HEADER IMAGE SKIN 14"; break; default: global_headimg="URL FOR HEADER IMAGE IF SKIN ID ISNT FOUND"; global_footimg="URL FOR HEADER IMAGE IF SKIN ID ISNT FOUND"; break; } //--> </script>
preview: if I can make a site with multiple skins.. Storm is using it on swcv5.proboards.com
|
|