Difference between revisions of "Carma favorite"

From TMM Wiki
Jump to navigationJump to search
m
 
 
Line 7: Line 7:
  
 
* Sample usage: {carma_favorite galid=$smarty.entry.galid}
 
* Sample usage: {carma_favorite galid=$smarty.entry.galid}
* Required: ''caption'' and one of: ''galid'', ''actorid'', or ''section_name''  
+
* Required: One of: ''galid'', ''actorid'', or ''section_name''.  When using ''section_name'' you also have to specify ''caption''  
 
* Optional: ''tpl'', ''var'', ''data_only'', ''assign'', ''display_on_assign''
 
* Optional: ''tpl'', ''var'', ''data_only'', ''assign'', ''display_on_assign''
 
* Version: [[CARMA]] 1.3.1.0 or higher
 
* Version: [[CARMA]] 1.3.1.0 or higher

Latest revision as of 17:42, 29 December 2008

CARMA
  Template Functions
CARMA Template Functions
carma_actor_photo_name
carma_comments_display
carma_comments_form
carma_count
carma_favorite
carma_gal_custom
carma_get_extended
carma_list
carma_list_favorites
carma_list_gals
carma_list_third_party_content
carma_list_videos
carma_login_log
carma_most_viewed
carma_newest
carma_news
carma_poll
carma_retrieve_sections
carma_search
carma_actors_search
carma_show_gal
carma_show_video
carma_top_actors
carma_top_rated
carma_upcoming
print_page_numbers
Template Function Aliases
carma_comment_display
carma_display_comment
carma_display_comments
carma_extended
carma_extended_data
carma_get_extended_data
carma_list_all
Common Parameters
assign
assign_prefix
count
data_only
display_on_assign
start
tpl

carma_favorite

Display a link to allow a member to add or remove a favorite.

  • Sample usage: {carma_favorite galid=$smarty.entry.galid}
  • Required: One of: galid, actorid, or section_name. When using section_name you also have to specify caption
  • 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.

Related