Creating Actor Pages

From TMM Wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
CARMA
Actors Admin
The Actors Admin
Add Actor
Actor Photos
Actor Documents
Manage Attribute Types
Creating Actor Pages

CARMA allows you to create individual pages, or Site Sections, on your site(s) for each actor available in your system. These pages can display a wide variety of information, including the actor's bio, sample image, links to their galleries and videos, and the actor's rating. You can also allow surfers to rate the actor on these pages if you so choose.

To create an Actor Page in CARMA, you must first make sure that the page you are going to has an Actor ID number (actorid) in the URL. Without defining your actorid, this function will not display properly.

You can create a new page for your actors through the CARMA Sites Admin. Just click the "Manage Sections" action icon and use the green plus icon to add a new section. For more information on creating a new page in CARMA, please see our Site Sections wiki article.

Example Code

The following code will help you get started with created individual pages for your actors, along with their information, galleries, videos, and actor ratings. In the following code, the example actorid is defined as 7.

Insert the following sample code into the body template for the new Site Section you created for your actor. You can find this template by going to the Sites Admin, editing the templates for the site section you want to change, and customizing your body template.

http://<CARMA page>&actorid=7

{* get actor data *}
{carma_get_actor_data actorid=$smarty.request.actorid}

{* display actor data so you know what you have for templating *}
{$actor_data|@debug_print_var}

{* show galleries *}
{carma_search content_type=gal actor=$smarty.request.actorid}

{* show videos *}
{carma_search content_type=video actor=$smarty.request.actorid}

{* show rating and rating form *}
{if $actor_data.rating.my}
You Rated This Actor {if $actor_data.rating.my == 8}an{else}a{/if} {$actor_data.rating.my}
{else}
<form action="rating.php" method="GET" id=vote name=vote>
<input type="hidden" name="actorid" value="{$actor_data.actorid}">
<input type="hidden" name="type" value="actor">
<select name="rating">
<option value="1">1 - Worst</option>
<option value="2">2 - Bad</option>
<option value="3" selected>3 - Average</option>
<option value="4">4 - Good</option>
<option value="5">5 - Best</option>
</select>
<INPUT id=vote type=submit value=Vote name=vote>
</FORM>
{/if}