Actor Photos

From TMM Wiki
Jump to navigationJump to search
CARMA
Actors Admin
The Actors Admin
Add Actor
Actor Photos
Actor Documents
Manage Attribute Types
Creating Actor Pages

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.