If you would like to modify some global values of the TypoScript configuration, used for the guestbook output, take a look at the "Constants Editor". To open it, click on "Template" in the left-frame menu, choose the page with the root-template in the pagetree and select the "Constant Editor" from the menu in the upper right corner.
The default values are stored in the file ext_typoscript_setup.txt in the extension directory. For a list of all possible (ve_guestbook specific) options see the table "Reference" below.
File: | Description: |
|---|---|
pi1/class.tx_veguestbook_pi1.php | Main class used to generate the guestbook. |
pi1/guestbook_template.tmpl | Example template file. |
ext_typoscript_setup.txt | TS setup files. Here are the styles defined for the CSS based html-template. |
In the typoscript setup you can add or remove emoticons:
emoticons {active = 0
10 = IMAGE
10 {file = EXT:ve_guestbook/pi1/emoticons/###EMOTICON###.gif
params = hspace=1 vspace=1 valign=bottom
border = 0
altText = Emoticon
titleText = Emoticon
}
subst {11.str = :D
11.val = 1
12.str = :) || :-)
12.val = 2
13.str = :( || :-(
13.val = 3
14.str = :cry:
14.val = 4
15.str = :?:
15.val = 5
16.str = ;) || ;-)
16.val = 6
}
}
You can activate the emoticons in setting the parameter active = 1. The substitution allows different keys, e.g. the icons :-) and :-) will be replaced with the image 2.gif. So you can see the string || as a marker for more than one value in the string.
You can easily convert entries from tt_guest to ve_guestbook by following sql statement:
INSERT INTO tx_veguestbook_entries SELECT uid, pid, 0 as uid_tt_news , 0 as sys_language_uid, tstamp, crdate, 0 AS cruser_id, deleted, hidden, cr_name, '' AS surname, cr_email, www, '' AS
place, note, '' AS entrycomment, '' as remote_addr
FROM tt_guest
Credits: Lars Haerig (integra)
You can insert this statement by the use of the section phpMyAdmin in the tools section of your typo3 backend.
If you consider to let the module crypt the emails by using the typo3 spam protection, please insert following code to your setup in your main template.
config {spamProtectEmailAddresses = 1
spamProtectEmailAddresses_atSubst = (at)}
In the template there are two new markers since version 0.3:
Template Marker: | Description: |
|---|---|
###GUESTBOOK_EMAIL_URL### | Mailto-Link (if spam protection is activated, this is the link to encrypt javascript function) |
###GUESTBOOK_EMAIL### | E-Mail (if spam protected the email will be replaced with the above configurated string) |
Rupert Germann (TYPO3 Security Team) found this security hole. But since v1.9 the guestbook is armored against XSS attacks. I had to remove the flexform configuration stripTags. But you can define your allowed tags in the typoscript setup:
allowedTags = <a>,<br>,<b>,<li>,<ol>,<p>,<strong>,<u>,<ul>
Tags like <table> or <tr> could be destroy your complete framework layout.
For multilangual pages you can define your mail encoding / charset:
config {notification_email_encoding = base64
notification_email_charset = UTF-8}
Valery Romanchev had the idea to use the guestbook to comment article from the extension tt_news. Also he created the patch for the guestbook.
How you can do it? Just include a list and a form element on the page with the single view of the news extension. The comment will be automatically connected to the selected news item.
First you have to choose one of the supported captcha extensions. Following two extensions are supported:
http://typo3.org/extensions/repository/view/sr_freecap/0.4.6/
http://typo3.org/extensions/repository/view/captcha/1.0.0/
You only have to choose your installed captcha in the BE flexform.
If you have installed the extension indexed_search you are able to index the list views of the guestbook. Added in version 2.2 the performance will be better because these pages will also be cached. After a new entry the index and cache will be deleted automatically, so the list view will be always up-to-date. Be sure that you place the list and form view on separated pages, so the form won't be cached and indexed.
These feature was sponsored by www.perfectmallorca.com
plugin.tt_news properties: TS configuration.
Property: | Data type: | Description: | Default: |
|---|---|---|---|
templateFile | resource | The template-file. (See example in "/ext/ve_guestbook/pi1/guestbook_template.tmpl"). You can define a template for a complete pagetree or a certain page in the Constant Editor or directly in your TS setup. Example: plugin.tx_veguestbook_pi1 {file.templateFile = fileadmin/my_templates/guestbook.html} | |
General Settings: | |||
teasercut | Int | Here you can set the global length of the teaser. Example: plugin.tx_veguestbook_pi1.teasercut = 100 | |
allowedTags = | string | Define your allowed tags for user input: Example: allowedTags = <a>,<br>,<b>,<li>,<ol>,<p>,<strong>,<u>,<ul> | |
sortingField | string | Here you can set the global sorting field for the teaser and the guestbook list. Example: plugin.tx_veguestbook_pi1.sortingField = surname | |
sortingDirection | string | Here you can set the global sorting direction for the teaser and the guestbook list. Example: plugin.tx_veguestbook_pi1.sortingDirection = asc | |
limit | Int | Here you can set the global limit of listing modes. Example: plugin.tx_veguestbook_pi1.limit = 3 | |
limit | Int+ | The maximum number of news-records showing in “LIST” view. | 7 |
latestLimit | Int+ | The maximum number of news-records showing in “LATEST” view. | 3 |
pageBrowser | pageBrowser Configuration | The pagebrowser ca be configured with this variables: “maxPages”: the maximaum number of pages that are shown in the pagebrowser “showPBrowserText”: set this to '0' if you want the pagebrowser to display only numbers. “tableParams”: here you can add parameters for the table that wraps the pagebrowser “showResultCount”: show the result count. The formating of the pagebrowser is done by CSS. See _CSS_DEFAULT_STYLE at the end of this list for an example. Hint: If you want to change the default texts like “previous” to something else, you can do this with the _LOCAL_LANG var (example at the and of this list). for the names of the language markers see: FILE:pi/locallang. Example: (default setting) pageBrowser {maxPages = 10 showPBrowserText = 1 tableParams = cellpadding=2 showResultCount = 1 } | |
latestWithPagebrowser | boolean | If this is set, the Latest template can also contain a page browser (you'll have to add one to your template fisrt). If this is not set (default) the content of the latest element isn't influenced by the pagebrowser. | |
_CSS_DEFAULT_STYLE | string | Default css styles for the extension. Example: _CSS_DEFAULT_STYLE ( /* example styles */ .tx-guestbook-list-header { background-color: #539521; color: #FFFFFF; font-weight:bold; } .tx-guestbook-list-row { background-color: #FFFFFF; } .tx-guestbook-list-rowleft { background-color: #EEEEEE; } .tx-guestbook-list-small { font-size: 9px; color: #666666; } .tx-veguestbook-pi1-browsebox TD { font-size: 9px; color: #666666; } .tx-veguestbook-pi1-browsebox-strong, .tx-ttnews-browsebox-SCell { font-weight: bold; } .tx-veguestbook-pi1-browsebox-SCell { background-color: #EEEEEE; } .tx-guestbook-latest-header { background-color: #539521; color: #FFFFFF; font-weight:bold; } .tx-guestbook-latest-row { background-color: #FFFFFF; } .tx-guestbook-latest-small { font-size: 9px; color: #666666; } .tx-guestbook-form-inputfield-med { border-style: solid; border-width: 1pt; border-color:#539521; font-size:12; color:#333333; width:100; height:20; } .tx-guestbook-form-inputfield-big { border-style: solid; border-width: 1pt; border-color:#539521; font-size:12; color:#333333; width:150; height:20; } .tx-guestbook-form-textarea { border-style: solid; border-width: 1pt; border-color:#539521; font-size:12; color:#333333; width:250; } .tx-guestbook-form-obligationfield { color: #CC0000; } .tx-guestbook-form-error { color: #CC0000; }) |