Difference between revisions of "Actor Documents"
TMMStephenY2 (talk | contribs) |
|||
(5 intermediate revisions by one other user not shown) | |||
Line 5: | Line 5: | ||
''This article applies to CARMA 1.3.7.1 and greater'' | ''This article applies to CARMA 1.3.7.1 and greater'' | ||
− | + | [[CARMA]] contains the feature of allowing clients to upload documents for an actor. These documents can be in any format, and contain anything you wish. | |
+ | |||
+ | For example, a use of this feature would be uploading 2257 documents for the actors featured on your sites. There is also a script in the member scripts directory called ''view_doc.php'' that will allow you to create links to documents on your site. This allows members to view select files. | ||
== Managing Documents == | == Managing Documents == | ||
− | |||
− | [[Image:Actors_document_manage.png| | + | You can manage your documents by going to the [[CARMA Actors Admin|Actors Admin]] and selecting the "Add/Remove Documents" ([[Image:Actors_document_icon.png]]) icon to the right of the actor you wish to manage documents for. |
+ | |||
+ | [[Image:Actors_document_manage.png|450px|Figure 1.1 - Actors Admin - Managing actor documents]] | ||
+ | |||
+ | On the "Manage Documents" page, there will be two available tables. The "Documents" table lists all current documents that [[CARMA]] has for that particular actor. Below, the "Add Document" table allows you to upload new documents, and choose if you want members to see your uploaded document. | ||
+ | The "Documents" table also contains three action icons. These icons allow you to view the selected document, download the document, or delete the document from [[CARMA]]. | ||
=== Add a New Document === | === Add a New Document === | ||
− | |||
− | [[ | + | To add a new document to an actor, go back to the "Manage Documents" page in the [[CARMA Actors Admin|Actors Admin]]. In the "Add Document" table, you can optionally provide a name for your document, for display and reference purposes. If you leave the name field blank, the name will default to the document's file name. |
+ | |||
+ | All documents uploaded through [[CARMA]] are private, and can only be accessed through the [[CARMA]] Admins by default. To allow members to have access to the document you are uploading, check the box for the "Public" option. Once you have done this, click the "Choose File" button to upload a file from your hard drive. Click "Upload" when you are done to upload the selected document. | ||
+ | [[Image:Actors_document_upload.png|450px|Figure 1.2 - Actors Admin - Uploading a new document]] | ||
=== Remove a Document === | === Remove a Document === | ||
− | To remove a document, | + | To remove a document that has been uploaded to [[CARMA]], simply go to the "Manage Documents" page via the [[CARMA Actors Admin|Actors Admin]] and click the Delete action icon. |
− | [[Image:Actors_document_remove.png| | + | [[Image:Actors_document_remove.png|450px|Figure 1.3 - Actors Admin - Deleting a document]] |
== Accessing a document == | == Accessing a document == | ||
− | If you | + | If you have chosen to allow public access to certain documents, you can display them on your [[Members Area Templates]] by linking to the script ''view_doc.php''. |
+ | This script should be called like one of the two examples below: | ||
=== View Document Example 1 === | === View Document Example 1 === | ||
Line 36: | Line 45: | ||
</pre> | </pre> | ||
− | * [YOUR_SITE] is | + | * [YOUR_SITE] is the URL to your Members site. |
− | * <name> is the name of the document that | + | * <name> is the name of the document that you provided when uploading it (such as my_story) |
− | * <actorid> is the | + | * <actorid> is the ID of the actor that the document belongs to |
Example: | Example: | ||
<pre> | <pre> | ||
− | http://members.mysite.com/view_doc.php?name= | + | http://members.mysite.com/view_doc.php?name=my_story&actorid=3 |
</pre> | </pre> | ||
Line 53: | Line 62: | ||
</pre> | </pre> | ||
− | * [YOUR_SITE] is | + | * [YOUR_SITE] is the URL to your Members site. |
− | * <doc_id> is the | + | * <doc_id> is the ID of the document. See code below to get this ID from the template functions |
− | * <actorid> is the | + | * <actorid> is the ID of the actor that the document belongs to |
Example: | Example: | ||
Line 78: | Line 87: | ||
</pre> | </pre> | ||
− | The above example will list the actor, their photo, and a list of all their documents. | + | The above example will list the actor, their photo, and a list of all their ''public'' documents. |
− | [[Image:Actors_document_site.png|frame|center||||Figure | + | [[Image:Actors_document_site.png|frame|center||||Figure 2.1 - Members Site - Sample Output of smarty code to show documents]] |
== Template Functions == | == Template Functions == | ||
− | All template functions that deal with actor data have been modified to have an array called ''docs''. | + | All template functions that deal with actor data have been modified to have an array called ''docs''. The modified templates are: |
* [[carma_list_all]] | * [[carma_list_all]] |
Latest revision as of 15:17, 19 August 2010
This article applies to CARMA 1.3.7.1 and greater
CARMA contains the feature of allowing clients to upload documents for an actor. These documents can be in any format, and contain anything you wish.
For example, a use of this feature would be uploading 2257 documents for the actors featured on your sites. There is also a script in the member scripts directory called view_doc.php that will allow you to create links to documents on your site. This allows members to view select files.
Managing Documents
You can manage your documents by going to the Actors Admin and selecting the "Add/Remove Documents" () icon to the right of the actor you wish to manage documents for.
On the "Manage Documents" page, there will be two available tables. The "Documents" table lists all current documents that CARMA has for that particular actor. Below, the "Add Document" table allows you to upload new documents, and choose if you want members to see your uploaded document.
The "Documents" table also contains three action icons. These icons allow you to view the selected document, download the document, or delete the document from CARMA.
Add a New Document
To add a new document to an actor, go back to the "Manage Documents" page in the Actors Admin. In the "Add Document" table, you can optionally provide a name for your document, for display and reference purposes. If you leave the name field blank, the name will default to the document's file name.
All documents uploaded through CARMA are private, and can only be accessed through the CARMA Admins by default. To allow members to have access to the document you are uploading, check the box for the "Public" option. Once you have done this, click the "Choose File" button to upload a file from your hard drive. Click "Upload" when you are done to upload the selected document.
Remove a Document
To remove a document that has been uploaded to CARMA, simply go to the "Manage Documents" page via the Actors Admin and click the Delete action icon.
Accessing a document
If you have chosen to allow public access to certain documents, you can display them on your Members Area Templates by linking to the script view_doc.php.
This script should be called like one of the two examples below:
View Document Example 1
Format:
[YOUR_SITE]/view_doc.php?name=<name>&actorid=<actor_id>
- [YOUR_SITE] is the URL to your Members site.
- <name> is the name of the document that you provided when uploading it (such as my_story)
- <actorid> is the ID of the actor that the document belongs to
Example:
http://members.mysite.com/view_doc.php?name=my_story&actorid=3
View Document Example 2
Format:
[YOUR_SITE]/view_doc.php?doc_id=<doc_id>&actorid=<actor_id>
- [YOUR_SITE] is the 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 the actor, their photo, and a list of all their public documents.
Template Functions
All template functions that deal with actor data have been modified to have an array called docs. The modified templates are: