Page 1 of 1

Gbook Skinning?

Posted: Tue Oct 11, 2005 12:53 pm
by Guest
Hi there, i was wondering if anyone could help me.

I'm a proud user and tinkerer of your lovely Gbook script. What i was wondering was if anyone knew some code for allowing the guestbook to be skinnable?

I'm working on creating some interesting MODs for the guestbook - just added an IP Logger - and i've decided that i skinning feature could be quite nice!

I had a drop down menu with a few skins - taken from css stylesheets.

Does anyone know how to do this? As the tutorials online seem to want you to create 3 or 4 different pages, while i just need it for the one gbook.php page.

Thanks, my email is:

cosmosys @ gmail.com

Posted: Tue Oct 11, 2005 5:23 pm
by Guest
What is your url ?

Posted: Wed Oct 12, 2005 1:53 pm
by Guest

Posted: Wed Oct 12, 2005 8:23 pm
by Guest
do you mean something like this ?

Press the letters at top of page

http://www.fgps.com/keith/GBook/gbook.php

:!:

Posted: Thu Oct 13, 2005 7:22 am
by Guest
yes yes yes yes yes!!!!

Posted: Thu Oct 13, 2005 7:26 am
by Guest
could you post the code for that? thanks very much

the code

Posted: Thu Oct 13, 2005 9:32 am
by Guest
firstly you need this javascript file

http://www.fgps.com/keith/GBook/skinner.js

place it within the same folder as gbook.php !


secondly, find this inside gbook.php

<html>
<head>
<title>$settings[gbook_title]</title>
<meta content=\"text/html; charset=windows-1250\">
<link href=\"style.css\" type=\"text/css\" rel=\"stylesheet\">
</head>

and replace with

<html>
<head>
<title>$settings[gbook_title]</title>
<meta content=\"text/html; charset=windows-1250\">
<link href=\"style.css\" type=\"text/css\" rel=\"stylesheet\">
<script type=\"text/javascript\" src=\"Skinner.js\"></script>
<link rel=\" stylesheet\" type=\"text/css\" href=\"S1.css\" title=\"F1\">
<link rel=\"alternate stylesheet\" type=\"text/css\" href=\"S2.css\" title=\"F2\">
<link rel=\"alternate stylesheet\" type=\"text/css\" href=\"S3.css\" title=\"F3\">
<link rel=\"alternate stylesheet\" type=\"text/css\" href=\"S4.css\" title=\"F4\">
<link rel=\"alternate stylesheet\" type=\"text/css\" href=\"S5.css\" title=\"F5\">
</head>

assuming you've done this, now put this inside your header.txt file.

<table width="120" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="24"><div align="center"><a href="#" onClick="setActiveStyleSheet('F1'); return false;">A</a></div></td>
<td width="24"><div align="center"><a href="#" onClick="setActiveStyleSheet('F2'); return false;">B</a></div></td>
<td width="24"><div align="center"><a href="#" onClick="setActiveStyleSheet('F3'); return false;">C</a></div></td>
<td width="24"><div align="center"><a href="#" onClick="setActiveStyleSheet('F4'); return false;">D</a></div></td>
<td width="24"><div align="center"><a href="#" onClick="setActiveStyleSheet('F5'); return false;">E</a></div></td>
</tr>
</table>

and last but not least,

copy your style.css 5 times and rename them s1.css, s2.css, s3.css, s4.css, s5.css( now play around with the colourings etc etc within each one, remember to leave the original one intact incase of any errors)

voila, now you have the basis to play around with, that above is exactly what makes mine do what you viewed.
http://www.fgps.com/keith/gbook/

dont forget to ftp them all

http://www.fgps.com/keith/

bit more

Posted: Thu Oct 13, 2005 10:06 am
by Guest
this is a cookie based javscript file, it creates a cookie,so it will remember what colour settings you chose, and display them next time you visit.(unless of course you empty your cookie pot and internet folders etc)

Posted: Thu Oct 13, 2005 12:51 pm
by Guest
excellent thanks!

G

Posted: Thu Oct 13, 2005 2:49 pm
by Klemen
Nice, didn't even know there was a "alternate stylesheet" :oops:

We learn all the time :D

Best thing

Posted: Wed Nov 09, 2005 8:44 pm
by Guest
Nice, didn't even know there was a "alternate stylesheet"
If this is true - its the best thing ever! :D