Configuration¶
- Technical information; Installation, Reference of TypoScript, configuration options on system level, how to extend it, the technical details, how to debug it.
- language should be technical, assuming developer knowledge of TYPO3. Small examples/visuals are always encouraged.
- Target group: Developers
Knowledge of Extbase/Fluid framework would be helpful to understand how to configure this extension.
FAQ¶
TBD
Installation¶
- Install this extension as usual
- Do all updates on the database as suggested by the extension manager.
There are 4 tables that are updated with some default entries. - Include the template of this extension
- Open the TS Constant Editor and at least set the option "FE Users and Groups [pid]".
This id should link to the website users container page of you website. - If you like to see the examples:
Make sure that two website entries exist having uid 1 and 2. - Update the configuration of jQuery extension
- Open Module "T3 jQuery" in BE Admint Tools
- Choose "Process an Analyze t3jquery.txt in extensions
- Select extension "th_rating"
- Press "Check"
- Pres "Merge and Use"
Reference¶
The basic configuration to use this extension as a cObj in your TSConfig or in your own extension is already done within the default template. The only changes are necessary if you like to alter the usage type (MVC-Action).
| Property: | Data type: | Description: | Default: |
|---|---|---|---|
action |
String | MVC-Action to activated. Possible values:- ratinglinks graphical presentation to do and to display ratings - show display the actual vote of the currently logged on FE user in plain text - new generate a classic form element (default: drop-drown select field) for voting. If the user has already voted action 'show' is used. Important Whatever value is configured here it must also be set in
plugin.tx_thrating.switchableControllerActions {
Vote {
1 = ratinglinks
#1 = show
#1 = new
}
} |
ratinglinks |
[tsref:plugin.tx_thrating]
Section: ratings¶
Each rating could have a special graphical configuration. Use this section to configure it.
The configurations a seperated into subsections identified by a distinct name.
| Property: | Data type: | Description: | Default: |
|---|---|---|---|
imagefile |
String | Imagename of the graphical representation including path Path could be given either absolute as an URI (e.g. http://www.site.com/image.gif) or relative to SITE_ROOT (e.g. typo3conf/ext/th_rating/Resources/Public/Css/stars.gif) |
|
barimage |
boolean | Sets the imagetype to bar- or starrating | 0 |
tilt |
boolean | If set the imagetype is up/down | 0 |
[tsref:plugin.tx_thrating.ratings.{name}]
Example
Here an example which is also included in one of the defaults configurations:
plugin.tx_thrating.ratings {
#use this section to configure your own graphics
barrating {
imagefile = typo3conf/ext/th_rating/Resources/Public/Css/rating_bar.png
barimage = 1
tilt = 0
}
}
Graphics requirements:
The graphic contains icons or stripes for all states:- not rated (e.g.
)
- rated (e.g.
)
- choose rating (e.g.
)
It is recommended to choose icons of identical dimensions.
These icons must be arranged in one file depending on the imagetype in a manner as follows:
| Classic starrating | Tilt starrating | Barrating | Tilt barrating |
|---|---|---|---|
stars |
starsTilt |
barrating |
facesbartilt |
The table shows all preconfigured rating configuration and their names.
All icons (except those of the type barrating) are taken from http://openiconlibrary.sourceforge.net/. This site showed all icons licensed by GPL2. I appreciate the great work of these authors Anyway, if the usage of any icon hits the copyright of any person I´d ask this person to drop me a mail if he/she want me to remove it.
Section: settings¶
Each rating could have a special graphical configuration. Use this section to configure it.
The configurations a seperated into subsections identified by a distinct name.
| Property: | Data type: | Description: | Default: |
|---|---|---|---|
display |
string | Name of the rating configuration to use as set per default of is the section 'ratings' |
stars |
ratetable |
string | Tablename of the ratingobject | tt_content |
ratefield |
string | Tablename of the ratingobject | uid |
ratingobject |
integer | UID of the ratingobject. Could be helpful to increase performance instead of using ratetable/ratefield combination. |
|
ratedobjectuid |
integer | UID of the rated row in the table | |
mapAnonymous |
integer | UID of the FE user that holds all anonymous votings | 0 |
[tsref:plugin.tx_thrating.settings]
Example
Here an example which is also included in one of the defaults configurations:
plugin.tx_thrating.settings {
ratetable = tt_content
ratefield = uid
#ratingobject = 1
ratedobjectuid = 1
#display = stars - not needed if default is used
}
Constants plugin.tx_thrating.config¶
The following constants must be set once per site.
| Property: | Data type: | Description: | Default: |
|---|---|---|---|
showSummary |
boolean | Enable (1) / Disable (0) visibility rating summary | 1 |
showNoFEUser |
boolean | Enable (1) / Disable (0) info if no FE user is logged on | 0 |
[tsref:plugin.tx_thrating.config]
Example
Here an example which is also included as the defaults constant configuration:
plugin.tx_thrating.settings {
feUserStoragePid = 6
storagePid = 0
}
Constants plugin.tx_thrating.settings¶
The following constants must be set once per site.
| Property: | Data type: | Description: | Default: |
|---|---|---|---|
feUserStoragePid |
integer | Page UID where new records are stored. | 6 |
storagePid |
integer | Page UID where all records (new and old) are stored. The first value must be the same as in {newRecordStoragePid}. The second value must reference the page UID where the website user records are stored. |
0 |
[tsref:plugin.tx_thrating.settings]
Example
Here an example which is also included as the defaults constant configuration:
plugin.tx_thrating.settings {
feUserStoragePid = 6
storagePid = 0
}
Constants plugin.tx_thrating.view¶
The following constants must be set once per site.
| Property: | Data type: | Description: | Default: |
|---|---|---|---|
templateRootPath |
string | Page UID where the FLUID templates are stored | EXT:th_rating/Resources/Private/Templates/ |
partialRootPath |
string | Page UID where the FLUID partials are stored | EXT:th_rating/Resources/Private/Partials/ |
layoutRootPath |
string | Page UID where the FLUID layouts are stored | EXT:th_rating/Resources/Private/Layouts/ |
[tsref:plugin.tx_thrating.settings.view]
Example
Here an example which is also included as the defaults constant configuration:
plugin.tx_thrating.view {
templateRootPath = EXT:th_rating/Resources/Private/Templates/
partialRootPath = EXT:th_rating/Resources/Private/Partials/
layoutRootPath = EXT:th_rating/Resources/Private/Layouts/
}