Home › Forums › Great Computer Tips And Tricks › What is??? How to??? › Developing a Guestbook
This topic contains 17 replies, has 2 voices, and was last updated by Merlin33069 10 years, 1 month ago.
-
AuthorPosts
-
March 25, 2009 at 2:05 pm #28617
VERSION 5.0 COMPLETEI changed several things, you will have to look to see themDEMO SITE NOW LIVEThis is dak's site, he is going to use the script and as such this is a link to where he currently has that script, go leave a comment!Current version = 4.0http://daksters.com/guest/3.0 BETA3http://merlin33069.byethost2.com/NEXT VERSIONWill be working on requests, pretty much, here on out!GUARANTEEguaranteed clean* by TimmCo Computer services*(clean refers to viruses malware and other forms of intrusion, not scripting cleanliness, and we have no control over our hosting site, rest assured we take every measure to ensure your well being)COMMENT PAGE IS COMPLETE, this was made for Mitz... but im going to go ahead and release it.This is the same thing as the above guestbook script except that it only has the Name and Comment fieldsRead the readme to configure
March 25, 2009 at 2:15 pm #31476Ok, so the basic guest book will be something like this;the table will have a few columns:NumberSmileyNameDateCommentAnd the form to add a new line to the table will have:SmileyNameEmailCommentSo that the persons Email will not show in the guest book, and the numbers are auto incremented in the databaseThe admin panel will have the following:Modify-Number-New CommentDelete-NumberBan-ipSo that you modify and delete by the auto incremented Numberim not sure how to change the timezones to the users zone, so i will have to look that upThe ip ban is for banning a specific ip
March 25, 2009 at 4:58 pm #31477ok, i would like to point out here that you may add anything you would like to this post, this is not like the HTML tutoial, this is more of a development procedure, and i can use help and will take criticism from anyone 😛So the code i plan on using for the BAN statement is:
Code:<?PHP$banned[0]="$Ipaddress";if (in_array($_SERVER['REMOTE_ADDR'],$banned)){header("HTTP/1.1 403 Forbidden");exit;}?>Where "$Ipaddress" is where it will look in the MYsql database for a list of ip's to block, its list that it will use
March 26, 2009 at 4:28 pm #31478Form for Signing the Guestbook
Code:not quite done yet, i need some more smileys, maybe i will take the pack from this forum 😛
March 26, 2009 at 7:17 pm #31479OK, so we need to have some variables in this guestbook that are easy to define, at the begging of the document, such as info for the MySQL database, and colors, and a few other things… here are a few that i have thought of for now, note this is scripted as it would be in php, so you can once again see how i would do it.this would be Guestbook_Config.php//CONFIGURATION//Edit the following lines of code to configure your Guestbook//MySQL Database information, this section is for the Mysql info only//The hostname is normally the ip of the computer that the server is running on, normally this would be localhost, signifying that it is running on the same computer$Hostname = 'Hostname';//The username, needed to login to the database, default is root$Username = 'root';//Password, also needed to login to the database, default is blank (note it goes between the two ' characters)$Password = '';//Color, this is the color section, use it to change the look of your page//Background color$BGColor = 'White';//Text Color$Color = 'Black';//Table Properties, this would be the configuration for the table that the guestbook is in//Table border, how many pixels wide is the border around the table$TableBord = '0';//Table width, the width, in either % or PX (Pixels) of the table the guestbook is in$TableWidth = '80%';Once again, any criticism and or advice would be most welcome...
March 27, 2009 at 12:07 am #31480VERSION 1 DONE (check 1st post to download)OK, version 1 of the guestbook is done, this has no admin panel, or smileys, instead it has a mood column and the changes must be made through the databaseChanges that still need made:Consolidate Files if possibleAdmin PanelAdmin Database for login information (might be built into the php)Make a better sample page (the index page with this one sucks, but its not meant for you to use it)and anything else i can think ofThis will be it for a while, its pretty cool, but i will get... mad at it... if i keep going
March 27, 2009 at 7:23 pm #31481V 1.1 is done, this has the Table creation built in, (see readme) and has a whole new readme (see readme 😛 )Next version will have A dynamic table name as well, now that it is incorporated into the script, and will have the beginnings of an admin panelSee post one to download!
March 28, 2009 at 5:55 pm #31482STAGE 2 – Incorporate the guestbook into a custom designed webpage.This guestbook will now be developed into an attractive webpage, with headings, navigation links and advertising. It will be composed of both html and javascript code, and also include the php code for the guestbook. The resulting file will then be named index.php, the guestbook will still be updated and edited, new features will also be added.Anyone interested should watch this guestbook http://daksters.com/guest to see it develop. I'll post a breakdown of the html and javascript code as I write it, explaining each part of the code and its purpose.
Mitz from Tips4pc
March 29, 2009 at 2:29 am #31483[blue]OK, here we go.First we need a basic page, It needs a beginning, a header, a body and an end.We begin by adding the beginning
Mitz from Tips4pc
March 29, 2009 at 5:09 am #31484note that i have found another bug that i will look into fixing, and it wont be too hard 😛 the table allows for empty spaces… i will fix it in the next version also, that brings us to…. 1.7.2
March 29, 2009 at 6:06 am #31485ANNOUNCING VERSION 1.7.2LIVE VERSION WITH MORE DYNAMIC(ISM) lolTABLE NAME CAN NOW BE CHANGED IN CONFIG.PHPSUGGESTIONS ON FUTURE CHANGES CAN BE MADE, PLEASE POST HERE!
March 29, 2009 at 7:33 am #314861.9.0 DONE ANNOUNCING IT NOWSmileys added, should work ok, have funpretty straight forward.....
March 29, 2009 at 8:21 am #31487[blue]OK, now we are going to add some information to help browsers interpret this document. This statement declares the document to be HTML 4.01 Transitional (English).[/blue][red]REMEMBER, IF YOU SEE *br* , it was supposed to say and you should substitute < for *[/red]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">[blue]There are many forms of html and most modern browsers can read them all with the correct information. HTML 4.01 Transitional is versatile, powerful and pretty much universally easily read by any modern browser. 4.01 Strict is even more browser friendly, but has less features. HTML 4.01 Frameset would be required if this document was part of a frameset. There are many other forms of html too.This statement should be the very first thing on the page, at the very top.[/blue]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
Guestbook <?PHPinclude ("GBupdate.php");echo '*br**br**br**br**br*';?>[blue]Now we need to help the browser choose the correct character encoding. Remember, the computer is getting bytes(digital on and off signals) via its internet connection. It needs to convert this into something you can read.For documents in English and most other Western European languages, the most widely supported encoding is ISO-8859-1, so thats what we will use.To tell the browser this, we will add this line into the HEAD of the document.The line we need to do this is [/blue] Content-Type text/html; charset=iso-8859-1[blue]However, this line requires the co-operation of the server you are hosting the page on. As that doesn't always happen automatically (the server would have to be instructed), we are going to modify it a little to make this page more universal.This modified version of this instruction is below. Its now simply being told that the character set isn't loaded until after the META tag, and prevents loading errors. Its not ideal, but its simple and easy and requires no other action.[/blue][blue]So now we have this...[/blue]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">Guestbook <?PHPinclude ("GBupdate.php");echo '*br**br**br**br**br*';?>[blue]Now we'll add some tags. A Meta Tag is simply an information tag. It provides information not visible on the page displayed, but easily accessible by search engines which seek out meta tags and use descriptions and keywords to index your site.These arent the sexiest of things, and you wont see anything on the page to show they are there, but they are vitally important if you want to attract visitors to your website.The tag [/blue]Guestbook <meta name="description" content="Sign the daksters.com guestbook. Check out my photography, or argue with my political comment. Learn how to play Pogo Games better."<?PHPinclude ("GBupdate.php");echo '*br**br**br**br**br*';?>[blue]This page is online at [/blue] http://daksters.com/guest [blue] Check it regularly and watch it develop. Make suggestions about page layout and guestbook function.[/blue]
Mitz from Tips4pc
March 30, 2009 at 9:36 pm #31488ANNOUNCING THE RELEASE OF VERSION 2.0.5
added email check (Removed, may add later)added comments to updater...ordered GB.php by number descendingAdded sql injection prevention, this also allows for a lot more characters in the comments (' " ; : . ,) stuffs like thatadded new comments to updater.phpnew comments in index.phpnew comments in GB.phpWork begins on the Admin pageAdded simple login checker... configurable in the A_config.php pageIncluded the guestbook into the admin panelmoved admin script to rootConsolidated admin panel into one page (was three)encorporated admin panel conifg into main configcentered guestbook in admin panel pageadded comments to admin panelscrapped project, restarted admin panel as an add in interface, takes admin username password and the number to delete all at once... seemed simplerscrapped, keep reading, you'll see whyUnscrapped original work, else way i would have had to.. do a lot more...split into two pages, this will allow for page one to have the admin logon, display the enhanced guestbook, and have a form for the delete and edit commands, and will then redirect to page two for the changes... The reason for this is because the first form, the logon was still on the page, so when you went to edit it, the first form was empty, and you were told you had the wrong username / password.... lolfinished login pagefinished form to delete the entry and incorporated it into the last pagecreated script to delete an entryadded admin GB viewer columns for each typeadded a limit to the Main guestbook, can be changed in configadded link to admin pageFixed a bug in table creation (moved it but did not change placement :P)i think thats all i did....April 2, 2009 at 6:42 am #31489Cool – I now have version 4 up and running at http://daksters.com/guestThere was a slight delay in making a nice page to put it in while I waited for the guestbook to be finished, but now that it is, I'll get back to creating 🙂 The guestbook is currently visible in a draft form, but as I finalise the look I want it to have, I'll post instructions on what I did and how.Excellent work Ryan, thank you!
Mitz from Tips4pc
-
AuthorPosts
You must be logged in to reply to this topic.