Lazarus Guest Book - Installation
Installation of Lazarus Guestbook
In this example I name the folder where the Lazarus software is stored lazarusgb and the TNG file for the guestbook ourguestbook.php. These names can be changed individually but then they must be replaced accordingly in the code.
Download the software (latest Sep 2017):
Guestbook: http://carbonize.co.uk/Lazarus/download.php (V1.24)
Update (beta): http://carbonize.co.uk/Lazarus/Forum/index.php?topic=2730.0 (V1.25 b 1) -- ZIP file at the end of the first post
Language pack(z.B. german or french): http://carbonize.co.uk/Lazarus/download.php
--> The Server is currently not available! (26 Nov 2017)
--> It can be downloaded from GitHub - https://github.com/garywill/lazarus (26 Aug 2020)
Load the software to the server
Load the Lazarus software into the new folder lazarusgb in the TNG directory. All files must be overwritten by the update.
Copy the language files (two for each language) in to the Lazarus folder lang.
Open the file lazarusgb/admin/config.inc.php in an editor and set the access data to your database:
/* database settings */ $GB_DB['dbName'] = 'database name'; // The name of your MySQL Database $GB_DB['host'] = 'localhost'; // The server your database is on. localhost is usualy correct $GB_DB['user'] = 'user name'; // Your MySQL username $GB_DB['pass'] = 'database password'; // Your MySQL password // You can change this if some of the database table names are already used // or if you want to host more than one guestbook on one database $table_prefix = 'book'; // Put your email address here to receive email reports of any errors $TEC_MAIL = 'you_at_your_domain_dot_com'; // If you are using the guestbook as a module in POST-Nuke 0.x or PHP-Nuke 5.x or later set this to true define('IS_MODULE', false); // // Do not edit below this line unless you know what you are doing // $DB_CLASS = 'mysql.class.php'; // Change to mysqli.class.php to use mysqli_* functions instead of mysql_* functions
IMPORTANT! If your server use PHP 7, line 35 mysql.class.php must be changed to mysqli.class.php, if it use PHP 5.6 this line will remain as it is.
Activate the software
Call up in your browser: http://www.yourwebsite.com/lazarusgb/install.php
A window opens in which some presettings are displayed:
- your base url: http://www.yourwebsite.com/lazarusgb -- OK! This entry can remain as it is (the Lazarus folder)
- your guestbook url: http://www.yourwebsite.com/lazarusgb -- this entry must be changed to http://www.yourwebsite.com/ourguestbook.php (the new TNG file for Guestbook)
In this form you can also enter details for the admin access (Username and Password). If the fields remain empty the Username is: test and the Password is: 123.
After you have confirmed with RUN INSTALLER the lines for the guestbook are generated in the database and a confirmation screen is displayed.
Please follow the important instructions, displayed in red: The file install.php must be deleted for safety reasons!
Now the first test can be done: Open your guestbook in your browser: http://www.yourwebsite.com/lazarusgb.
Make the connection to the TNG page
We now create a new file in an editor, e.g. ourguestbook.php and copy the following code into it:
<?php include( "./tng_begin.php"); // at the beginning only one point if TNG is on the same level as this file if( !$cms['support'] ) $cms['tngpath'] = "./"; // same as above. Otherwise two points if this file is in a subfolder to the main directory $yourtitle = "Guestbook"; // or something else $yourlink = "/ourguestbook.php"; // do not forget the subfolder if this file is not in the main directory! (/subfolder/ourguestbook.php) $logstring = "<a href=\"$yourlink\">$yourtitle</a>"; writelog($logstring); preparebookmark($logstring); tng_header( $yourtitle, $flags ); ?> <h1 class="header"><img src="img/tng_hist.gif" class="headericon"/> <?php echo $text['MYgbtitle']; ?></h1><br clear="left"/> <?php include('./lazarusgb/gbinclude.php'); // one point as above. Do not forget the folder name where the file gbinclude.php is located! tng_footer( "" ); ?>
This code is taken from the file historytemplate.php from the main directory of TNG and adapted to our needs.
Now save the file and load it into the main directory of TNG.
Make a test: http://www.yourwebsite.com/ourguestbook.php (Now the guestbook should already be displayed in your template!?!).
It's not working? Then try to make changes to the path data (one point, two points), check the correct entry of the subfolder etc.
Or make the file historytemplate.php running (... as it is to read in this file) and next when that has worked, copy line 18 (<?php include ...) into this file.
For this, the following mod can be used, which will insert a link into all currently active templates.
Make the guestbook multilingual
So that the guestbook is switching to the language in the same way as TNG's language is switching, we create a new cookie with the name "lang", which the Lazarus Guestbook understands automatically .
If you use the format UTF8 in your TNG installation you must rename all language files in the guestbook (lazarusgb/lang/) e.g. from english to english-utf8.
IMPORTANT! Now the main language has to be redefined and stored in the guestbook analog to the main language of your TNG (Admin: SETTINGS -> general -> Language; store with "Submit Settings").
Setting the links to the guestbook in your template and inserting the language cookie, all together is done by this Mod:
Lazarus Guestbook Link Mod 11.1.2 tested with TNG-Version 11.1.1. and 11.1.2, supported English, German, French
For Multi-language implementation see Lazarus Guest Book - Multi-lingual Installation
Many thanks to those who published the codes for the integration of Lazarus Gusetbook many years ago. I have just adapted it and connected it with the latest possibilities.
Sites using the Lazarus Guestbook
If you have installed the Guestbook, please add your TNG site to the table below:
|Luithlenfamilie||Ingo Wagner||PHP 5.6.30||11.1.2||11.1.2||DE, EN, NO, FR|