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: Page Comments

Author:Steffen Kamper
Created:2005-11-30T21:17:18
Changed:2007-06-04T01:05:28
Classification:Add Comments to Your Page
Email:info@sk-typo3.de
Info 2:
Info 3:
Info 4:

EXT: Page Comments

Extension Key: sk_pagecomments

Copyright 2005,Steffen Kamper, <info@sk-typo3.de>

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: Page Comments 1

Introduction 1

What does it do? 1

Screenshots 1

Users manual 3

Installation 3

Using the Plugin 3

Using the Plugin with tt_news 3

Quick Start 3

Configuration 4

Teaser Object 5

Realurl 6

To-Do list 6

Changelog 6

Introduction

What does it do?

Simply lets you add Comments to pages. You decide, which pages will get the comment functionality, simply place the plugin on these pages.

Also there is a protection for reload, so you don't get double entries when user refreshes the page.

All Features can be configured comfortably from the Setup.

Special Feature: Webusers which are logged in don't need to fill out name/email, all other's data will be stored in cookie, if not disabled.

Screenshots

When you placed the plugin on a page ( normally as last element) it looks like this:

img-1

So when you click on the link you will see the comments and you are able to add a new comment.

Thats all.

img-2 img-3

For easy managing all the comments of the site there is a Backend Module Web > Page Comments

img-4

Users manual

Installation

Go in the Ext. Manager and install sk_pagecomments from online repository.

Using the Plugin

Insert the Plugin on the page where you want to have comment function. You also can do it from TS like

page.10.marks.COMMENTS < plugin.tx_skpagecomments_pi1

Using the Plugin with tt_news

In tt_news the News-Id is given with an url- parameter:tx_ttnews[tt_news] = newsid

So create a ext-template for the page with the single-view. Use the setting

plugin.tx_skpagecomments_pi1.bindToGETvar = tx_ttnews[tt_news]

Place the plugin on this page.

Quick Start

after installing was complete, you may configure the main options of your like. If you leave the starting point empty, records will be placed on current page.

hiding email icon from user-comment

plugin.tx_skpagecomments_pi1.commentEmail.if.equals = DontShow

same is possible with homepage-icon and answer-icon (commentHomepage and answer)

reviewing new comments

plugin.tx_skpagecomments_pi1.hideNewMsg = 1

Use the Page Comments Module in Backend to unhide the comments. If you select the root icon, you see comments from all pages.

hide Form and show form-link

plugin.tx_skpagecomments_pi1.showForm = 0
plugin.tx_skpagecomments_pi1.showFormLink = 1

notify new comments

if you want to be notified on new comments configure following settings:

plugin.tx_skpagecomments_pi1.emailNewMessage = 1
plugin.tx_skpagecomments_pi1.emailAddress = xxx@yourdomain.com
plugin.tx_skpagecomments_pi1.emailFrom = pagecomments@yourdomain .com

using the teaser

there is a prebuild object you can use directly:
lib.commentTeaser

use ObjectBrowser to change the values quickly.

Configuration

You may want to change some values for the plugin. Here are the initial values, which you can change in the TS-Setup:

(You may edit all properties, open ext_typoscript_setup.txt to view all)

_CSS_DEFAULT_STYLE

Property

_CSS_DEFAULT_STYLE

Data type

string

Description

Default CSS-styles for skpagecomments

templateFile

Property

templateFile

Data type

string

Description

Locates the Template file

commentNumber

Property

commentNumber

Data type

stdWrap

Description

stdWrap for Number in Comments

default setting is

commentNumber.wrap = #|

commentName

Property

commentName

Data type

stdWrap

Description

stdWrap for Name in Comments

commentEmail

Property

commentEmail

Data type

stdWrap

Description

stdWrap for Email in Comments

commentHomepage

Property

commentHomepage

Data type

stdWrap

Description

stdWrap for Homepage in Comments

answer

Property

answer

Data type

stdWrap

Description

stdWrap for Answer in Comments

admin.hide

Property

admin.hide

admin.unhide

Data type

stdWrap

Description

stdWrap for admin hide/unhide link

adminUser

Property

adminUser

adminGroup

Data type

string

Description

Comma seperated list of users/groups that are allowed to hide/unhide comments

allowAnswer

Property

allowAnswer

Data type

int

Description

Value for allowing answer of comment

  • 1 = allow
  • 0 = forbid

answerMargin

Property

answerMargin

Data type

int

Description

Left margin of answer threads in px, default setting is 16

comment

Property

comment

Data type

stdWrap

Description

stdWrap for Comments, default setting is

comment.parseFunc < tt_content.text.20.parseFunc

so the comment is oarsed like a normal text element replacing links etc.

showComments

Property

showComments

Data type

int

Description

Value for displaying the Comments

  • 1 = show
  • 0 = hide

showForm

Property

showForm

Data type

int

Description

Value for displaying the Form

  • 1 = show
  • 0 = hide

showCount

Property

showCount

Data type

int

Description

Obsolete ! New settings in blind

blind

Property

blind

Data type

array

Description

Settings to hide Items without removing their markers from template (1=hide)

blind.count

Property

blind.count

Data type

int

Description

If 1, hides total count of comments

blind.admin

Property

blind.admin

Data type

int

Description

If 1, hides admin link

blind.email

Property

blind.email

Data type

int

Description

If 1, hides email link

blind.homepage

Property

blind.homepage

Data type

int

Description

If 1, hides homepage link

blind.smileys

Property

blind.smileys

Data type

int

Description

If 1, hides smileys in commentform

blind.answer

Property

blind.answer

Data type

int

Description

If 1, hides answer link

blind.number

Property

blind.number

Data type

int

Description

If 1, hides comment number

dateFormat

Property

dateFormat

Data type

string

Description

Formatstring for date, look at php.net/date for possible formatstrings

you can format in 2 ways:

date-format (e.g. Y-m-d, d.m.Y)

strtotime-format (e.g. %a, %b %d)

showFormOnTop

Property

showFormOnTop

Data type

int

Description

Shows Form on top of comments if set to 1

sortOrder

Property

sortOrder

Data type

string

Description

Value for the sort order of the comments, sorted by date

  • ASC = ascending
  • DESC = descending

sortOrderOnForm

Property

sortOrderOnForm

Data type

string

Description

Value for the sort order of the comments, sorted by date while showing form

  • ASC = ascending
  • DESC = descending

maxRecords

Property

maxRecords

Data type

int

Description

Limit for the Comment Records. Leave empty for unlimited.

((Unknown Property))

Property

Data type

Description

commentOnlyRegistered

Property

commentOnlyRegistered

Data type

int

Description

If set to 1. only registered Users are allowed to comment

showRegisteredFields

Property

showRegisteredFields

Data type

int

Description

Value for displaying name/email for registered Users

  • 1 = show
  • 0 = hide

useCaptcha

Property

useCaptcha

Data type

int

Description

Value for using captcha (must be installed)

  • 1 = use
  • 0 = nouse

useFreecap

Property

useFreecap

Data type

int

Description

Value for using frecap (must be installed and useCaptcha must be 0)

  • 1 = use
  • 0 = no use

emailNewMessage

Property

emailNewMessage

Data type

int

Description

Value for sending notify email on new comments (emailAddress and emailFrom has to be set)

  • 1 = send
  • 0 = do not send

emailAddress

Property

emailAddress

Data type

string

Description

Recipient of notify email

emailFrom

Property

emailFrom

Data type

string

Description

Sender of notify email

hideNewMsg

Property

hideNewMsg

Data type

int

Description

Value for setting new comments hidden

  • 1 = set hidden
  • 0 = do not set hidden

hideMsg

Property

hideMsg

Data type

stdWrap

Description

stdWrap for Message if hideNewMsg=1 and a comment was posted, default setting is

wrap = <p><i>|</i></p>

minCharsName

Property

minCharsName

Data type

int

Description

min. number of chars for name

minCharsComment

Property

minCharsComment

Data type

int

Description

min. number of chars for comment

useCookies

Property

useCookies

Data type

int

Description

If >0 it'S the number of days the username and email will be stored in a cookie

If you use Page Comments with special GETvars, e.g. For use with

Property

If you use Page Comments with special GETvars, e.g. For use with tt_news, you can use following property

bindToGETvar

Property

bindToGETvar

Data type

string

Description

Use the determing GET-Var

e.g. for tt_news enter

bindToGETvar=tx_ttnews[tt_news]

For using the Page Comments with tt_news / sk_simplegallery there is a hook implemented. Just edit your News-Template for LIST or LATEST and use the Marker ###COMMENTCOUNT### for displaying the count of comments for each News Entry.

If you want to use the page Comments with other extensions and want to have implemented a simular method please let me know.

Teaser Object

Following object is predefined for teasing. You can use it in TS of your template or use Extension tscobj for inserting in pages.

#Object for Teaser
lib.commentTeaser < plugin.tx_skpagecomments_pi1
lib.commentTeaser {
        teaser = 1
        teaser {
                entries = 5
        }

        pageLink {
                stripHtml=1
                crop = 5|...|1
        }

        comment {
                #stdWrap for Comments
                stripHtml=1
                crop = 35|...|1
        }
        dateFormat = d.m.Y

        goto {
                override = <img src="typo3conf/ext/sk_pagecomments/res/link.png" width="16" height="16" title="go to comment" />
        }
}

Realurl

If you work with realurl, don't forget to set

config.prefixLocalAnchors = all

To-Do list

Let me know

Changelog

0.0.1 First Release

  • 0.0.2 added Manual
  • missing comments
  • 1.0.9 changed the code completely, added new features, templatable
  • 1.0.10 added bindToGetVar for using with tt_news etc., reverse Order with showing Form possible

img-5 EXT: Page Comments - 6