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
Gbook Skinning?
do you mean something like this ?
Press the letters at top of page
http://www.fgps.com/keith/GBook/gbook.php

Press the letters at top of page
http://www.fgps.com/keith/GBook/gbook.php

the code
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/
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/
Nice, didn't even know there was a "alternate stylesheet"
We learn all the time

We learn all the time

Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Best thing
If this is true - its the best thing ever!Nice, didn't even know there was a "alternate stylesheet"
