Difference between revisions of "Creating Actor Pages"
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…') |
|||
(One intermediate revision by one other user not shown) | |||
Line 5: | Line 5: | ||
[[CARMA]] allows you to create individual pages, or [[Site Sections]], on your [[Ct#Site|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 [[Ct#Surfer|surfers]] to rate the actor on these pages if you so choose. | [[CARMA]] allows you to create individual pages, or [[Site Sections]], on your [[Ct#Site|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 [[Ct#Surfer|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. | + | 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 == | == 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''. | 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'' [[Ct#Template|template]] for the new [[Site Sections|Site Section]] you created for your actor. You can find this [[Ct#Template|template]] by going to the [[CARMA Sites Admin|Sites Admin]], editing the [[Ct#Template|templates]] for the [[Site Sections|site section]] you want to change, and customizing your ''body'' [[Ct#Template|template]]. | ||
+ | |||
<pre> | <pre> | ||
http://<CARMA page>&actorid=7 | http://<CARMA page>&actorid=7 | ||
Line 25: | Line 30: | ||
{carma_search content_type=video actor=$smarty.request.actorid} | {carma_search content_type=video actor=$smarty.request.actorid} | ||
− | {* show rating and rating form * | + | {* show rating and rating form *} |
{if $actor_data.rating.my} | {if $actor_data.rating.my} | ||
You Rated This Actor {if $actor_data.rating.my == 8}an{else}a{/if} {$actor_data.rating.my} | You Rated This Actor {if $actor_data.rating.my == 8}an{else}a{/if} {$actor_data.rating.my} |
Latest revision as of 11:07, 22 December 2011
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}