logo
Home XtGem- Templates- XtScript- bottom

Xtgem Guestbook function

You can add a guest book to your xtgem site
(One per site like the blog function)
Only the sites logged in admin can reply to posts in the guestbook
no other users will see the reply links

Spam reports and post deletions are done using the "Guestbook comments" link in the "Comments" tab of your sites control panel
There is a setting in "site options" for commenting restrictions in the guestbook with the same options as blog comments
The guestbook uses the same classes pagination and markup as blog comments
Logged in xtgem users will post using their community name and avatar (or gravatar if no profile image is set and they have one linked to their email address) with a link to their profile

The main settings are :
Guestbook entries per page (How many entries to show on each page)
Comment sorting (newest first or oldest first)
Allow html (Allows a very limited amount of html to be used in entries)
Format (The format for the time stamp selecting ago uses a Time ago format)
The timezone is set automatically to the visitors timezone or their countries main timezone as a fallback
Using the Code editor you can also set
comments_disable_links="1" (Links in the comments will be displayed as text only )
badwords="comma,separated,list,of,banned,words" (banned words are replaced with *****)

In the "more options" you can set your own text for : There are also options for Show all comments and Reply
although these are only visible to the sites admin

The report spam links in the guest book automatically analyse the post and if it is above a certain threshold the post will be hidden
The report spam links in the building tool comments/guestbook will cause the comment to be hidden

Example Guestbook (This sites)

Advanced Users

There is a subsidiary function that returns the number of comments in the guestbook
The count for this guestbook is 94

Guestbook in Xtscript

Guestbooks cam be manipulated by the use of Xtscript.
The guestbook can be assigned to a xtscript variable and then modified by any of the commands and functions of Xtscript.

Twig Template

There is a Twig PHP template template engine file available for the XtGem guestbook function
this must be copied to a plain text file name xtguestbook.twig In a folder named _xtgem_templates in the root directory (main file browser) of your site.
Most of the data variables and array structures are preset by the PHP that actually creates the guestbook on your page
But you can extend and reconfigure it at will.
The documentation relevant to twig templates is available at Twig for Template Designers

XTguestbook twig file

Copy to
/_xtgem_templates/xtguestbook.twig
Also see
BlogForum
Powered by XtGem
About us Contact Forum topÂ