Difference between revisions of "Carma favorite"
From TMM Wiki
Jump to navigationJump to searchm |
(No difference)
|
Revision as of 13:34, 18 December 2008
carma_favorite
Display a link to allow a member to add or remove a favorite.
- Sample usage: {carma_favorite galid=$smarty.entry.galid}
- Required: caption and one of: galid, actorid, or section_name
- Optional: tpl, var, data_only, assign, display_on_assign
- Version: CARMA 1.3.1.0 or higher
Parameters
(Required parameters in bold)
Parameter | Description | Possible Values | Default Value | Example |
---|---|---|---|---|
galid | The gallery you want a member to add or remove from their favorite list | The gallery ID number you want a member to add or remove. You can use the variables $galid or $smarty.request.galid. | None. | galid="123" |
actorid | The actor you want a member to add or remove from their favorite list | The actor's ID number you want a member to add or remove | None. | actorid="123" |
section_name | Custom favorite list section name | Any valid section name | None. | section_name="my_name" |
caption | The unique name for this custom favorite | Any unique name | None. | caption="my_name" |
var | Name the favorites data | The variable name for the favorites data. | None. | var="my_var" |
tpl | Display favorites using this template | Any valid template name | favorites_list (Display favorites using the favorites_list template) | tpl="my_template" |
data_only | Put the favorities in an array | 1 | None. Displays favorities | data_only=1 |
assign | Name of the Smarty variable that stores the output | Any valid Smarty variable name | None. Output is displayed, not stored | assign="my_var" |
display_on_assign | Display favorities even when the assign parameter (above) is used | 1 | None If assign is used, no favorities are displayed | display_on_assign=1 |
- Default Templates Used: favorite
- Variables created: $carma_favorite
Description
This function displays an add favorite link for to members for galleries, actors, or sections that they haven't made a favorite yet. If the user already made the gallery a favorite, this link will remove the favorite. You need to use pass an argument containing either the actor's ID number, the gallery ID number, or the section name to make a favorite.