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: Prowl¶
Author: | Kasper Skårhøj |
---|---|
Created: | 2002-11-01T00:32:00 |
Changed: | 2009-11-12T02:15:01 |
Classification: | prowl |
Keywords: | prowl, iphone, notification, push, messages, api, service, forEditors, forAdmins, forDevelopers, forIntermediates, forAdvanced |
Author: | Frank Nägler |
Email: | typo3@naegler.net |
Info 4: | |
Language: | en |
EXT: Prowl - prowl
EXT: Prowl¶
Extension Key: prowl
Language: en
Keywords: prowl, iphone, notification, push, messages, api, service, forEditors, forAdmins, forDevelopers, forIntermediates, forAdvanced
Copyright 2000-2008, Frank Nägler, <typo3@naegler.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.org
Table of Contents¶
`Introduction 3 <#1.1.Introduction|outline>`_
`Prowl is the Growl client for the iPhone OS. This extension provides a TYPO3 service for sending messages over the prowl API. The service make it easy for developers to integrate prowl messages in there own extension. 3 <#Prowl%20is%20the%20Growl%20client%20for%20the %20iPhone%20OS.%20This%20extension%20provides%20a%20TYPO3%20service%20 for%20sending%20messages%20over%20the%20prowl%20API.%20The%20service%2 0make%20it%20easy%20for%20developers%20to%20integrate%20prowl%20messag es%20in%20there%20own%20extension.|outline>`_
`A frontend plugin for sending messages from your website to your iPhone is also available. 3 <#A%20frontend%20plugin%20for%20sending%20 messages%20from%20your%20website%20to%20your%20iPhone%20is%20also%20av ailable.|outline>`_
`The service based on the ProwlPHP class written by Nathan Brock. Many thanks to Nathan for this class and his permission to use and publish it with this extension. http://github.com/Fenric/ProwlPHP 3 <# The%20service%20based%20on%20the%20ProwlPHP%20class%20written%20by%20N athan%20Brock.%20Many%20thanks%20to%20Nathan%20for%20this%20class%20an d%20his%20permission%20to%20use%20and%20publish%20it%20with%20this%20e xtension.%20http://github.com/Fenric/ProwlPHP|outline>`_
`Users manual 4 <#1.2.Users%20manual|outline>`_
`The extension EXT:prowl provides a TYPO3 service to send messages by the prowl API. Prowl is the Growl client for the iPhone OS. All you need to use this extension is a free prowl account (http://prowl.weks.net/) and the Prowl App for the iPhone (from the Apple App Store), and of course an iPhone ;) 4 <#The%20extension%20EXT :prowl%20provides%20a%20TYPO3%20service%20to%20send%20messages%20by%20 the%20prowl%20API.%20Prowl%20is%20the%20Growl%20client%20for%20the%20i Phone%20OS.%20All%20you%20need%20to%20use%20this%20extension%20is%20a% 20free%20prowl%20account%20(http://prowl.weks.net/)%20and%20the%20Prow l%20App%20for%20the%20iPhone%20(from%20the%20Apple%20App%20Store),%20a nd%20of%20course%20an%20iPhone%20;)|outline>`_
`The main feature of this extension is the TYPO3 service. But the extension also provides a frontend plugin, which make it possible to send message from your website directly to your iPhone. 4 <#The%20main %20feature%20of%20this%20extension%20is%20the%20TYPO3%20service.%20But %20the%20extension%20also%20provides%20a%20frontend%20plugin,%20which% 20make%20it%20possible%20to%20send%20message%20from%20your%20website%2 0directly%20to%20your%20iPhone.|outline>`_
`With the TYPO3 service developers can add prowl message support very easy to there own extensions. For the TYPO3 core, this extension use the tcemain hooks to send messages on create, update or delete any record in the TYPO3 backend, based on page TSconfig. 4 <#With%20the%20 TYPO3%20service%20developers%20can%20add%20prowl%20message%20support%2 0very%20easy%20to%20there%20own%20extensions.%20For%20the%20TYPO3%20co re,%20this%20extension%20use%20the%20tcemain%20hooks%20to%20send%20mes sages%20on%20create,%20update%20or%20delete%20any%20record%20in%20the% 20TYPO3%20backend,%20based%20on%20page%20TSconfig.|outline>`_
`Administration – Basic Setup 5 <#1.3.Administration%20%E2%80%93%20Basic%20Setup|outline>`_
`Install the extension from TER. At first you have to setup the extension directly in the ExtensionManager. The following table describe all settings. Some settings are required ([required]) for the TYPO3 service to work correctly. 5 <#Install%20the%20extension%20from% 20TER.%20At%20first%20you%20have%20to%20setup%20the%20extension%20dire ctly%20in%20the%20ExtensionManager.%20The%20following%20table%20descri be%20all%20settings.%20Some%20settings%20are%20required%20([required]) %20for%20the%20TYPO3%20service%20to%20work%20correctly.|outline>`_
`Configuration – Frontend Plugin 6 <#1.4.Configuration%20%E2%80%93%20Frontend%20Plugin|outline>`_
`This section contains the configuration options for the frontend plugin. The configuration for the TYPO3 service is described in the previous section of this documentation. 6 <#This%20section%20contains% 20the%20configuration%20options%20for%20the%20frontend%20plugin.%20The %20configuration%20for%20the%20TYPO3%20service%20is%20described%20in%2 0the%20previous%20section%20of%20this%20documentation.|outline>`_
The template file contains two subparts: ###TEMPLATE_FORM### and ###TEMPLATE_SEND###. 6
###TEMPLATE_FORM### - The main subpart which shows the form. 6
###TEMPLATE_SEND### - The subpart which is used after sending the message. 6
You can use the following marker in both subparts. 6
###FORM_ACTION### - the url for the action attribute of the form. 6
`Configuration – Backend notifications 7 <#1.5.Configuration%20%E2%80%93%20Backend%20notifications|outline>`_
`This section contains the configuration options for the backend notifications. Wrote all these settings into the page TSconfig of a page or a SysFolder. 7 <#This%20section%20contains%20the%20configurati on%20options%20for%20the%20backend%20notifications.%20Wrote%20all%20th ese%20settings%20into%20the%20page%20TSconfig%20of%20a%20page%20or%20a %20SysFolder.%20|outline>`_
`[mod.prowl.tables] 7 <#[mod.prowl.tables]|outline>`_
`Tutorial – Usage of the TYPO3 service 8 <#1.6.Tutorial%20%E2%80%93% 20Usage%20of%20the%20TYPO3%20service|outline>`_
`This tutorial shows the usage of the TYPO3 service to send messages over the Prowl API. It very simple. 8 <#This%20tutorial%20shows%20the% 20usage%20of%20the%20TYPO3%20service%20to%20send%20messages%20over%20t he%20Prowl%20API.%20It%20very%20simple.|outline>`_
`To use the prowl service in your own extension you need an instance of the service. To get this instance use TYPO3 internal functionality: 8 <#To%20use%20the%20prowl%20service%20in%20your%20own%20extension%20y ou%20need%20an%20instance%20of%20the%20service.%20To%20get%20this%20in stance%20use%20TYPO3%20internal%20functionality:|outline>`_
`$prowlAPI = t3lib_div::makeInstanceService('prowl_api'); 8 <#$pro wlAPI%20=%20t3lib_div::makeInstanceService('prowl_api');|outline>`_
`Now you can use the public service methods, for example to send a message you can call the method sendProwlMessage(): 8 <#Now%20you%20ca n%20use%20the%20public%20service%20methods,%20for%20example%20to%20sen d%20a%20message%20you%20can%20call%20the%20method%20sendProwlMessage() :|outline>`_
`$prowlAPI->sendProwlMessage($message); 8 <#$prowlAPI-%3EsendProwlMessage($message);|outline>`_
`That It! Is it easy? The following sections show all public service methods, parameters and return values. 8 <#That%20It!%20Is%20it%20easy _%20The%20following%20sections%20show%20all%20public%20service%20metho ds,%20parameters%20and%20return%20values.|outline>`_
`Known problems 9 <#1.7.Known%20problems|outline>`_
`To-Do list 10 <#1.8.To-Do%20list|outline>`_
`ChangeLog 11 <#1.9.ChangeLog|outline>`_
Introduction¶
What does it do?¶
Prowl is the Growl client for the iPhone OS. This extension provides a TYPO3 service for sending messages over the prowl API. The service make it easy for developers to integrate prowl messages in there own extension.
A frontend plugin for sending messages from your website to your iPhone is also available.
The service based on the ProwlPHP class written by Nathan Brock. Many thanks to Nathan for this class and his permission to use and publish it with this extension. http://github.com/Fenric/ProwlPHP
Screenshots¶
Users manual¶
The extension EXT:prowl provides a TYPO3 service to send messages by the prowl API. Prowl is the Growl client for the iPhone OS. All you need to use this extension is a free prowl account ( http://prowl.weks.net/ ) and the Prowl App for the iPhone (from the Apple App Store), and of course an iPhone ;)
The main feature of this extension is the TYPO3 service. But the extension also provides a frontend plugin, which make it possible to send message from your website directly to your iPhone.
With the TYPO3 service developers can add prowl message support very easy to there own extensions. For the TYPO3 core, this extension use the tcemain hooks to send messages on create, update or delete any record in the TYPO3 backend, based on page TSconfig.
Administration – Basic Setup¶
Install the extension from TER. At first you have to setup the extension directly in the ExtensionManager. The following table describe all settings. Some settings are required ([required]) for the TYPO3 service to work correctly.
apiKey¶
Property
apiKey
Data type
string
Description
[required] Up to 5 API keys separated by commas. Each API key is a 40-byte hexadecimal string. When using multiple API keys, you will only get a failure response if all API keys are not valid.
Default
providerKey¶
Property
providerKey
Data type
String
Description
Only necessary if you have been whitelisted.
Default
messageFormat¶
Property
messageFormat
Data type
String
Description
[required] Format of the message, available marker: ###MESSAGE###, ###DATE###. The marker ###MESSAGE### is necessary, it contains the text which should me send.
Default
###MESSAGE### [###DATE###]
dateFormat¶
Property
dateFormat
Data type
string
Description
Format of the ###DATE### marker, syntax like strftime
Default
%d.%m.%Y %H:%M:%S
application¶
Property
application
Data type
String
Description
the name for this application, used in the application field in request
Default
T3Prowl
event¶
Property
event
Data type
String
Description
the name for the event field in request
Default
Event
defaultPriority¶
Property
defaultPriority
Data type
String
Description
The default priority of messages
Default
Normal
verify¶
Property
verify
Data type
Boolean
Description
Verify API- and provider-key?
Default
False
useProxy¶
Property
useProxy
Data type
Boolean
Description
Use a proxy for curl request?
Default
False
proxy¶
Property
proxy
Data type
String
Description
The HTTP proxy to tunnel requests through.
Default
proxyUsername¶
Property
proxyUsername
Data type
String
Description
Username for the proxy
Default
proxyPassword¶
Property
proxyPassword
Data type
String
Description
Password for the proxy
Default
These settings are the global default settings for the service. You can overwrite all important settings later.
If you want to use the frontend plugin you have to add the static template to your main TypoScript template.
Configuration – Frontend Plugin¶
This section contains the configuration options for the frontend plugin. The configuration for the TYPO3 service is described in the previous section of this documentation.
Reference¶
The following table contains all TypoScript settings for the frontend plugin. You can overwrite some of these settings in the FlexForm of the plugin. In general: The FlexForm overwrites TypoScript and TypoScript overwrites the global default settings from the ExtensionManager.
apiKey¶
Property
apiKey
Data type
string
Description
Up to 5 API keys separated by commas. Each API key is a 40-byte hexadecimal string. When using multiple API keys, you will only get a failure response if all API keys are not valid.
Default
providerKey¶
Property
providerKey
Data type
String
Description
Only necessary if you have been whitelisted.
Default
messageFormat¶
Property
messageFormat
Data type
String
Description
Format of the message, available marker: ###MESSAGE###, ###DATE###. The marker ###MESSAGE### is necessary, it contains the text which should me send.
Default
###MESSAGE### [###DATE###]
dateFormat¶
Property
dateFormat
Data type
string
Description
Format of the ###DATE### marker, syntax like strftime
Default
%d.%m.%Y %H:%M:%S
application¶
Property
application
Data type
String
Description
the name for this application, used in the application field in request
Default
T3Prowl
event¶
Property
event
Data type
String
Description
the name for the event field in request
Default
Event
template¶
Property
template
Data type
String/fileResouce
Description
The path to the template file.
Default
EXT:prowl/res/template.html
[plugin.tx_prowl_pi1]
Template & Marker¶
The template file contains two subparts: ###TEMPLATE\_FORM###
and
###TEMPLATE\_SEND###
.
###TEMPLATE\_FORM###
- The main subpart which shows the form.###TEMPLATE\_SEND###
- The subpart which is used after sending the message.
You can use the following marker in both subparts.
###FORM\_ACTION###
- the url for the action attribute of the form.###FIELD\_PRIORITY###
- a select element for choosing the priority of the message. This marker is not required, you can remove it and the frontend plugin will use the defaultPriority.###LLL\_<KEY>###
- The LLL-marker are special dynamic marker. These marker contains the values from locallang.xml file. You can overwrite the values in the general way by TypoScript.
Screenshots¶
Configuration – Backend notifications¶
This section contains the configuration options for the backend notifications. Wrote all these settings into the page TSconfig of a page or a SysFolder.
Reference¶
The following table contains all TSconfig settings for the backend notification.
<table>¶
Property
<table>
Data type
string
Description
Any table name for which you want a notification.
Default
<table>.update¶
Property
<table>.update
Data type
Integer
Description
Set to 1 if you want to receive a notification when an element of table <table> is updated in the backend.
Default
0
<table>.update.message¶
Property
<table>.update.message
Data type
String
Description
The message which should be send. Available marker: ###TABLE###, ###STATUS###. Also you can use all fields of <table> as marker. For example: ###UID###, ###PID###, etc.
Default
record ###TABLE###_###UID### with status: ###STATUS###
<table>.new¶
Property
<table>.new
Data type
Integer
Description
Set to 1 if you want to receive a notification when an element of table <table> is created in the backend.
Default
0
<table>.new.message¶
Property
<table>.new.message
Data type
String
Description
The message which should be send. Available marker: ###TABLE###, ###STATUS###. Also you can use all fields of <table> as marker. For example: ###UID###, ###PID###, etc.
Default
record ###TABLE###_###UID### with status: ###STATUS###
<table>.delete¶
Property
<table>.delete
Data type
Integer
Description
Set to 1 if you want to receive a notification when an element of table <table> is deleted in the backend.
Default
0
<table>.delete.message¶
Property
<table>.delete.message
Data type
String/fileResouce
Description
The message which should be send. Available marker: ###TABLE###, ###STATUS###. Also you can use all fields of <table> as marker. For example: ###UID###, ###PID###, etc.
Default
record ###TABLE###_###UID### with status: ###STATUS###
[mod.prowl.tables]
Example¶
The following TSconfig sends a prowl message on update, create and delete of elements from table tt_content.
mod.prowl.tables {
tt_content {
update = 1
update.message = An element has been changed: ###HEADER### on page ###PID###
new = 1
new.message = An element has been created: ###HEADER### on page ###PID###
delete = 1
delete.message = An element was deleted: ###HEADER### on page ###PID###
}
}
Tutorial – Usage of the TYPO3 service¶
This tutorial shows the usage of the TYPO3 service to send messages over the Prowl API. It very simple.
To use the prowl service in your own extension you need an instance of the service. To get this instance use TYPO3 internal functionality:
$prowlAPI = t3lib_div::makeInstanceService('prowl_api');
Now you can use the public service methods, for example to send a message you can call the method sendProwlMessage():
$prowlAPI->sendProwlMessage($message);
That It! Is it easy? The following sections show all public service methods, parameters and return values.
((generated))¶
sendProwlMessage¶
sendProwlMessage($message, $priority = null, $application = '', $event = '', $apiKey = '', $providerKey = '', $is_post = false)
$message¶
Parameter
$message
Data type
String
Description
[required] The message which should be send by the Prowl API
Default
$priority¶
Parameter
$priority
Data type
Integer
Description
The priority for the message: -2,-1,0,1,2 use class constants!:tx_prowl_api::PRIORITY_VERY_LOW
tx_prowl_api::PRIORITY_MODERATE
tx_prowl_api::PRIORITY_NORMAL
tx_prowl_api::PRIORITY_HIGH
tx_prowl_api::PRIORITY_EMERGENCY
Default
Null
$application¶
Parameter
$application
Data type
String
Description
The name of your application or the application generating the event.
Default
The default value will be get from global default configuration
$event¶
Parameter
$event
Data type
String
Description
The name of the event or subject of the notification.
Default
The default value will be get from global default configuration
$apiKey¶
Parameter
$apiKey
Data type
String
Description
The API key which should be used. Up to 5 API keys separated by commas. Each API key is a 40-byte hexadecimal string.When using multiple API keys, you will only get a failure response if all API keys are not valid.
Default
The default value will be get from global default configuration
$providerKey¶
Parameter
$providerKey
Data type
String
Description
Your provider API key. Only necessary if you have been whitelisted.
Default
The default value will be get from global default configuration
Return:¶
Parameter
Return:
Data type
Boolean
Description
Returns true if message could be send, else false
Default
getError¶
getError($code=null)
$code¶
Parameter
$code
Data type
Integer
Description
The error code
Default
Return:¶
Parameter
Return:
Data type
Mixed
Description
String or Boolean if error code not defined
Default
Known problems¶
Currently there are no known issues. If you find a bug or have ideas for improvements or new features please create a new issue ticket on forge: http://forge.typo3.org/projects/extension-prowl/issues
To-Do list¶
Currently there are no planned issues. If you have ideas for improvements or new features please create a new issue ticket on forge: http://forge.typo3.org/projects/extension-prowl/issues
If you think, there are some extensions which should use prowl notifications, contact the author of the extension first and ask for supporting prowl notifications. If the author will not support prowl notifications, feel free to create a new issue ticket on forge, maybe I can help you with an new extension.
ChangeLog¶
2009-11-12 Frank Nägler <typo3@naegler.net>
create documentation for this extension
2009-11-11 Frank Nägler <typo3@naegler.net>
- add TSConfig for t3lib_tcemain hooks
- implement hooks for t3lib_tcemain to catch events: new, update and delete
2009-11-08 Frank Nägler <typo3@naegler.net>
- implement pi1 as first simple usage example for the prowl service
- added some configuration options for extMgm, TypoScript and FlexForm
2009-11-06 Frank Nägler <typo3@naegler.net>
- initial code generated with kickstarter
- implement T3Service for Prowl messages
11