Open main menu

CDOT Wiki β

Changes

User:Minooz/OSD600/popcorn/doc

661 bytes added, 21:58, 26 February 2011
Documentation for tagthisperson plugin
===Documentation for <TT> tagthisperson </TT> plugin===
: Name:: <TT>'''tagthisperson'''</TT>
: Example
<pre>
var p = Popcorn('#video')
}, false );
</pre>
: Description:: Adds people's names that are tagged in a subtitle to an element on the page:: Options parameter will need a start, end, target, image, href and person.:: Start is the time that you want this plug-in to execute:: End is the time that you want this plug-in to stop executing:: Person is the name of the person who you want to tag:: Image is the url to the image of the person - optional:: href is the url to the webpage of the person - optional:: Target is the id of the document element that the text needs to be:: attached to, this target element must exist on the DOM
: Syntax
<pre>
var p = Popcorn.plugin( "tagthisperson" , ( function('#video'){ .tagthisperson( return { manifest: options:{ start : {elem:'input', type: 'text', label:'In'}, end : {elem:'input', type:'text', label:'Out'}, target : 'tag-container', person : {elem:'input', type: 'text', label:'Name'}, image : {elem:'input', type: 'text', label:'Image Src'}, href href: target{elem:'input', type:'text', label: 'href Src'} } )}, false );
</pre>
target - The id of the document element that the text needs to be - attached to, this target element must exist on the DOM
</pre>
 
 
 
 
// Keep track of qty and sequence of options' objects based on the options' target var count = 0; var targetObj = {}; function addCount( target ) { targetObj[ target ] = ++count; } return { manifest: { about:{ name: "Popcorn tagthisperson Plugin", version: "0.1", author: "@annasob", website: "annasob.wordpress.com" }, options:{ start : {elem:'input', type:'text', label:'In'}, end : {elem:'input', type:'text', label:'Out'}, target : 'tag-container', person : {elem:'input', type:'text', label:'Name'}, image : {elem:'input', type:'text', label:'Image Src'}, href : {elem:'input', type:'text', label:'href Src'} } }, _setup: function( options ) {
1
edit