Carma favorite
From Tmmwiki
Contents |
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
Input Variables:
- galid: Set this to the gallery ID number you want a member to add or remove. You can use the variables $galid or $smarty.request.galid.
- actorid: Set this to the actor's ID number you want a member to add or remove
- section_name: Custom favorite list section name
- caption: The unique name for this custom favorite.
- var: set the variable name for the favorites data.
- tpl: Specify another template to use instead of the default template for this function.
- data_only: Set to 1 to store the data for later use. The default, 0/false, will print the link.
- assign: String to use for a variable that holds the output of the function. Leave blank to store no output.
- display_on_assign: Set to 1 if you want to display the template when using assign. The default, 0/false, will not display the template when you use assign.
- 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.
