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.

powermail_frontend

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:Alex Kellner
Changed:2011-03-14T15:39:08.910000000
Classification:Frontendlist for powermail entries
Author:Alexander Kellner
Email:Alexander.Kellner@einpraegsam.net
Info 3:
Info 4:

img-1 powermail_frontend

Extension Key: powermail_frontend

Copyright 2005-2009,

Alexander Kellner,

<Alexander.Kellner@einpraegsam.net>

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

powermail_frontend 1

powermail_frontend introduction 3

What does it do 3

Possible applications with powermail and powermail_frontend 3

Features 3

This plugins are needed: 3

Screenshots 4

Frontend: Example list on einpraegsam.net 4

Frontend: Example list (default CSS) 5

Frontend: Example for frontend edit (default CSS): 6

Backend: Config plugin 7

Searching for new screenshots 7

How to use 8

Step by step: 8

Test list: 8

FE Plugin 9

Main configuration 9

Listview 10

Latest 11

Singleview 12

Search 13

FE Edit 14

Typoscript 15

Constants 15

Setup 17

FAQ 20

How to add localized text to the html templates? 20

How to add typoscript (userFunc) to the html templates? 20

Edit icons are not shown, but I'm the creator of an entry? 20

How to show images of uploaded files in frontend? 20

How can I show the crdate in frontend in a viewable format? 20

Todos 21

Changelog 22

Additional links 24

powermail_frontend introduction

What does it do

Do you use powermail forms and want to show some entries on your page (e.g. as guestbook, events etc...) – so use powermail_frontend to list this entries.

The model for this extension was wt_directory (tt_address list).

Pagebrowser makes browsing possible. Order by any field uid possible.

Fully configurable via typoscript.

Frontend editing of powermail entries possible.

Possible applications with powermail and powermail_frontend

  • Guestbook
  • Eventlist
  • Blog
  • Userlist
  • Filelist
  • Database (car, real estate, etc...)

Features

  • List-, Detail-, Latest View
  • ABC Filter
  • Define Searchfields
  • Sorting in Frontend
  • Fully configurable via typoscript
  • Frontend Editing of powermail entries

This plugins are needed:

  • powermail of course (we advise you to use 1.4.10 or newer)
  • wt_doorman (to filter user entries against bad behaviour)

Screenshots

Frontend: Example list on einpraegsam.net

img-2

Frontend: Example list (default CSS)

img-3

Frontend: Example for frontend edit (default CSS):

img-4

Backend: Config plugin

img-5

Searching for new screenshots

If you want to publish some screenshots, you're always welcome – just write me!

How to use

Step by step:

  • Install powermail (see powermail manual for details)
  • Install wt_doorman (for security reasons)
  • Import powermail_frontend from online repository
  • Enter a powermail_frontend plugin to a page
  • Choose the starting point (select where powermails are stored)
  • Save plugin
  • Define the mode (e.g. List view)
  • Choose any fields for showing in frontend and
  • Save again

FE Plugin

Main configuration

Screenshot

img-6

Explanation

This is the part for the main settings

Select mode(s): Define which mode should be shown in frontend

List view: List view of database entries (show all entries in a list)

Lates view: Latest view of database entries (show X latest entries)

Single view: Show only the details of one entry

Search fields: Show ABC list or some search fields to filter listview or latestview

Edit entries in frontend: If you want to enable frontendediting of powermail entries, you can use this mode

Startingpoint: Select the folder with powermail entries (and save it at once)

Listview

Screenshot

img-7

Explanation

Show some entries (all settings can also be done via constants)

  • Select some fields to show: You can choose which fields should be shown. If you don't select a field all available fields will be shown /NOTE: Only fields of existing powermail mails entries will be shown – so store min. one powermail entry before /NOTE2: Select a startingpoint (see above) will filter the fieldlist
  • Select page with listview (empty for same page): If there is a detailview on the same page and you want a back link to another page with the listview, you can select where the listview is
  • Own entries only: Show only entries of currently logged in FE-User

Latest

Screenshot

img-8

Explanation

There is nearly no different between list- and latest view (all settings can also be done via constants)

  • Select some fields to show: You can choose which fields should be shown. If you don't select a field all available fields will be shown
  • Show entries of the last X days (empty for no limit): Only entries of the last X days will be shown if there is a number
  • Show max. X entries (empty for no limit): Limit for the shown entries
  • Show only entries in future (only if a field is a timestamp): If one of the powermail fields is filled with a timestamp (maybe an event date – for showing events), you can choose this field and only entries in the future will be shown
  • Select page with latestview (empty for same page): If there is a detailview on the same page and you want a back link to another page with the latestview, you can select where the plugin is
  • Own entries only: Show only entries of currently logged in FE-User

Singleview

Screenshot

img-9

Explanation

Showing only one item

  • Select some fields to show: You can choose which fields should be shown. If you don't select a field all available fields will be shown
  • Select page with singleview (empty for same page): If there is a listview or latestview on the same page and you want a link to another page with the singleview, you can select where the plugin is

FE Edit

Screenshot

img-11

Explanation

If you want to enable frontend – editing for a FE_User, you can make some settings

  • Choose fields to update: Enable some fields which should be updateable in frontend(empty if you want to enable all fields).
  • Define some FE-Users which are allowed to update: You can select one or more user which are able to update the entry.If you use [Owner], the creator of the powermail entry (since powermail 1.4.10) can edit his own entry.
  • Define some FE-Groups which are allowed to update: You can select one or more usergroups and allow the users of these groups to update the entries.If you use [Owner Group], the whole group of the powermail entry creator (since powermail 1.4.10) can edit there entries.
  • Select page with edit plugin (empty for same page): If you want to locate the frontendedit function in another page, you have to choose where the feedit function is listed

Currently it's only possible to show text fields in the frontend (no selection, radiobuttons or something)

Typoscript

Constants

###
# This are the default TS-constants for powermail_frontend
##

plugin.powermail_frontend {

        # cat=plugin.powermail_frontend/file/0010; type=file[html,htm,tmpl,txt]; label= Template File list: HTML-template file for showing values in a list (see EXT:powermail_frontend/templates/tmpl_list.html for an example)
        template.list = EXT:powermail_frontend/templates/tmpl_list.html

        # cat=plugin.powermail_frontend/file/0020; type=file[html,htm,tmpl,txt]; label= Template File latest: HTML-template file for showing latest values in a list (see EXT:powermail_frontend/templates/tmpl_latestt.html for an example)
        template.latest = EXT:powermail_frontend/templates/tmpl_latest.html

        # cat=plugin.powermail_frontend/file/0030; type=file[html,htm,tmpl,txt]; label= Template File list: HTML-template file for showing values in a detailview (see EXT:powermail_frontend/templates/tmpl_single.html for an example)
        template.single = EXT:powermail_frontend/templates/tmpl_single.html

        # cat=plugin.powermail_frontend/file/0040; type=file[html,htm,tmpl,txt]; label= Template File all marker: HTML-template file for display automatic markers (see EXT:powermail_frontend/templates/tmpl_all.html for an example)
        template.all = EXT:powermail_frontend/templates/tmpl_all.html

        # cat=plugin.powermail_frontend/file/0050; type=file[html,htm,tmpl,txt]; label= Template File pagebrowser: HTML-template file for display pagebrowser in listview (see EXT:powermail_frontend/templates/tmpl_pagebrowser.html for an example)
        template.pagebrowser = EXT:powermail_frontend/templates/tmpl_pagebrowser.html

        # cat=plugin.powermail_frontend/file/0060; type=file[html,htm,tmpl,txt]; label= Template File search: HTML-template file for display searchfilter with listview (see EXT:powermail_frontend/templates/tmpl_search.html for an example)
        template.search = EXT:powermail_frontend/templates/tmpl_search.html

        # cat=plugin.powermail_frontend/file/0070; type=file[html,htm,tmpl,txt]; label= Template File edit: HTML-template file for edit in frontend (see EXT:powermail_frontend/templates/tmpl_edit.html for an example)
        template.edit = EXT:powermail_frontend/templates/tmpl_edit.html

        # cat=plugin.powermail_frontend//0100; type=boolean; label= Hide label if empty value: Value could be hidden if value is empty
        emptylabels.hide = 1

        # cat=plugin.powermail_frontend//0200; type=text; label= List order: List view order by any powermail field (maybe uid34 DESC or uid11 ASC) crdate, recipient, subject_r, sender, senderIP also possible (if empty crdate DESC)
        list.orderby =

        # cat=plugin.powermail_frontend//0210; type=int; label= List X per page: Define max entries per page for list view (e.g. 10)
        list.perPage = 10

        # cat=plugin.powermail_frontend//0220; type=int; label= List X days: Show only entries of the latest X days (e.g. 10)
        list.delta =

        # cat=plugin.powermail_frontend//0230; type=int; label= List max. X entries: Show max. X entries (e.g. 10)
        list.limit =

        # cat=plugin.powermail_frontend//0300; type=text; label= Latest order: Latest view order by any powermail field (maybe uid34 DESC or uid11 ASC) crdate, recipient, subject_r, sender, senderIP also possible (if empty crdate DESC)
        latest.orderby =

        # cat=plugin.powermail_frontend//0310; type=int; label= Latest X per page: Define max entries per page for latest view (e.g. 10)
        latest.perPage = 10

        # cat=plugin.powermail_frontend//0320; type=int; label= Latest X days: Show only entries of the latest X days (e.g. 10)
        latest.delta =

        # cat=plugin.powermail_frontend//0330; type=int; label= Latest max. X entries: Show max. latest X entries (e.g. 10)
        latest.limit =

        # cat=plugin.powermail_frontend//0900; type=int; label= Overall limit: If you have performance problems, you can define a maximum sql query limit (e.g. 1000)
        query.limit = 1000

        # cat=plugin.powermail_frontend//0910; type=text; label= SQL orderby: Normaly, you define order via list.orderby, this is only for use with query.limit (e.g. crdate DESC)
        query.orderby = crdate DESC

}

Setup

# POWERMAIL_FRONTEND PLUGIN #
includeLibs.user_powermailfrontend_pagebrowser = EXT:powermail_frontend/lib/user_powermailfrontend_pagebrowser.php

# main settings
plugin.tx_powermailfrontend_pi1 {
        # settings for constants
        template.list = {$plugin.powermail_frontend.template.list}
        template.latest = {$plugin.powermail_frontend.template.latest}
        template.single = {$plugin.powermail_frontend.template.single}
        template.all = {$plugin.powermail_frontend.template.all}
        template.pagebrowser = {$plugin.powermail_frontend.template.pagebrowser}
        template.search = {$plugin.powermail_frontend.template.search}
        template.edit = {$plugin.powermail_frontend.template.edit}
        emptylabels.hide = {$plugin.powermail_frontend.emptylabels.hide}
        query.limit = {$plugin.powermail_frontend.query.limit}
        query.orderby = {$plugin.powermail_frontend.query.orderby}

        # Standardwrap settings for listview
        list {

                # CONSTANTS
                orderby = {$plugin.powermail_frontend.list.orderby}
                perPage = {$plugin.powermail_frontend.list.perPage}
                delta = {$plugin.powermail_frontend.list.delta}
                limit = {$plugin.powermail_frontend.list.limit}


                # Main Settings for field stdWrap
                fieldValue = CASE
                fieldValue.key.field = type
                fieldValue {
                        text = TEXT
                        text.field = value

                        textarea = TEXT
                        textarea.field = value
                        textarea.stdWrap.br = 1

                        select = TEXT
                        select.field = value

                        check = TEXT
                        check.field = value

                        radio = TEXT
                        radio.field = value

                        submit = TEXT
                        submit.field = value


                        ##### additional fields #####

                        captcha = TEXT
                        captcha.field = value

                        reset = TEXT
                        reset.field = value

                        label = TEXT
                        label.field = value

                        content = TEXT
                        content.field = value

                        html = TEXT
                        html.field = value

                        password = TEXT
                        password.field = value

                        file = TEXT
                        file {
                                field = value
                                typolink.parameter.cObject = COA
                                typolink.parameter.cObject {
                                        10 = TEXT
                                        10.value = {$plugin.powermail.upload.folder}
                                        20 = TEXT
                                        20.field = value
                                        30 = TEXT
                                        30.value = _blank
                                        30.noTrimWrap = | ||
                                }
                        }

                        hidden = TEXT
                        hidden.field = value

                        date = TEXT
                        date.field = value

                        datetime = TEXT
                        datetime.field = value

                        time = TEXT
                        time.field = value

                        button = TEXT
                        button.field = value

                        submitgraphic = TEXT
                        submitgraphic.field = value

                        countryselect = TEXT
                        countryselect.field = value

                        typoscript = TEXT
                        typoscript.field = value


                        ##### default if new field #####

                        default = TEXT
                        default.field = type
                        default.noTrimWrap = |powermail_frontend: Fieldtype | is not defined|
                }

                # example to link email (overwrites settings of fieldwrap)
                uid3333 = TEXT
                uid3333.field = uid3333
                uid3333.typolink.parameter.field = uid3333

                # example for value of second level (checkbox, radiobutton, etc...) (overwrites settings of fieldwrap)
                uid4444_0 = TEXT
                uid4444_0.field = uid4444_0
                uid4444_0.wrap = <b>|</b>

                uid4444_1 = TEXT
                uid4444_1.field = uid4444_1
                uid4444_1.wrap = <b style="color: red;">|</b>

                # example of changing a timestamp to a date format (overwrites settings of fieldwrap)
                uid5555 = TEXT
                uid5555.field = uid5555
                uid5555.strftime = %d.%m.%Y

        }

        # Standardwrap settings for latestview
        latest {
                # CONSTANTS
                orderby = {$plugin.powermail_frontend.latest.orderby}
                perPage = {$plugin.powermail_frontend.latest.perPage}
                delta = {$plugin.powermail_frontend.latest.delta}
                limit = {$plugin.powermail_frontend.latest.limit}


                # Main Settings for field stdWrap
                fieldValue < plugin.tx_powermailfrontend_pi1.list.fieldValue


                # example to link email
                uid3333 = TEXT
                uid3333.field = uid3333
                uid3333.typolink.parameter.field = uid3333

                # example for value of second level (checkbox, radiobutton, etc...)
                uid4444_0 = TEXT
                uid4444_0.field = uid4444_0
                uid4444_0.wrap = <b>|</b>

                uid4444_1 = TEXT
                uid4444_1.field = uid4444_1
                uid4444_1.wrap = <b style="color: red;">|</b>

                # example of changing a timestamp to a date format
                uid5555 = TEXT
                uid5555.field = uid5555
                uid5555.strftime = %d.%m.%Y

        }

        # Standardwrap settings for singleview
        single {

                # Main Settings for field stdWrap
                fieldValue < plugin.tx_powermailfrontend_pi1.list.fieldValue


                # example to link email
                uid3333 = TEXT
                uid3333.field = uid3333
                uid3333.typolink.parameter.field = uid3333

                # example for value of second level (checkbox, radiobutton, etc...)
                uid4444_0 = TEXT
                uid4444_0.field = uid4444_0
                uid4444_0.wrap = <b>|</b>

                uid4444_1 = TEXT
                uid4444_1.field = uid4444_1
                uid4444_1.wrap = <b style="color: red;">|</b>

                # example of changing a timestamp to a date format
                uid5555 = TEXT
                uid5555.field = uid5555
                uid5555.strftime = %d.%m.%Y

        }

        # Settings for editview
        edit {
                template.fieldWrap = {$plugin.powermail.template.fieldWrap}
                description.wrap = {$plugin.powermail.description.wrap}
                mandatory.symbol = {$plugin.powermail.mandatory.symbol}
        }


        # Pagebrowser
        pagebrowser = HMENU
        pagebrowser {
                special = userfunction
                special.userFunc = user_powermailfrontend_pagebrowser->user_pagebrowser

                1 = TMENU
                1 {
                        wrap = <ul class="powermailfrontend_pagebrowser">|</ul>
                        NO.allWrap = <li>|</li>
                        ACT = 1
                        ACT.allWrap = <li>|</li>
                        ACT.ATagParams = class="act"
                }
        }
}




        # Add Javascript files to page header if a powermail plugin is on current page
lib.powermail_dynJavascript = TEXT
lib.powermail_dynJavascript {
    wrap = <script src="|" type="text/javascript"></script>
        typolink.parameter.dataWrap = {TSFE:id},3131
    typolink.returnLast = url
}
        # userFunc to check if powermail is on current page
                # powermail is on current page and prototype should be used
[userFunc = user_powermailOnCurrentPage] && [globalVar = LIT:prototype = {$plugin.powermail.libraryToUse}]
        page.includeJS.file31312 = EXT:powermail/js/mandatoryjs/lib/prototype.js
        page.includeJS.file31313 = EXT:powermail/js/mandatoryjs/src/effects.js
        page.includeJS.file31314 = EXT:powermail/js/mandatoryjs/fabtabulous.js
[end]
                # powermail is on current page and mootools should be used
[userFunc = user_powermailOnCurrentPage] && [globalVar = LIT:mootools = {$plugin.powermail.libraryToUse}]
        page.includeJS.file31312 = EXT:powermail/js/mootools/mootools-1.2.1-packed.js
[end]
                # powermail is on current page
[userFunc = user_powermailOnCurrentPage]
        page.includeJS.file31311 = EXT:powermail/js/misc/misc.js
        page.headerData.31310 < lib.powermail_dynJavascript
        seite.headerData.31310 < page.headerData.31310
        seite.includeJS.31311 < page.includeJS.file31311
        seite.includeJS.31312 < page.includeJS.file31312
        seite.includeJS.31313 < page.includeJS.file31313
        seite.includeJS.31314 < page.includeJS.file31314
[end]

FAQ

How to add localized text to the html templates?

###POWERMAILFE_LL_ANYFIELD### can be added in any html template. Set text via typoscript

How to add typoscript (userFunc) to the html templates?

###POWERMAILFE_TS_ANYFIELD### can be added in any html template.

Edit icons are not shown, but I'm the creator of an entry?

Try to update the reference index in TYPO3 Backend

img-12

How to show images of uploaded files in frontend?

Try to have a look into the typoscript of powermail_frontend, you can change the output as you want, for every fieldtype or for a specified field.

Todos

  • XLS Export in Frontend
  • Add rss from fields
  • Add something else?

Do you need a new feature? Maybe we can help you, so just write us!

Changelog

((generated))

powermail_frontend version 0.6.x beta
Update on 14.03.2011 version 0.6.6

Bugfix: Search in second level possible now (checkbox and multiple selectbox values)

Update on 08.03.2011 version 0.6.5

Overall search field not viewable

Update on 15.02.2011 version 0.6.4

Search fields now with input and select fields

Update on 06.02.2010 version 0.6.3
  • Bugfix #3759: Enable JS validation in edit form
  • Bugfix #5399: Dateformat was wrong
  • Bugfix #6382: Linebreak in textarea output was missing
Update on 08.11.2009 version 0.6.2
  • Bugfix #5278: Checkboxes are not shown
  • Bugfix #5272: Clear markers for edit icons if not needed (in listview)
  • Feature #5281: Added a default typoscript stdWrap for the different fieldtypes
  • Feature #5226: Manual Update with hint to update ref index in FAQ
Update on 23.06.2009 version 0.6.1

Allow only own entries in frontend (only entries from created fe_user)

Update on 13.04.2009 version 0.6.0

Extended frontend editing with all fields which are available in powermail

powermail_frontend version 0.5.x beta
Update on 03.03.2009 version 0.5.0

Added Frontent-Editing of powermail entries

powermail_frontend version 0.4.x alpha
Update on 09.02.2009 version 0.4.1

Removed error warnings

Update on 23.01.2008 version 0.4.0
  • Added Detailview
  • Added Latestview
  • Added ABC Filter
  • Added Searchfields
  • Added Sorting possibility in FE
powermail_frontend version 0.3.x alpha
Update on 28.10.2008 version 0.3.1

Small bugfix in ext_typoscript_constants.txt

Update on 19.10.2008 version 0.3.0
  • Complete change of php code (to enable sorting via any uid)
  • Added hook for array manipulation
  • Enables more markers in list view (uidX, crdate, sender, senderIP, recipient, subject_r)
powermail_frontend version 0.2.x alpha
Update on 30.09.2008 version 0.2.0
  • Complete revise of list view and marker class
  • Pagebrowser added (as HMENU)
  • Every field can be changed via typoscript (show pictures, link email and domains, etc...)
  • wt_doorman for security of piVars
  • default CSS template could be integrated via static templates
powermail_frontend version 0.1.x alpha
Update on 15.05.2008 version 0.1.2

Fixed small bug in ts constants

Update on 10.05.2008 version 0.1.1

Individual markers can be used in list view (like ###UID23###)

Initial Release to TER on 09.05.2008 version 0.1.0

Powermail_frontend available in TER