Difference between revisions of "Actor Documents"
(Created page with '{{CARMA1 Manual | show_actors_admin_section = true }} ''This article applies to CARMA 1.3.7.1 and greater'' Recent changes to CARMA now allow you to upload documents for a spe…') |
|||
Line 19: | Line 19: | ||
− | === View Document Example 1 == | + | === View Document Example 1 === |
Format: | Format: | ||
Line 32: | Line 32: | ||
Example: | Example: | ||
<pre> | <pre> | ||
− | http://members.mysite.com/view_doc.php?name= | + | http://members.mysite.com/view_doc.php?name=my_2257&actorid=3 |
</pre> | </pre> | ||
− | === View Document Example 2 == | + | === View Document Example 2 === |
Format: | Format: | ||
Line 49: | Line 49: | ||
Example: | Example: | ||
<pre> | <pre> | ||
+ | <h2>Actors</h2> | ||
{carma_list count=500 list="actors" order="name ASC"} | {carma_list count=500 list="actors" order="name ASC"} | ||
{foreach from=$carma_list.actor item=actor} | {foreach from=$carma_list.actor item=actor} | ||
− | |||
{if $actor.photo} | {if $actor.photo} | ||
− | <img src="view_image.php?actorid={$actor.actorid}&width= | + | <img src="view_image.php?actorid={$actor.actorid}&width=150&height=150"><br> |
{else} | {else} | ||
[no photo]<br> | [no photo]<br> | ||
+ | {/if} | ||
+ | {$actor.name}<br> | ||
+ | {if $actor.docs} | ||
+ | Documents:<br> | ||
+ | {foreach from=$actor.docs item=doc} | ||
+ | - <a href="view_doc.php?doc_id={$doc.doc_id}&actorid={$actor.actorid}">{$doc.name}</a><br> | ||
+ | {/foreach} | ||
{/if} | {/if} | ||
<hr> | <hr> |
Revision as of 11:20, 18 November 2009
This article applies to CARMA 1.3.7.1 and greater
Recent changes to CARMA now allow you to upload documents for a specific actor. These documents can be in an format and contain anything you wish. The best use for this feature would be uploading 2257 documents. There is also a new script in the member scripts directory called view_doc.php that will allow you to create links to documents on your site if you wish to allow members to view them.
Managing Documents
You need to upload photos for your actors before CARMA can display them. Go to Actors Admin, add or edit an actor, upload the photo into the Photo field, and click Save.
Add a New Document
Remove a Document
Accessing a document
If you choose to allow public access to select documents you can do that on your member's templates with a link to the new script view_doc.php. This script should be called like one of the two examples below like this:
View Document Example 1
Format:
[YOUR_SITE]/view_doc.php?name=<name>&actorid=<actor_id>
- [YOUR_SITE] is your url to your members site.
- <name> is the name of the document that your provided when uploading it (such as 2257)
- <actorid> is the id of the actor that the document belongs to
Example:
http://members.mysite.com/view_doc.php?name=my_2257&actorid=3
View Document Example 2
Format:
[YOUR_SITE]/view_doc.php?doc_id=<doc_id>&actorid=<actor_id>
- [YOUR_SITE] is your url to your members site.
- <doc_id> is the id of the document. See code below to get this id from the template functions
- <actorid> is the id of the actor that the document belongs to
Example:
<h2>Actors</h2> {carma_list count=500 list="actors" order="name ASC"} {foreach from=$carma_list.actor item=actor} {if $actor.photo} <img src="view_image.php?actorid={$actor.actorid}&width=150&height=150"><br> {else} [no photo]<br> {/if} {$actor.name}<br> {if $actor.docs} Documents:<br> {foreach from=$actor.docs item=doc} - <a href="view_doc.php?doc_id={$doc.doc_id}&actorid={$actor.actorid}">{$doc.name}</a><br> {/foreach} {/if} <hr> {/foreach}
The above example will list and actor, there photo, and a list of all their documents.
Template Functions
All template functions that deal with actor data have been modified to have an array called docs. Modified templates are: