Difference between revisions of "Actor Photos"
TMMStephenY2 (talk | contribs) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
{{CARMA1 Manual | {{CARMA1 Manual | ||
| show_actors_admin_section = true | | show_actors_admin_section = true | ||
Line 6: | Line 5: | ||
''This article applies to CARMA 1.3.2.2 and greater'' | ''This article applies to CARMA 1.3.2.2 and greater'' | ||
− | CARMA | + | [[CARMA]] contains a feature that allows it to display a photo of your actors on pages featuring that particular actor. |
== Upload Photos == | == Upload Photos == | ||
− | + | Before [[CARMA]] can display any photos for your actors, you must first upload the photos you wish to use. To upload a new photo, go to the [[CARMA Actors Admin|Actors Admin]] and add a new actor or edit a currently existing actor. On the Editing Actor page, upload your desired actor photo into the "Photo" field, then click Save Actor. | |
== carma_actor_photo_name Template Function == | == carma_actor_photo_name Template Function == | ||
''See also: [[carma_actor_photo_name]]'' | ''See also: [[carma_actor_photo_name]]'' | ||
− | You can display just the actor photo on any page using the | + | You can display just the actor photo on any page by using the |
<tt>carma_actor_photo_name</tt> template function. For example: | <tt>carma_actor_photo_name</tt> template function. For example: | ||
Line 35: | Line 34: | ||
'''HTML Code After Smarty Runs''' | '''HTML Code After Smarty Runs''' | ||
<pre> | <pre> | ||
− | + | Actor 1<br> | |
<img src="view_image.php?actorid=1&width=300&height=300"><br> | <img src="view_image.php?actorid=1&width=300&height=300"><br> | ||
<hr> | <hr> | ||
+ | Actor 2<br> | ||
+ | <img src="view_image.php?actorid=2&width=300&height=300"><br> | ||
+ | <hr> | ||
+ | ... | ||
</pre> | </pre> | ||
Latest revision as of 17:04, 17 August 2010
This article applies to CARMA 1.3.2.2 and greater
CARMA contains a feature that allows it to display a photo of your actors on pages featuring that particular actor.
Upload Photos
Before CARMA can display any photos for your actors, you must first upload the photos you wish to use. To upload a new photo, go to the Actors Admin and add a new actor or edit a currently existing actor. On the Editing Actor page, upload your desired actor photo into the "Photo" field, then click Save Actor.
carma_actor_photo_name Template Function
See also: carma_actor_photo_name
You can display just the actor photo on any page by using the carma_actor_photo_name template function. For example:
Template Code
{carma_list count=500 list="actors" order="name ASC"} {foreach from=$carma_list.actor item=actor} {$actor.name}<br> {if $actor.photo} <img src="view_image.php?actorid={$actor.actorid}&width=300&height=300"><br> {else} [no photo]<br> {/if} <hr> {/foreach}
HTML Code After Smarty Runs
Actor 1<br> <img src="view_image.php?actorid=1&width=300&height=300"><br> <hr> Actor 2<br> <img src="view_image.php?actorid=2&width=300&height=300"><br> <hr> ...
Other Template Functions
All of the following template functions take an photo parameter which displays the actor photo alongside their usual output.