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: Send-A-Card¶
Author: | Stanislas Rolland |
---|---|
Created: | 2009-02-17T10:51:40 |
Changed by: | Stanislas Rolland |
Changed: | 2014-10-20T13:16:40.800000000 |
Email: | typo3(arobas)sjbr.ca |
Info 2: | Stanislas Rolland |
Info 3: | |
Info 4: |
EXT: Send-A-Card
Extension Key: sr_sendcard
Copyright 2005-2014, Stanislas Rolland, <typo3(arobas)sjbr.ca>
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
((generated))¶
Table of Contents¶
Introduction 2
What does it do? 2
What's new in version 3 2
Requirements 2
Credits 2
Sponsors 3
Users manual 4
Getting Started 4
Creating Postcards 4
Multiple series of cards 5
Multilingual sites 5
Plugin Usage Statistics 5
Administration 6
Frontend and email rendering 6
HTML Template 6
CSS Styles 6
CSS Styles for HTML Emails 6
HTML Template Markers 6
Localization 7
Adapting labels 7
Customizing the Email messages 7
Backend User Administration 7
Granting Access to Plugin Usage Statistics 7
User TSConfig 7
Database Clean Up 7
Configuration 9
Configuration steps 9
TypoScript Reference 9
Configuration FAQ 12
Simplifying the card form 12
Enabling multiple cards series in one content element 12
Using the graphical message feature 13
Branding the postcard 13
Using frames 13
To-Do List 14
Change Log 15
Introduction¶
What does it do?¶
The Send-A-Card extension offers electronic postcard delivery:
- the card sender selects a postcard image, QuickTime video clip or Flash clip from a display of thumbnails, completes a form to specify postcard information, format and card delivery date;
- the card sender previews the card and sends it; if a future card delivery date is specified, card delivery will be delayed until the specified date (the card will be sent by a scheduler task);
- when the “card is sent”, the recipient receives an email message with a link to the card; clicking on the link, the recipient can view the card; the card may include a link to a print-friendly version;
- when the recipient views the card, the sender may be notified by email (if so requested at send time).
The Send-A-Card extension features include:
- graphical message: card text displayed with any TrueType font;
- postcard image “branding”: your logo superimposed over the image;
- handling multiple series of cards;
- multilingual site support, including Japanese;
- HTML emails;
- a back end module that displays some plugin usage statistics;
- DBAL compliance;
- TYPO3 scheduler integration;
- CSS-styled XHTML 1.0 Strict template;
- integration with the freeCap CAPTCHA (sr_freeCap) extension in order to avoid abuse;
- switching salutation mode.
You can see an example of the use of this extension on this page: http://www.lamatatena.org/en/tarjetas.html
What's new in version 3¶
- Always use utf-8 character set as default character set.
- Use TYPO3 Swift Mailer API.
- Use TYPO3 scheduler task to mail deferred cards.
Requirements¶
Version 3.2+ of the extension requires TYPO3 6.2+.
Version 3.0+ of the extension requires TYPO3 4.5+.
ImageMagick must be available in the TYPO3 configuration for the extension to operate properly.
The graphical message feature requires PHP to be compiled with ttf support.
Credits¶
The general idea of this plugin is based on sendcard 3.2.0 < http://www.sendcard.org > authored by Peter Bowyer. The plugin is a complete remake within the Typo3 framework, leaving little resemblance with the code of the original script that inspired it. Yet, this plugin is made available in the Typo3 public online extension repository with the permission and agreement of Peter Bowyer.
Thanks to Martin Kutschker for his numerous helpful corrections, suggestions and improvements.
Thanks to Jörg Schaller http://www.jorgo.org and again to Martin for helping me understand the charsets and translations issues.
Many thanks to Chie Hiraki for the Japanese translation!
This extension incorporates a script borrowed from extension Salutation Switcher (salutationswitcher) authored by Oliver Klee to allow to set formal or informal salutation mode.
Sponsors¶
You may sponsor further development of this extension by sending your contribution to stanislas.rolland@sjbr.ca through moneybookers.com or PayPal , or by contacting the author .
Users manual¶
Getting Started¶
First, the extension needs to be installed and configured: see the Configuration section.
Second, the HTML template needs to be tailored to your site: see the Administration section.
After these two steps, a card selection page will have been defined and the Send-A-Card plugin will have been inserted in an element of this page. This is the page that the card sender will use, in the front end, to select a postcard.
Creating Postcards¶
Now, you need to provide cards that can be sent.
In order to do this, you could position yourself on the card selection page in the page tree of your site, and insert on it a new record of type “Postcard”. However, we suggest instead that you first create a Sysfolder, give a meaningful name to this Sysfolder corresponding to your set of cards, and insert your cards in that Sysfolder.
In any case, on selecting record type “Postcard”, you should get a window like the following:
- Give a title to your card. It will serve as a caption displayed under the image of the card.
- Select or upload an image, a QuickTime clip or a Flash animation for inclusion on the postcard.
- You may specify the dimensions of the image as you want it displayed on the postcard. If you selected a QuickTime movie clip or a Flash animation, then this is required .
- If you selected a QuickTime movie clip or a Flash animation, select or upload an alternative image that will be used on the card image selection page (you do not want to start all the clips and animations on this same page!). It will also be used on the printer-friendly page in place of the movie clip or animation.
- You may specify the dimensions of the alternative image as you want it displayed on the printer-friendly version of the postcard.
- Finally, you may include a link to a page of your site. If you do, then the title or caption of the image will include a link to that page.
On the card selection page, edit the Postcards Insert plugin element and add your Sysfolder in the Startingpoint field.
Cards may now be selected and sent from the front end.
You can add further images and clips for the visitors to choose from.
Multiple series of cards¶
You may want to offer a selection among multiple series or bundles of cards. There are two ways of doing this.
One way to present multiple series of cards on the card selection page is to present them in as many content elements. This is done as follows:
- create a Sysfolder for each cards series, and insert the cards in each Sysfolder;
- on the card selection page, insert the Postcards plugin in as many content elements as you have cards series to present;
- on each plugin insert, add one of your card series Sysfolders in the field Startingpoint;
- create another page (if not done at configuration time) on which the card form will be presented; this page must be identified in the TS template with the setting: formPID = your_page_id ; note that if the property formPID is not set, the form will be displayed on the card selection page and it will be displayed as many times as the plugin is inserted on that page!
Another way to present multiple series of cards is to present them is a single content element. This is done as follows:
- you must first ensure that this feature is enabled through the TS template setting enableAlternateSelectionTemplate = 1 (see Configuration section);
- create a Sysfolder for each cards series, and insert the cards in each Sysfolder; the title of the Sysfolder will be the title of the series;
- on a single “Insert plugin” element of the card selection page, add each of the Sysfolders in the field Startingpoint (the field may contain many);
- the cards series will be presented, preceded by their titles, as a single content element.
When the second way is enabled (enableAlternateSelectionTemplate = 1), you can combine both methods on the selection page!
Multilingual sites¶
The Send-A-Card extension should behave correctly in a one-tree multilingual site. In particular, the link to the postcard included in the the email should link back to the site in the language of the sender.
The title of a card series contained in a Sysfolder may be translated by creating a record of type Alternative Page Language in the Sysfolder.
Once an alternative page language record has been created in the Sysfolder, you can translate each card of the series. This is done the same way you translate content elements.
Plugin Usage Statistics¶
The Send-A-Card extension includes a back end module that displays statistics about the most frequently and most recently sent cards. The module is accessible in the Web section of the back end menu to back end users and groups that have been granted access to it.
Administration¶
Frontend and email rendering¶
HTML Template¶
The Send-A-Card plugin uses up to 5 pages that are created at configuration time:
- one page on which the card sender will select the image of the card;
- one page on which the card sender will specify the look and contents of the card;
- one page on which the card sender will preview and send the card;
- one page on which the recipient will view her card;
- one print-friendly page from which the recipient can print her card.
The look and feel of these pages is determined by the HTML template associated with the plugin. Each page has its own subpart. There are also subparts for the email messages to the recipient and to the sender.
The default template is specified in the static template Send-A-Card CSS-styled . Do not delete any HTML tag containing hidden or submit <INPUT> tags.
CSS Styles¶
Default CSS styles are defined in the default TS template setup.
As usual, the default CSS styles may be modified and moved to a .css file. In such a case , the location of the file should be specified by an import rule overriding the default TS template setup:
plugin.tx_srsendcard_pi1._CSS_DEFAULT_STYLE = @import url("fileadmin/styles/some_style_sheet_file.css");
Alternatively, the selectors may be moved to some site-wide style sheet file and the default styles may be nullified:
plugin.tx_srsendcard_pi1._CSS_DEFAULT_STYLE >
Some elements of the card itself are styled by the selector .tx- srsendcard-pi1-card . Some styles associated with this selector are defined within in-line <style> tags in the HTML template, because some of the properties are determined by HTML template markers.
CSS Styles for HTML Emails¶
An inline CSS style sheet may be included in the HTML version of emails (within the <head></head> tags). The style sheet to be included is taken for a .css file specified by the HTMLMailCSS TS template constant.
HTML Template Markers¶
Global markers:
###CHARSET### = config.metaCharset or utf-8.
Main subparts markers:
- ###TEMPLATE_SELECTION_PAGE### : template used to display the initial card selection; this subpart is used if enableAlternateSelectionTemplate = 0 in TS template.
- ###TEMPLATE_ALTERNATE_SELECTION_PAGE### : template used to display the initial card selection when multiple cards series are to be displayed in the same content element; this subpart is used if enableAlternateSelectionTemplate = 1 in TS template.
- ###TEMPLATE_CARD_FORM### : template used to display the card creation form.
- ###IMG_INSERT### : template for the simple image insert.
- ###QUICKTIME_INSERT### : template for the QuickTime movie insert.
- ###SHOCKWAVE_INSERT### : template for the Flash animation insert.
- ###TEMPLATE_PREVIEW_CARD### : template used to preview the card.
- ###IMG_INSERT### : template for the simple image insert.
- ###QUICKTIME_INSERT### : template for the QuickTime movie insert.
- ###SHOCKWAVE_INSERT### : template for the Flash animation insert.
- ###MUSIC_INSERT### : template for the music insert.
- ###CAPTCHA_INSERT### : template for the optional CAPTCHA insert.
- ###TEMPLATE_CARD_SENT### : template used to confirm that the card was sent.
- ###TEMPLATE_VIEW_CARD### : template used to view the card.
- ###IMG_INSERT### : template for the simple image insert.
- ###QUICKTIME_INSERT### : template for the QuickTime movie insert.
- ###SHOCKWAVE_INSERT### : template for the Flash animation insert.
- ###MUSIC_INSERT### : template for the music insert.
- ###TEMPLATE_PRINT_CARD### : template used for the print version of the card.
- ###IMG_INSERT### : template for the simple image insert.
- ###TEMPLATE_CARD_NOT_FOUND### : template used to display an error message when the card is no longer available.
- ###TEMPLATE_EMAIL_CARD_SENT### : template used for the email message sent to the card recipient.
- ###TEMPLATE_EMAIL_CARD_SENT_HTML### : template used for the HTML version of the email message sent to the card recipient.
- ###TEMPLATE_EMAIL_VIEWED### : template used for the email message sent to the card sender when the card is viewed by the recipient.
- ###TEMPLATE_EMAIL_VIEWED_HTML### : template used for the HTML version of the email message sent to the card sender when the card is viewed by the recipient.
Localization¶
Adapting labels¶
You may adapt to your needs and languages the labels displayed in the front end.
Any label can be overridden by inserting the appropriate assignment in your TS template setup:
plugin.tx_srsendcard_pi1._LOCAL_LANG. languageCode.labelName = overridingValue
You can find the name of the label you want to modify (or translate) by inspecting the extension file pi1/locallang.xml.
You may also modify the salutation mode used in these labels when this is relevant for the language being used. See the TypoScript Reference section.
Customizing the Email messages¶
In the example HTML templates, the email messages use HTML markers whose values are taken from labels with identical names in the pi1/locallang.xml file. The labels are prefixed with email_ (and the corresponding HTML markers are prefixed with EMAIL_ ).
Since the values are taken from pi1/locallang.xml, they can vary depending on the language currently in use.
They may also be overridden, in any language, with the same technique as described in section Localization of this document.
Backend User Administration¶
Granting Access to Plugin Usage Statistics¶
The Send-A-Card extension includes a back end module that displays plugin usage statistics. You may want to grant access to this module to specific back end users or groups. It will appear in the Web section of their back end menu.
User TSConfig¶
Back end users or group of users that are granted the access rights to create records of type Postcard should have the following lines in their User TSConfig:
setup.default.edit_docModuleUpload = 0
setup.override.edit_docModuleUpload = 0
If they do not, the Postcard Image field of the Postcard form will display an upload field that does not behave correctly (for some reason unknown to me).
Database Clean Up¶
The plugin configuration setup defines a date: oldDay/oldMonth/oldYear. All postcards sent before that date will be marked as 'deleted'. You may wish to change this date from time to time.
Configuration¶
Configuration steps¶
These are the steps to configuring the Send-A-Card plugin:
Install the extension using the Extension Manager.
Add the following static template to your TypoScript template: 'Send-A-Card CSS-styled'
Create a page on which the plugin will be inserted and where the card sender will select, create and send its card; do the same for the page where the recipient will view her card (you could use the same page), and optionally, add a page on which the plugin will be inserted and from which the card recipient will be able to print the card; on each of these 3 pages, create a content element of type “Plugin insert”, and insert the plugin 'Postcards'; set the TS template properties createPID, viewPID and printPID to the page id's of the pages you created.
If you wish to be able to include multiple cards series in different content elements on the selection page, then create a form filling page, create a content element of type “Plugin insert“ on it, and insert the plugin 'Postcards'; set the TS template property formPID = your_page_id .
You may also create a preview page; if you do, create a content element of type “Plugin insert“ on it, and insert the plugin 'Postcards'; set the TS template property previewPID = your_page_id .
Create a directory where you will store your music files. You may want to copy in this directory the example files included in the extension directory.
Use the TYPO3 Scheduler extension to schedule the task “Send-A-Card: Send deferred cards “. The task may be set to be executed every hour or every day. If you disable the date selection option (disableSendDate = 1) of the plugin TS configuration, then you do not need to schedule this task. The task configuration requires to specify the page id on which the card will be presented to the recipient.
Review the plugin properties described below. All these properties may be conveniently edited using the Constant Editor TS template tool. Make sure you set correctly:
- file.templateFile: the location of your HTML template;
- dir: the directory where postcard images will be stored by the plugin; by default: uploads/tx_srsendcard, created during installation of the extension;
- musicDir: directory where you will store music files;
- cardMusicFiles: list of music file names; must be the same length (and same order!) as the length of the list card_music_labels in pi1/locallang.xml (maybe overridden in TS setup, see Localization);
- createPID, formPID, previewPID, viewPID and printPID: the page id's where the plugin will be inserted, and corresponding createType, formType, previewType, viewType and printType;
- cardFontfaces: if you override the default list, make sure to modify correspondingly the property fontface_labels in pi1/locallang.xml by overriding it in your TS setup (see Localization);
- enableAlternateSelectionTemplate: set to 1, if you want to enable the possibility of displaying multiple cards series within the same content element (same plugin insert).
TypoScript Reference¶
file.templateFile¶
Property
file.templateFile
Data type
fileResource
Description
File name of the HTML template
Default
EXT:sr_sendcard/pi1/tx_srsendcard_xhtml.tmpl
enableHTMLMail¶
Property
enableHTMLMail
Data type
boolean
Description
If set, emails sent to the card recipient and card sender will be sent in HTML format.
Default
0
HTMLMailCSS¶
Property
HTMLMailCSS
Data type
fileResource
Description
Name of the file containing the CSS style sheet for the HTML mails.
Default
EXT:sr_sendcard/pi1/tx_srsendcard_htmlmail.css
forceBase64Encoding¶
Property
forceBase64Encoding
Data type
boolean
Description
If set, HTML emails will be base64-encoded. The default encoding of HTML email messages is quoted-printable.
Default
0
siteEmail¶
Property
siteEmail
Data type
string
Description
Email address of the card sending site. All mails originate form this email address.
May be used as ###SITE_EMAIL### in email templates.
If wrong domain, Swift Mailer may raise an exception.
Default
siteName¶
Property
siteName
Data type
string
Description
Name of the card sending site. All mails originate form this sender name.
May be used as ###SITE_NAME### in email templates.
Default
My Typo3 Site
dir¶
Property
dir
Data type
dir
Description
Directory in which the postcard images will be stored
Note: typo3temp is not used (starting with version 0.7.3), so that typo3temp directory may be cleared with the Typo3 Install tool without loosing the images of some active cards. Beware however not to delete them with the Check Typo3 Upload Folder extension!
Default
uploads/tx_srsendcard
musicDir¶
Property
musicDir
Data type
dir
Description
Directory in which the music files are stored
Default
EXT:sr_sendcard/music
cardMusicFiles¶
Property
cardMusicFiles
Data type
string
Description
Comma(,)-separated list of music file names from which the card sender can choose
Note: The list of music labels in pi1/locallang.xml should be at least as long as this list.
Default
,autumnleaves.mid, OverTheRainbow.mid, Pomp_and_Circumstance.mid
disableMusic¶
Property
disableMusic
Data type
boolean
Description
If set to 1, the music selection drop-drown box will not be shown.
Default
0
maxCol¶
Property
maxCol
Data type
int
Description
Number of columns when displaying the thumbnails from which the card sender will select the postcard image
Default
2
imageSmallWidth¶
Property
imageSmallWidth
Data type
int
Description
Width to which the images are reduced when presenting the thumbnails
Default
100
imageSmallHeight¶
Property
imageSmallHeight
Data type
int
Description
Height to which the images are reduced when presenting the thumbnails
Default
100
imageBigWidth¶
Property
imageBigWidth
Data type
int
Description
Width to which the images are reduced when viewing the postcard
Default
300
imageBigHeight¶
Property
imageBigHeight
Data type
int
Description
Height to which the images are reduced when viewing the postcard
Default
300
logo¶
Property
logo
Data type
imgResource
Description
Image file name of the logo to be used to "brand" the postcard image
Default
None
logoAlignHor¶
Property
logoAlignHor
Data type
string
Description
Horizontal alignment of the logo over the postcard image
Possible values: left, right
Default
right
logoAlignVert¶
Property
logoAlignVert
Data type
string
Description
Vertical alignment of the logo over the postcard image
Possible values: top, bottom
Default
bottom
disableImageScaling¶
Property
disableImageScaling
Data type
boolean
Description
If set to 1, postcard image scaling is disabled. Postcard image branding is also disabled.
Default
0
useAlternateImageOnPrint¶
Property
useAlternateImageOnPrint
Data type
boolean
Description
Use alternate image on print version: If set, if an alternate image exists, it will be used on the print version of the card, even if the main image is a still image.
Default
0
createPID¶
Property
createPID
Data type
page_id
Description
Page id of a page (on which the plugin is inserted) on which the card selection will be displayed for the card sender to select an image
Note: if not set, will default to current page id. However, if one of the other PID's is set, then do not leave this one to default.
Note: the plugin could be inserted more than once on this page in order to display multiple cards series. In such a case, formPID should be set to a different page id.
Default
None
createType¶
Property
createType
Data type
int
Description
Type of page of createPID
Note: if not set, will default to current page type.
Default
None
formPID¶
Property
formPID
Data type
page_id
Description
Page id of a page (on which the plugin is inserted) on which the the card form will de displayed and on which the card sender will enter the card information and options
Note: if not set, will default to current page id.
Default
None
formType¶
Property
formType
Data type
int
Description
Type of page of createPID
Note: if not set, will default to current page type.
Default
None
previewPID¶
Property
previewPID
Data type
page_id
Description
Page id of a page (on which the plugin is inserted) where the card sender will preview the card
Note: if not set, will default to current page id.
Default
None
previewType¶
Property
previewType
Data type
int
Description
Type of page of createPID
Note: if not set, will default to current page type.
Default
None
useCAPTCHA¶
Property
useCAPTCHA
Data type
boolean
Description
Use CAPTCHA string input: If set, and is extension freeCap CAPTCHA (sr_freecap) is installed, CAPTCHA image and input fields will be inserted on the preview form.
Default
1
viewPID¶
Property
viewPID
Data type
page_id
Description
Page id of the page (on which the plugin is inserted) where the card recipient will view the card
Note: if not set, will default to current page id.
Default
None
viewType¶
Property
viewType
Data type
int
Description
Type of page of viewPID
Default
0
printPID¶
Property
printPID
Data type
page_id
Description
Page id of the printer-friendly page (on which the plugin is inserted) from which the card recipient can print the card
Note: if not set, will default to current page id.
Default
None
printType¶
Property
printType
Data type
int
Description
Type of page of printPID
Default
98
printIcon¶
Property
printIcon
Data type
imgResource
Description
A print icon presented when viewing the card. Used in the default HTML template..
Default
EXT:sr_sendcard/pi1/imprimir.gif
printWindowParams¶
Property
printWindowParams
Data type
string
Description
Card printing window parameters: Parameters for the print page popup window.
Default
resizable=yes, toolbar=yes, scrollbars=yes, menubar=yes, width=800, height=600
cardStamp¶
Property
cardStamp
Data type
imgResource
Description
A stamp image file presented when previewing and when viewing the card. Used in the default HTML template.
Default
EXT:sr_sendcard/pi1/sello-la-matatena100x61.jpg
enableAlternateSelectionTemplate¶
Property
enableAlternateSelectionTemplate
Data type
boolean
Description
This property enables the alternate selection page template allowing multiple card series to be displayed in a single content element (single plugin insert)
Default
0
oldDay¶
Property
oldDay
Data type
int
Description
Cards created before the date: oldDay/oldMonth/oldYear will be marked 'deleted'
Default
9
oldMonth¶
Property
oldMonth
Data type
int
Description
Cards created before the date: oldDay/oldMonth/oldYear will be marked 'deleted'
Default
9
oldYear¶
Property
oldYear
Data type
int
Description
Cards created before the date: oldDay/oldMonth/oldYear will be marked 'deleted'
Default
2005
locale_all¶
Property
locale_all
Data type
string
Description
See config.locale_all in TSRef.
Must be in format such as en_GB . Expression like 'italian' will not work here (do not know why).
Default
en_GB
date_stdWrap¶
Property
date_stdWrap
Data type
strftime-conf
Description
Format of the date and time on the email notification message to the sender when the card is viewed
Default
%e de %B de %Y a las %H:%M hrs
disableSendDate¶
Property
disableSendDate
Data type
boolean
Description
If disableSendDate is set to 1, then the card sending date selector will not be displayed in the card creation form and the card sender will not be able to delay the delivery of the card
Default
0
cardBgcolors¶
Property
cardBgcolors
Data type
string
Description
Comma(,)-separated list of background colors from which the card sender can choose
Default
,#FFFFCC,#CCFFCC,#333399,#CC0000,#333333
disableBgcolors¶
Property
disableBgcolors
Data type
boolean
Description
If disableBgcolors is set to 1, then the background color selector will not be displayed in the card creation form
Default
0
cardFontcolors¶
Property
cardFontcolors
Data type
string
Description
Comma(,)-separated list of font colors from which the card sender can choose
Default
#000000,#660066,#333333,#006699,#006600,#660000
disableFontcolors¶
Property
disableFontcolors
Data type
boolean
Description
If disableFontcolors is set to 1, then the font color selector will not be displayed in the card creation form
Default
0
cardFontfaces¶
Property
cardFontfaces
Data type
string
Description
Semi-colon(;)-separated list of font face lists from which the card sender can choose
!!!Must be the same length as the list of font face labels in pi1/locallang.xml!!
Default
Verdana, Arial, sans-serif; Comic Sans MS, Verdana, sans-serif; Arial, Helvetica, sans-serif; Georgia, Times New Roman, Times, serif
disableFontfaces¶
Property
disableFontfaces
Data type
boolean
Description
If disableFontfaces is set to 1, then the font color selector will not be displayed in the card creation form, except if graphicMess = 1
Note: if graphicMess is set to 1, then this property is ignored.
Default
0
disableCardOptions¶
Property
disableCardOptions
Data type
boolean
Description
If disableCardOptions is set to 1, then all font, color and music options will be removed in the card creation form, except if graphicMess = 1
Note: if graphicMess is set to 1, then this property is ignored.
Default
0
graphicMess¶
Property
graphicMess
Data type
boolean
Description
Enables the feature whereby the card message will be rendered over a generated image rather than as ordinary text
Default
0
graphicMessWidth¶
Property
graphicMessWidth
Data type
int
Description
Width in pixels of the generated image over which the card message will be rendered.
Note: Ignored unless graphicMess = 1.
Default
400
graphicMessFontFiles¶
Property
graphicMessFontFiles
Data type
string
Description
Comma(,)-separated list of font files from which the card sender can choose
Note: The list fontfile_labels in pi1/locallang.xml should at least as long as this list.
Note: Ignored unless graphicMess = 1.
Default
ninos.ttf,koala.ttf
graphicMessFontSizes¶
Property
graphicMessFontSizes
Data type
string
Description
Comma(,)-separated list of font sizes of font sizes to be used with each of the font files specified by property graphicMessFontFiles
Note: Should be the same lenght as the list of font files.
Note: Ignored unless graphicMess = 1.
Default
14,22
useGraphicalMessageEvenOnCardPrint¶
Property
useGraphicalMessageEvenOnCardPrint
Data type
boolean
Description
If useGraphicalMessageEvenOnCardPrint is set to 1 (while graphicMess is enabled), the graphical message will be used even on the print version of the card.
Note: Ignored unless graphicMess = 1.
Default
0
fontDir¶
Property
fontDir
Data type
string
Description
Directory in which the font files are stored
Note: Ignored unless graphicMess = 1.
Default
EXT:sr_sendcard/fonts
cardPresentationOrder¶
Property
cardPresentationOrder
Data type
string
Description
Order of presentation of the cards in each card series. Possible values:
alphabetical: the cards will be sorted in alphabetical order,
manual: the cards will be sorted according to the manual back end order.
Default
alphabetical
salutation¶
Property
salutation
Data type
string
Description
If set, should be either 'formal' or 'informal'.
Note: This property will change the salutation mode used in the labels displayed in the front end, provided that this is meaningful in the language being displayed and that translators have provided the informal version.
Default
None
Configuration FAQ¶
Simplifying the card form¶
You may simplify the card form and reduce the number of options presented to the card sender by setting the following properties:
- disableMusic: the music selection section of the form will not be erased;
- disableSendDate: the date selection section will be erased;
- disableBgcolors: the background color selection section will be erased;
- disableFontcolors: the font color selection section will be erased;
- disableFontfaces: the font face selection section will be erased, unless the graphical message feature is enabled (see below);
- disableCardOptions: all the above sections will be erased, unless the graphical message feature is enabled (see below).
Enabling multiple cards series in one content element¶
On the card selection page (createPID), it is possible to display multiple cards series to select from within a single content element (single plugin insert). However, you need to enable the feature in your TS template with the setting:
enableAlternateSelectionTemplate = 1.
When this feature is enabled, then a backend user can insert multiple card series in the following manner:
- create a Sysfolder for each cards series, and insert the cards in each Sysfolder; the title of the Sysfolder will be the title of the series;
- on “Insert plugin” element of the card selection page, add each of the Sysfolders in the field Startingpoint.
Using the graphical message feature¶
When this feature is enabled, the card message is rendered as an image rather than as ordinary text. The print version is not affected.
Set the property graphicMess to 1;
Set the relevant plugin properties to your convenience in your TS template. Make sure you set correctly:
- fontDir: directory where you will store font files;
- graphicMessFontFiles: list of font file names; should be the same length (and same order!) as the length of the list fontfile_labels in pi1/locallang.xml;
- graphicMessFontSizes: the font sizes are matched with the corresponding font files specified in the list graphicMessFontFiles.
Branding the postcard¶
A branding logo may be superimposed over the image of the postcard using the TS template property logo . The properties logoAlignHor and logoAlignVert will determine the position of the logo relative to the sides of the postcard image: top or bottom, left or right.
Using frames¶
If your card viewing page (viewPID) is designed to be displayed within frames and you have set config.frameReloadIfNotInFrameset=1, then you may need to add the following lines to your TS template setup:
[globalVar = TSFE:id = {$plugin.tx_srsendcard_pi1.viewPID} ]
config.linkVars >
config.linkVars = tx_srsendcard_pi1
config.no_cache = 1
[global]
after setting plugin.tx_srsendcard_pi1.viewPID in your TS template constants.
To-Do List¶
A number of useful features could be added to this extension. Some of these features are listed below. If you have developed such enhancements and would like them to be integrated to the base extension, or if you would be interested in sponsoring any such enhancements, please contact the author .
Possible feature enhancements:
Send a card to members of a distribution list.
Add a Web->Functions tool to ease the creation of multiple cards.
Add an option for the visitor to upload his(her) own image.
Add a method for other extension to link to the card sending form.
Change Log¶
See: http://forge.typo3.org/projects/extension- sr_sendcard/repository/entry/trunk/ChangeLog
EXT: Send-A-Card - 15