DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: eLuna Page Comments

Author:Stéphane Dupont
Created:2007-02-16T12:05:17
Changed by:Stéphane Dupont
Changed:2010-04-15T12:14:51.150000000
Author:Stéphane Dupont
Email:steph@eluna.org
Info 3:
Info 4:

EXT: eLuna Page Comments

Extension Key: eluna_pagecomments

Copyright 2005-2007, Stéphane Dupont, <steph@eluna.org>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

EXT: eLuna Page Comments 1

Introduction 2

What does it do? 2

Screenshots 2

Users manual 3

Configuration 5

Example 7

Changelog 8

Introduction

What does it do?

This extension (originally based on sk_pagecomments )allows to display and submit comments on pages. It's quite flexible and several functionalities are available. For example, the extension can set cookies to remember users, can send you an email when a new comment is posted, and more ! You can see this extension running live on my website, in particular on the following page: http://steph.eluna.org/eluna_graph_system.html

Screenshots

img-1

Users manual

  • Install the extension via the Typo3 Extension Manager.
  • Create a SysFolder to store the comments.

img-2

Add an element to a page and select eLuna Page Comments in the New Content Element wizard.

img-3

  • Fill the Header field if you want to.
  • In the Startingpoint field, select the SysFolder you created before.

img-4

  • Save and close the content element: you're done !
  • You can configure the plugin by adding Typoscript in your template. See next section for detailed configuration options.

Configuration

You'll find here Typoscript configuration for the plugin.

startCode

Property

startCode

Data type

string

Description

If equals to LINK, plugin will displays only a “show comments” link by default. Otherwise, will displays available comments for the page, and a form to submit a new one.

Default

LINK

showCount

Property

showCount

Data type

boolean

Description

If set, when not in LINK mode, will displays the total number of comments available for the page.

Default

1

sortOrder

Property

sortOrder

Data type

string

Description

Define the comments sort order. If set to ASC, will displays older comments first. If set to DESC, will displays newer comments first.

Default

ASC

maxRecords

Property

maxRecords

Data type

int

Description

Max number of comments to display. Leave empty for unlimited number of comments.

Default

dateFormat

Property

dateFormat

Data type

string

Description

Date format used in comments. See the PHP function date() formore informations.

Default

d/m/Y, H:i

doNotRequireEmailField

Property

doNotRequireEmailField

Data type

boolean

Description

If set, the email field won't be required

Default

0

linkNameWithWebsite

Property

linkNameWithWebsite

Data type

boolean

Description

If set, the name of the users will be linked to their homepage (if homepage were submitted).

Default

1

linkUrls

Property

linkUrls

Data type

boolean

Description

If set, URLs in comments will be linked.

Default

1

nofollow

Property

nofollow

Data type

boolean

Description

If set, add rel="nofollow" to all external links.

Default

0

extTarget

Property

extTarget

Data type

string

Description

Target to use for external links.

Default

_blank

emoticons

Property

emoticons

Data type

boolean

Description

If set, graphical emoticons will be used in comments.

Default

1

emoticonsDir

Property

emoticonsDir

Data type

string

Description

If set, emoticons will be substituted with images from this directory, and not from the default one ( eluna_pagecomments/pi1/emoticons ). The directory must contain the following images: smile.gif , sad.gif , wink.gif and biggrin.gif .

Default

minChars_Name

Property

minChars_Name

Data type

int

Description

Minimum number of chars for an author name to be valid (0 to bypass).

Default

2

minChars_Comment

Property

minChars_Comment

Data type

int

Description

Minimum number of chars for a comment to be valid (0 to bypass).

Default

0

execCmd

Property

execCmd

Data type

string

Description

Command to be executed when a new comment is posted. It can be useful, for example, to execute a script that update an RSS feed. The command is executed via the PHP function shell_exec().

Default

sendMail

Property

sendMail

Data type

boolean

Description

If set, an email is send when a new comment is posted.

Default

0

sendMail_To

Property

sendMail_To

Data type

string

Description

Send mail to ?

Default

sendMail_From

Property

sendMail_From

Data type

string

Description

Send mail from ?

Default

sendMail_ReplyTo

Property

sendMail_ReplyTo

Data type

string

Description

Send mail with which reply-to ?

Default

sendMail_Subject

Property

sendMail_Subject

Data type

string

Description

Send mail with which subject ?

Default

sendMail_Charset

Property

sendMail_Charset

Data type

String

Description

Send mail with which charset ? (ISO-8859-1, UTF-8, ...)

Default

useCookies

Property

useCookies

Data type

boolean

Description

Is set, cookies will be used to store/restore name/email/homepage of authors.

Default

1

cookies_NumberOfDays

Property

cookies_NumberOfDays

Data type

int

Description

Number of days before a cookie expires

Default

30

useFEUsersData

Property

useFEUsersData

Data type

boolean

Description

If set, name/email of the submit form will be filled with FE users auth data.

Default

1

onlyFEUsersCanComment

Property

onlyFEUsersCanComment

Data type

boolean

Description

If set, only registered FE users are allowed to comment

Default

0

useCAPTCHA

Property

useCAPTCHA

Data type

boolean

Description

If set, will use CAPTCHA for spam fighting (sr_freecap extension must be loaded !)

Default

1

commentLayout1

Property

commentLayout1

Data type

string

Description

Comment layout (for comments with even numbers).

Default is:

<div class="###CSS_PREFIX###comment">
  <div class="###CSS_PREFIX###comment_author">
    ###NAME######TEXT###
  </div>
  <div class="###CSS_PREFIX###comment_date">
    ###DATE###
  </div>
  <div class="###CSS_PREFIX###comment_text">
    ###COMMENT###
  </div>
</div>

Default

commentLayout2

Property

commentLayout2

Data type

string

Description

Comment layout (for comments with odd numbers).

Default is:

<div class="###CSS_PREFIX###comment_alt">
  <div class="###CSS_PREFIX###comment_author">
    ###NAME######TEXT###
  </div>
  <div class="###CSS_PREFIX###comment_date">
    ###DATE###
  </div>
  <div class="###CSS_PREFIX###comment_text">
    ###COMMENT###
  </div>
</div>

Default

formLayout

Property

formLayout

Data type

string

Description

Layout for the submit-a-new-comment form.

Default is:

<div class="###CSS_PREFIX###form_title">
  ###FORM_TITLE###
</div>
<div class="###CSS_PREFIX###form">
  <form action="###ACTION###" method="post">
  <input type="hidden" name="no_cache" value="1" />
  <p>
    <input type="text"
       name="###ID_PREFIX###[name]"
       id="###ID_PREFIX###_name"
       value="###NAME_VALUE###" size="22" />
    <label for="###ID_PREFIX###_name">
      ###NAME###
    </label>
  </p>
  <p>
    <input type="text"
      name="###ID_PREFIX###[email]"
      id="###ID_PREFIX###_email"
      value="###EMAIL_VALUE###" size="22" />
    <label for="###ID_PREFIX###_email">
      ###EMAIL###
    </label>
  </p>
  <p>
    <input type="text"
      name="###ID_PREFIX###[website]"
      id="###ID_PREFIX###_website"
      value="###WEBSITE_VALUE###"
      size="22" />
    <label for="###ID_PREFIX###_website">
      ###WEBSITE###
    </label>
  </p>
  <!-- ###CAPTCHA### -->
  <p>
    ###SR_FREECAP_IMAGE###
  </p>
  <p>
    <input type="text"
      name="###ID_PREFIX###[answer]"
      id="###ID_PREFIX###_answer"
      size="22" />
    <label for="###ID_PREFIX###_answer">
      ###SR_FREECAP_NOTICE###
      ###SR_FREECAP_CANT_READ###
    </label>
  </p>
  <!-- ###CAPTCHA### -->
  <p>
    <textarea
      name="###ID_PREFIX###[comment]"
      id="###ID_PREFIX###_comment"
      cols="100%" rows="10">
      ###COMMENT_VALUE###
    </textarea>
  </p>
  <p>
  <input
    name="###ID_PREFIX###[submit]"
    id="###ID_PREFIX###_submit"
    type="submit" value="###SUBMIT###"
    class="submit" />
  </p>
  </form>
</div>

Default

sendMailLayout

Property

sendMailLayout

Data type

string

Description

Layout for the emails sent when new comments are posted.

Default is:

Page: ###PAGE###

Name: ###NAME###
Email: ###EMAIL###
Website: ###WEBSITE###

###COMMENT###

Default

Example

Here's an example of configuration:

plugin.tx_elunapagecomments_pi1 {

  sendMail = 1
  sendMail_To = steph@eluna.org
  sendMail_From = comments@steph.eluna.org
  sendMail_ReplyTo =
  sendMail_Subject = New comment on Steph.eLuna.org

  execCmd = /usr/bin/php /home/user/rss-update.php &
}

Changelog

Changes in 1.1.4

Bug and deprecated php functions fixes

Changes in 1.1.3

  • Security Fix
  • doNotRequireEmailField option added
  • sendMail_Charset option added

Changes in 1.1.2

Integration of freeCap CAPTCHA extension

Changes in 1.1.1

Manual added

Changes in 1.1.0

  • Now date display is based on crdate field (instead of tstamp)
  • execCmd option added

Changes in 1.0.9

Add anchors to all comments so now they can be directly linkable

Changes in 1.0.8

Italian translation added (thanks to Lukas Costabiei)

Changes in 1.0.7

Now plugin is compatible with realUrl (thanks to Tomas Kruta)

Changes in 1.0.6

Updated the way emoticons are substitued

Changes in 1.0.5

Corrected a bug on HTML sepcial chars

Changes in 1.0.4

sendMailLayout added (thanks to Johannes Konert)

Changes in 1.0.3

  • nofollow and extTarget options added (thanks to Tobias Beckh)
  • Small fixes

Changes in 1.0.2

Now the plugin appears in new content plugin list

Changes in 1.0.1

German translation added (thanks to Felix Eckhofer)

img-5 EXT: eLuna Page Comments - 8