Creating Actor Pages

From TMM Wiki
Revision as of 11:36, 24 September 2010 by TMMStephenY (talk | contribs) (Created page with '{{CARMA1 Manual | show_actors_admin_section = true }} CARMA allows you to create individual pages, or Site Sections, on your site(s) for each actor available…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
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.

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.

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}