File: //home/httpd/mech_ftp/baretube.com/admin/manual.php
<? require "header.php"; ?>
<div class="content-page">
<div class="header-area">
<div class="breadcrumbs">
<a href="index.php">Admin Home</a>
<span><a href="manual.php">Manual</a></span>
</div>
</div>
<div class="content-outer">
<h2>User<strong>Manual</strong></h2>
<div class="text-content">
<div class="content collapsible collapsed">
<h3 class="api-head head"><i class="ion ion-arrow-down-a"></i> Adding & Managing Content</h3>
<div class="contents">
<h3>Add Hosted/Hotlinked<a id="addHostedHotlinked"></a></h3>
<div class="text"><p>This option allows you to add a single hosted or hotlinked flv/mp4 video to your site. You can access this option from the content menu in the admin navigation. Once added, the video will appear in your approval queue - where you can approve, encode and publish it.</p></div>
<h3>Add Embedded<a id="addEmbedded"></a></h3>
<div class="text"><p>Add embedded works exactly the same as add hosted/hotlinked, with the exception of it using an embed code rather then a video file. In the case of embeds, a thumbnail must be provided as it is not possible to generate a thumbnail based on an embed code. Embedded videos go directly to the Publish Queue and skip the approval queue altogether.</p></div>
<h3>FTP Video Import<a id="ftpImport"></a></h3>
<div class="text"><p>You can upload any type of video file (as long as the server has a codec for it) into the "ftp_content" directory on your server. The files should be put right in the root directory, and not in any folders. After uploading, please select "Content->FTP Import" from menu, and follow the instructions given in that file. After import, your files will be sent to the approval queue where you can enter titles, descriptions, etc.</p></div>
<h3>FTP Photo Import<a id="ftpPhotoImport"></a></h3>
<div class="text"><p>FTP Photo Import works similarly to FTP Video Import. You upload your galleries into the "ftp_photos" directory on your server, with each gallery in it's own subdirectory. After upload, you must chmod all the files and folders contained therein to 777. Once this is econd, Select Content->FTP Import from the menu and follow the instructions given in that file. After import, your galleries will be sent to the approval queue where you can enter titles, descriptions, etc.</p></div>
<h3>CSV Import<a id="csvImport"></a></h3>
<div class="text"><p>This is by far the easiest and most commonly used method to import content into the script. You simply paste your sponsor-provided dump into the dump box and select the order in which the fields are set in your dump. Most of the fields are obvious, with the exception of file_url (which is the location direct to the video file), plug_url (which is a link to a video page), and localfile. When using plugs or embeds, you must specify a thumbnail url or the import will fail. Videos are automatically assigned to pornstars and channels based on the selected keywords. If a keyword matches a channel or pornstar name, then it is automatically added by the import script to that channel. Localfile is to be used if you are importing content that already exists on your server (for instance, from another script). In this case, you must use the full linux path to the file in order for it to work. The files will be copied from these locations rather then moved. All content imported this way ends up in the approval queue. The background process for CSV Import is executed each time you add videos into it. You must wait for one import to finish before starting up another one, otherwise you may end up with duplicate content.</p></div>
<h3>CSV Photo Import<a id="csvPhotoImport"></a></h3>
<div class="text"><p>This works identically to the above, except that it is for grabbing photos from photo galleries. It will not work on 100% of photo galleries, and will only work if the galleries in question have the thumbnails linking directly to jpeg files with no intermediary html. The background process for CSV Import is executed each time you add galleries into it. You must wait for one import to finish before starting up another one, otherwise you may end up with duplicate content.</p></div>
<h3>Importing From Youtube<a id="youtube"></a></h3>
<div class="text"><p>This script allows you to easily and quickly import embedded videos from youtube. There are two options for importing - a single video import and a bulk import. You can find these options under the content menu in the admin navigation. To operate the single video import, you must enter a video page url for the youtube video you wish to import (example: http://www.youtube.com/watch?v=6xhY9LSGbNk). For bulk imports, you must enter the search string and amount of videos you wish to pull. You can also enter a start index, the order in which the videos should fetch, and optionally fetch only videos that are available in HD quality. The Youtube importer does not download the actual video files, but rather embeds them.</p></div>
<h3>Approval Queue<a id="approvalQueue"></a></h3>
<div class="text"><p>With the exception of embedded videos, all content you add regardingless of which method of content adding you choose will always initially end up in the Approval Queue (Content->Approval Queue). You can either mass approve videos using the checkboxes, or do them one by one by pressing the green checkmark. After a video is approved, it is moved to the encoding queue. The encoding queue can be executed by clicking the 'Encode' button in the menu. At this stage, videos are encoded to mp4/h264 and thumbnailed. Videos which are already in FLV or MP4/h264 format are not re-encoded, only thumbnailed. Encoding may take some time depending on the size and quantity of the videos in the encoder queue. Photo galleries skip the encoding phase and are moved right to publish queue after approval.</p></div>
<h3>Publish Queue<a id="publishQueue"></a></h3>
<div class="text"><p>Content that is ready to be published on your site is viewable here. In this area, you can delete or publish the content using the red and green buttons. You also have the option to automatically change text using the text spinner, and to assign to channels, paysites and pornstars by using the select box at the bottom. You can edit the dictionary that the script uses for spinning text by editing admin/spinText.config.php. </p></div>
<h3>Existing Content<a id="existingContent"></a></h3>
<div class="text"><p>This is exactly like publish queue, except that it contains content that is published live on your site already.</p></div>
</div>
</div>
<div class="content collapsible collapsed">
<h3 class="api-head head"><i class="ion ion-arrow-down-a"></i> Scrapers</h3>
<div class="contents">
<div class="text">
<p>You can use the tube scrapers on the supported sites by adding video page urls (one per line) to the dump box. The scrapers are not universal and will only work on the supported sites. Scraper videos end up in your approval queue like any other import method, and they download the actual video file (not embed). The scraper background process is fired up each time you add videos to the scraper. Please wait for one list to finish before starting up the next, otherwise you may end up with duplicate content. Due to the nature of how scrapers work, they will need to be intermittantly updated.</p>
</div>
</div>
</div>
<div class="content collapsible collapsed">
<h3 class="api-head head"><i class="ion ion-arrow-down-a"></i> Users</h3>
<div class="contents">
<div class="text">
<p>The system has two types of users. Regular users, and partners. It is simply a way to give certain users more permissions then others (ie. limiting uploading only to 'partner' users and so forth). Under this tab, you can also manage the comments that users have left on various content.</p>
</div>
</div>
</div>
<div class="content collapsible collapsed">
<h3 class="api-head head"><i class="ion ion-arrow-down-a"></i> Channels</h3>
<div class="contents">
<div class="text">
<p>This system refers to categories as channels. Everything contained here should be fairly self-explainatory with the exception of the Import Match field. This is used when content is processed by the CSV Importer to match more keywords to categories. Meaning, if you have an "Asian" channel and your Import Match contains "korean, japan, chinese", then videos containing those keywords will also be matched to this category.</p>
</div>
</div>
</div>
<div class="content collapsible collapsed">
<h3 class="api-head head"><i class="ion ion-arrow-down-a"></i> Models</h3>
<div class="contents">
<div class="text">
<p>Under this section you can manage the models on your tube site. You can add single or bulk add models (one name per line). Content can then be assigned to these models under edit content, the publish queue or the existing content area.</p>
</div>
</div>
</div>
<div class="content collapsible collapsed">
<h3 class="api-head head"><i class="ion ion-arrow-down-a"></i> Paysites / Ad System</h3>
<div class="contents">
<div class="text">
<p>Each video in the system is assigned to a paysite at the approval queue stage. Paysites can be added by selecting "Paysites->Add Paysite" from the menu. Once there, you enter the paysite name and url. You will also notice several large textboxes here labeled ad0, ad1, ad2, ad3 and so forth. You use these to set ads for this paysite by entering HTML into them. You can enter iframe code, javascript, banner ad code, text links, flash ads, or anything you like into these boxes. For example, if we decided ad0 will be a text link under the player, we would do the following:<br />
<br />
1) Create our paysite, and enter <a href='http://www.paysite.com'>Click Here To Visit Paysite Name</a> into the ad0 box.<br />
2) On our video templates (template.video_header.php, template.video_content.php, template.video_footer.php located in the templates directory), we would put <? echo $ads[ad0]; ?> in the spot we would like this text link to appear.<br />
<br />
Once this is done, all videos which are assigned to this paysite we created will display that text link in that spot. For other paysites, you would enter a textlink specific to them into the ad0 spot as well. This method can be applied for banners or any other type of ad. In short, whatever HTML you put into the ad# boxes will display on the video pages (of videos assigned to said paysite) in the spots you choose to output them. The ad system does not control ads outside of the video/gallery pages.</p>
<p>The player in the script also has advertisements. These are set in the configuration file at admin/config.php using ftp. They are pulled from XML, so you either need to use a sponsor that has a compatible XML feed (for instance, wetdollars), or you can host your own .xml file with the advertisement and point the config file at your own locally hosted xml. </p>
<p>To pull the paysite name on the video page, use <? echo $rrow[paysitename]; ?>. To pull the paysite url, you can use <? echo $rrow[paysiteurl]; ?>.</p>
</div>
</div>
</div>
<div class="content collapsible collapsed">
<h3 class="api-head head"><i class="ion ion-arrow-down-a"></i> XML / RSS</h3>
<div class="contents">
<div class="text">
<p>XML Imports use the <a href="http://cam.dangerousrobot.com/admin/example.xml">standard tube xml format</a>. It is the same format most of the other popular tube scripts support. Use this page to add/edit/remove xml feeds. These feeds will update automatically and store videos in your approval queue. RSS Export is for creating custom RSS feeds for you to export content to other scripts.</p>
</div>
</div>
</div>
<div class="content collapsible collapsed">
<h3 class="api-head head"><i class="ion ion-arrow-down-a"></i> Static Pages</h3>
<div class="contents">
<div class="text">
<p>The static page function lets you create static html pages such as DMCA, 2257, FAQ, etc. You can use HTML directly in the body, and it will be wrapped by the overall header and overall footer of the sites templates. The filename field lets you select what the file will be called - For instance: 2257.html will be available at http://www.domain.com/static/2257.html</p>
</div>
</div>
</div>
<div class="content collapsible collapsed">
<h3 class="api-head head"><i class="ion ion-arrow-down-a"></i> Encoder</h3>
<div class="contents">
<div class="text">
<p>The encoder - as the name suggests - encodes videos that have been approved in the approval queue. The encoder uses FFMPEG to process and thumbnail videos. You can edit the ffmpeg command line being used in admin/config.php. The encoder also creates mobile copies and trailers of videos if such options are enabled in the config. If a video is already in FLV/MP4 format, then it's encoding will be skipped unless $forceEncodeAll is turned on in the config file. A mobile copy will be made invariably of the source videos format (assuming that option is turned on). You can also view the encoding queue, and remove videos from the encoding queue back to the approval queue.</p>
</div>
</div>
</div>
<div class="content collapsible collapsed">
<h3 class="api-head head"><i class="ion ion-arrow-down-a"></i> Server Status</h3>
<div class="contents">
<div class="text">
<p>The server status page is a simple output of free space, server load and running mysql queries. This is used mostly for debugging purposes. There is also a memcached status output page - which only works if memcached is installed and enabled.</p>
</div>
</div>
</div>
<div class="content collapsible collapsed">
<h3 class="api-head head"><i class="ion ion-arrow-down-a"></i> Templating Guide</h3>
<div class="contents">
<div class="text">
<p>The script is controlled by a simple templating system using header/footer type system. Most of the relevant template files are located in the templates directory. Below is a listing of the main templates for the script. You may have additional template files if you have opted to get custom modifications done.<br />
template.channel_item.php - The repeating channel thumbnail box on the channels.php page.<br />
template.content_item.php - The repeating movie thumbnail box located on the index, search, related videos, etc pages.<br />
template.content_item_photo.php - Same as above, except for photo galleries.<br />
template.member_item.php - The repeating member thumbnail box located on members.php.<br />
template.nav.php - The navigation menu for the site.<br />
template.overall_header.php - The header for all pages on the site except video pages.<br />
template.overall_footer.php - The footer for all pages on the site except video pages.<br />
template.upload_form.php - The upload page.<br />
template.video_header.php - The video page header.<br />
template.video_content.php - The center of the video page. This is likely where you will be entering the ad codes mentioned above.<br />
template.gallery_content.php - The center of the gallery pages. <br />
template.video_footer.php - The video page footer.<br />
mobile.*.php - The templates for the mobile version.</p>
<p>Some useful functions and their usages:</p>
<table class="pagetable">
<tr>
<td> </td>
<td colspan="2"><strong>showRandom()</strong></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><em><?php showRandom('template.content_item.php', 16, 'cacheNameGoesHere', 0 , false, 0, false);</em> ?></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><strong>Parameter List</strong></td>
</tr>
<tr>
<td width="21"><strong>1</strong></td>
<td width="89"><em>String</em></td>
<td width="720">Template filename</td>
</tr>
<tr>
<td><strong>2</strong></td>
<td><em>Interger</em></td>
<td>Amount to pull</td>
</tr>
<tr>
<td><strong>3</strong></td>
<td><em>String</em></td>
<td>Cache Name (must be unique to this function call)</td>
</tr>
<tr>
<td><strong>4</strong></td>
<td><em>Interger</em></td>
<td>Type of content (0 = Videos, 1 = Photo Galleries)</td>
</tr>
<tr>
<td><strong>5</strong></td>
<td><em>Boolean</em></td>
<td>Slider Function (does not *make* slider, just outputs html in preparation)</td>
</tr>
<tr>
<td><strong>6</strong></td>
<td><em>Interger</em></td>
<td>Amount per slider page (if above enabled)</td>
</tr>
<tr>
<td><strong>7</strong></td>
<td><em>Interger</em></td>
<td>User Id (will pull only content uploaded by specific user)</td>
</tr>
<tr>
<td> </td>
<td><strong>Returns</strong></td>
<td><em>X number of random media thumbnails displayed in the specified template, optionally from specific user.</em></td>
</tr>
</table>
<br /><br />
<table width="830">
<tr>
<td> </td>
<td colspan="2"><strong>showBeingWatched()</strong></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><em><?php showBeingWatched('template.content_item.php', 16, 'cacheNameGoesHere', 0 , false, 0);</em> ?></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><strong>Parameter List</strong></td>
</tr>
<tr>
<td width="21"><strong>1</strong></td>
<td width="89"><em>String</em></td>
<td width="720">Template filename</td>
</tr>
<tr>
<td><strong>2</strong></td>
<td><em>Interger</em></td>
<td>Amount to pull</td>
</tr>
<tr>
<td><strong>3</strong></td>
<td><em>String</em></td>
<td>Cache Name (must be unique to this function call)</td>
</tr>
<tr>
<td><strong>4</strong></td>
<td><em>Interger</em></td>
<td>Type of content (0 = Videos, 1 = Photo Galleries)</td>
</tr>
<tr>
<td><strong>5</strong></td>
<td><em>Boolean</em></td>
<td>Slider Function (does not *make* slider, just outputs html in preparation)</td>
</tr>
<tr>
<td><strong>6</strong></td>
<td><em>Interger</em></td>
<td>Amount per slider page (if above enabled)</td>
</tr>
<tr>
<td> </td>
<td><strong>Returns</strong></td>
<td><em>X number of recently viewed media thumbnails displayed in the specified template.</em></td>
</tr>
</table>
<br /><br />
<table width="830">
<tr>
<td> </td>
<td colspan="2"><strong>_showNewest()</strong></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><em><?php _showNewest('template.content_item.php', 16, 'cacheNameGoesHere', 0 , false, 0, false);</em> ?></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><strong>Parameter List</strong></td>
</tr>
<tr>
<td width="21"><strong>1</strong></td>
<td width="89"><em>String</em></td>
<td width="720">Template filename</td>
</tr>
<tr>
<td><strong>2</strong></td>
<td><em>Interger</em></td>
<td>Amount to pull</td>
</tr>
<tr>
<td><strong>3</strong></td>
<td><em>String</em></td>
<td>Cache Name (must be unique to this function call)</td>
</tr>
<tr>
<td><strong>4</strong></td>
<td><em>Interger</em></td>
<td>Type of content (0 = Videos, 1 = Photo Galleries)</td>
</tr>
<tr>
<td><strong>5</strong></td>
<td><em>Boolean</em></td>
<td>Slider Function (does not *make* slider, just outputs html in preparation)</td>
</tr>
<tr>
<td><strong>6</strong></td>
<td><em>Interger</em></td>
<td>Amount per slider page (if above enabled)</td>
</tr>
<tr>
<td><strong>7</strong></td>
<td><em>Interger</em></td>
<td>User Id (will pull only content uploaded by specific user)</td>
</tr>
<tr>
<td> </td>
<td><strong>Returns</strong></td>
<td><em>X number of recently added media thumbnails displayed in the specified template, optionally from specific user.</em></td>
</tr>
</table>
<br /><br />
<table width="830">
<tr>
<td> </td>
<td colspan="2"><strong>_showMostViewed()</strong></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><em><?php _showMostViewed('template.content_item.php', 16, 'cacheNameGoesHere', 0 , false, 0, false);</em> ?></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><strong>Parameter List</strong></td>
</tr>
<tr>
<td width="21"><strong>1</strong></td>
<td width="89"><em>String</em></td>
<td width="720">Template filename</td>
</tr>
<tr>
<td><strong>2</strong></td>
<td><em>Interger</em></td>
<td>Amount to pull</td>
</tr>
<tr>
<td><strong>3</strong></td>
<td><em>String</em></td>
<td>Cache Name (must be unique to this function call)</td>
</tr>
<tr>
<td><strong>4</strong></td>
<td><em>Interger</em></td>
<td>Type of content (0 = Videos, 1 = Photo Galleries)</td>
</tr>
<tr>
<td><strong>5</strong></td>
<td><em>Boolean</em></td>
<td>Slider Function (does not *make* slider, just outputs html in preparation)</td>
</tr>
<tr>
<td><strong>6</strong></td>
<td><em>Interger</em></td>
<td>Amount per slider page (if above enabled)</td>
</tr>
<tr>
<td><strong>7</strong></td>
<td><em>Interger</em></td>
<td>User Id (will pull only content uploaded by specific user)</td>
</tr>
<tr>
<td> </td>
<td><strong>Returns</strong></td>
<td><em>X number of most viewed media thumbnails displayed in the specified template, optionally from specific user.</em></td>
</tr>
</table>
<br /><br />
<table width="830">
<tr>
<td> </td>
<td colspan="2"><strong>_showTopRated()</strong></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><em><?php _showTopRated('template.content_item.php', 16, 'cacheNameGoesHere', 0 , false, 0, false);</em> ?></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><strong>Parameter List</strong></td>
</tr>
<tr>
<td width="21"><strong>1</strong></td>
<td width="89"><em>String</em></td>
<td width="720">Template filename</td>
</tr>
<tr>
<td><strong>2</strong></td>
<td><em>Interger</em></td>
<td>Amount to pull</td>
</tr>
<tr>
<td><strong>3</strong></td>
<td><em>String</em></td>
<td>Cache Name (must be unique to this function call)</td>
</tr>
<tr>
<td><strong>4</strong></td>
<td><em>Interger</em></td>
<td>Type of content (0 = Videos, 1 = Photo Galleries)</td>
</tr>
<tr>
<td><strong>5</strong></td>
<td><em>Boolean</em></td>
<td>Slider Function (does not *make* slider, just outputs html in preparation)</td>
</tr>
<tr>
<td><strong>6</strong></td>
<td><em>Interger</em></td>
<td>Amount per slider page (if above enabled)</td>
</tr>
<tr>
<td><strong>7</strong></td>
<td><em>Interger</em></td>
<td>User Id (will pull only content uploaded by specific user)</td>
</tr>
<tr>
<td> </td>
<td><strong>Returns</strong></td>
<td><em>X number of top rated media thumbnails displayed in the specified template, optionally from specific user.</em></td>
</tr>
</table>
<br /><br />
<table width="830">
<tr>
<td> </td>
<td colspan="2"><strong>_showLongest()</strong></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><em><?php _showLongest('template.content_item.php', 16, 'cacheNameGoesHere', 0 , false, 0, false);</em> ?></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><strong>Parameter List</strong></td>
</tr>
<tr>
<td width="21"><strong>1</strong></td>
<td width="89"><em>String</em></td>
<td width="720">Template filename</td>
</tr>
<tr>
<td><strong>2</strong></td>
<td><em>Interger</em></td>
<td>Amount to pull</td>
</tr>
<tr>
<td><strong>3</strong></td>
<td><em>String</em></td>
<td>Cache Name (must be unique to this function call)</td>
</tr>
<tr>
<td><strong>4</strong></td>
<td><em>Interger</em></td>
<td>Type of content (0 = Videos, 1 = Photo Galleries)</td>
</tr>
<tr>
<td><strong>5</strong></td>
<td><em>Boolean</em></td>
<td>Slider Function (does not *make* slider, just outputs html in preparation)</td>
</tr>
<tr>
<td><strong>6</strong></td>
<td><em>Interger</em></td>
<td>Amount per slider page (if above enabled)</td>
</tr>
<tr>
<td><strong>7</strong></td>
<td><em>Interger</em></td>
<td>User Id (will pull only content uploaded by specific user)</td>
</tr>
<tr>
<td> </td>
<td><strong>Returns</strong></td>
<td><em>X number of longest (time length) media thumbnails displayed in the specified template, optionally from specific user.</em></td>
</tr>
</table>
<br /><br />
<table width="830">
<tr>
<td> </td>
<td colspan="2"><strong>_showMostDiscussed()</strong></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><em><?php _showMostViewed('template.content_item.php', 16, 'cacheNameGoesHere', 0 , false, 0, false);</em> ?></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><strong>Parameter List</strong></td>
</tr>
<tr>
<td width="21"><strong>1</strong></td>
<td width="89"><em>String</em></td>
<td width="720">Template filename</td>
</tr>
<tr>
<td><strong>2</strong></td>
<td><em>Interger</em></td>
<td>Amount to pull</td>
</tr>
<tr>
<td><strong>3</strong></td>
<td><em>String</em></td>
<td>Cache Name (must be unique to this function call)</td>
</tr>
<tr>
<td><strong>4</strong></td>
<td><em>Interger</em></td>
<td>Type of content (0 = Videos, 1 = Photo Galleries)</td>
</tr>
<tr>
<td><strong>5</strong></td>
<td><em>Boolean</em></td>
<td>Slider Function (does not *make* slider, just outputs html in preparation)</td>
</tr>
<tr>
<td><strong>6</strong></td>
<td><em>Interger</em></td>
<td>Amount per slider page (if above enabled)</td>
</tr>
<tr>
<td><strong>7</strong></td>
<td><em>Interger</em></td>
<td>User Id (will pull only content uploaded by specific user)</td>
</tr>
<tr>
<td> </td>
<td><strong>Returns</strong></td>
<td><em>X number of most discussed/commented media thumbnails displayed in the specified template, optionally from specific user.</em></td>
</tr>
</table>
<br /><br />
<table width="830">
<tr>
<td> </td>
<td colspan="2"><strong>getUserNumVideos()</strong></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><em><?php getUserNumVideos(123);</em> ?></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><strong>Parameter List</strong></td>
</tr>
<tr>
<td width="21"><strong>1</strong></td>
<td width="89"><em>Interger</em></td>
<td width="720">User id</td>
</tr>
<tr>
<td> </td>
<td><strong>Returns</strong></td>
<td><em>Interger value for number of videos the user has uploaded that are currently published.</em></td>
</tr>
</table>
<br /><br />
<table width="830">
<tr>
<td> </td>
<td colspan="2"><strong>getUserNumGalleries()</strong></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><em><?php getUserNumGalleries(123);</em> ?></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><strong>Parameter List</strong></td>
</tr>
<tr>
<td width="21"><strong>1</strong></td>
<td width="89"><em>Interger</em></td>
<td width="720">User id</td>
</tr>
<tr>
<td> </td>
<td><strong>Returns</strong></td>
<td><em>Interger value for number of galleries the user has uploaded that are currently published.</em></td>
</tr>
</table>
<br /><br />
<table width="830">
<tr>
<td> </td>
<td colspan="2"><strong>getUserNumFavorites()</strong></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><em><?php getUserNumFavorites(123);</em> ?></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><strong>Parameter List</strong></td>
</tr>
<tr>
<td width="21"><strong>1</strong></td>
<td width="89"><em>Interger</em></td>
<td width="720">User id</td>
</tr>
<tr>
<td> </td>
<td><strong>Returns</strong></td>
<td><em>Interger value for number favorite media items the given user currently has.</em></td>
</tr>
</table>
<br /><br />
<table width="830">
<tr>
<td> </td>
<td colspan="2"><strong>getUserNumFriends()</strong></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><em><?php getUserNumVideos(123);</em> ?></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><strong>Parameter List</strong></td>
</tr>
<tr>
<td width="21"><strong>1</strong></td>
<td width="89"><em>Interger</em></td>
<td width="720">User id</td>
</tr>
<tr>
<td> </td>
<td><strong>Returns</strong></td>
<td><em>Interger value for number of accepted friend requests the given user currently has.</em></td>
</tr>
</table>
<br /><br />
<table width="830">
<tr>
<td> </td>
<td colspan="2"><strong>truncate()</strong></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><em><?php truncate($string,123);</em> ?></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><strong>Parameter List</strong></td>
</tr>
<tr>
<td width="21"><strong>1</strong></td>
<td width="89"><em>String</em></td>
<td width="720">Any text based string</td>
</tr>
<tr>
<td><strong>2</strong></td>
<td><em>Interger</em></td>
<td>Number of characters to trim to</td>
</tr>
<tr>
<td> </td>
<td><strong>Returns</strong></td>
<td><em>Returns the input string truncated to the number of characters selected, followed by three periods. If the string is shorter then the specified amount of characters, the unchanged input string is returned.</em></td>
</tr>
</table>
<br /><br />
<table width="830">
<tr>
<td> </td>
<td colspan="2"><strong>buildChannels()</strong></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><em><?php buildChannels($rrow[record_num],'channels');</em> ?></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><strong>Parameter List</strong></td>
</tr>
<tr>
<td width="21"><strong>1</strong></td>
<td width="89"><em>Interger</em></td>
<td width="720">ID Number of a video or gallery</td>
</tr>
<tr>
<td><strong>2</strong></td>
<td><em>String</em></td>
<td>Can be channels or search</td>
</tr>
<tr>
<td> </td>
<td><strong>Returns</strong></td>
<td><em>Returns a hyperlinked list of comma separated channel names that the given media belongs to. 'channels' mode returns urls to channels, 'search' mode returns links to searches for the channel names as keywords.</em></td>
</tr>
</table>
<br /><br />
<table width="830">
<tr>
<td> </td>
<td colspan="2"><strong>showChannels()</strong></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><em><?php showChannels("<li>","</li>");</em> ?></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><strong>Parameter List</strong></td>
</tr>
<tr>
<td width="21"><strong>1</strong></td>
<td width="89"><em>String</em></td>
<td width="720">Opening HTML Tag</td>
</tr>
<tr>
<td><strong>2</strong></td>
<td><em>String</em></td>
<td>Closing HTML Tag</td>
</tr>
<tr>
<td> </td>
<td><strong>Returns</strong></td>
<td><em>Returns hyperlinked list of channels, each with preceeded and followed by the opening and closing html tags specified.</em></td>
</tr>
</table>
<br /><br />
<table width="830">
<tr>
<td> </td>
<td colspan="2"><strong>buildTags()</strong></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><em><?php buildTags('lesbian,amateur,sex');</em> ?></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><strong>Parameter List</strong></td>
</tr>
<tr>
<td width="21"><strong>1</strong></td>
<td width="89"><em>String</em></td>
<td width="720">Comma separated list of words</td>
</tr>
<tr>
<td> </td>
<td><strong>Returns</strong></td>
<td><em>Returns the input string, but with the words replaced by hyperlinks to search results for the given words. </em></td>
</tr>
</table>
<br /><br />
<table width="830">
<tr>
<td> </td>
<td colspan="2"><strong>displayPlayer()</strong></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><em><?php displayPlayer($rrow,640,480,true);</em> ?></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><strong>Parameter List</strong></td>
</tr>
<tr>
<td width="21"><strong>1</strong></td>
<td width="89"><em>Array</em></td>
<td width="720">Array containing all of the database 'content' table results for a given video</td>
</tr>
<tr>
<td><strong>2</strong></td>
<td><em>Interger</em></td>
<td>Width of output video</td>
</tr>
<tr>
<td><strong>3</strong></td>
<td><em>Interger</em></td>
<td>Height of output video</td>
</tr>
<tr>
<td><strong>4</strong></td>
<td><em>Boolean</em></td>
<td>Auto-start true/false</td>
</tr>
<tr>
<td> </td>
<td><strong>Returns</strong></td>
<td><em>Returns a video player in the provided size. If it's a hosted or hotlinked video, flowplayer will be shown - otherwise if it is an embedded video it will show the embedded video resized to the inputted sizes.</em></td>
</tr>
</table>
<p>Please note: Some of the functions start with an underscore. The reason for this is that many of these functions were introduced later in the script, after similarly named functions may have been custom created by customers in their installations. If these customers were to update thier script and these functions were to already exist, it would make the script </p>
</div>
</div>
</div>
<div class="content collapsible collapsed">
<h3 class="api-head head"><i class="ion ion-arrow-down-a"></i> SEO / Titles / Metatags</h3>
<div class="contents">
<div class="text">
<p>Most of the files in the root of the site have some variables listed at the top which are used to specify the title and metatags for this page. For example, if you open up contact.php you will see the following:<br />
$title = 'Contact Us'; <br />
$headertitle = 'Contact Us'; <br />
<br />
Just about every static file in the root directory will have variables like this inside of it which you can set. For pages that are generated dynamically, such as the index page, search results, most popular, etc., you can set these along with their metatags in includes/inc.seo.php. Once you are in there, it will be quite self-explainatory.</p>
<p>On channels, you can manually enter meta keywords and descriptions per channel. You can also use the description field to add unique text to the channel pages. You can pull the description field on the appropriate templates by using <? echo $catdesc; ?></p>
</div>
</div>
</div>
<div class="content collapsible collapsed">
<h3 class="api-head head"><i class="ion ion-arrow-down-a"></i> Cron Jobs</h3>
<div class="contents">
<div class="text">
<p>There are several cron files currently available in the script (unless you had others added). They are all located in the admin/ directory.<br />
cronPublish.php - Each time this is executed, x number of video gets published from the publish queue. In the config file, you can specify the number of videos to get published each time this is run.<br />
xml_cron.php - This file will download videos from your added xml feeds to the approval queue.<br />
encoder_cron.php - This is optional and will start up the encoder<br />
cronTagcloud.php - This script grabs all the keywords used on all videos and populates the keywords table in the database. This can later be used to generate a tagcloud, and is used to populate the tags page.<br />
cronRelated.php - This script generates a list of videos related to other videos.</p>
</div>
</div>
</div>
<div class="content collapsible collapsed">
<h3 class="api-head head"><i class="ion ion-arrow-down-a"></i> Output Feeds</h3>
<div class="contents">
<div class="text">
<p>There is currently two methods to feed external sites with your content. One is the API - addressed below - and the other is a text based feed, used typically to send data to aggregator sites.<br />
Your feed can be accessed at: http://www.domain.com/index.php?controller=wmfeed&format={FORMAT}&limit={AMOUNT}. Format must be a string with fields separated by pipes (username|title|url|etc). Limit is a interger value of the max number of videos to display. If no limit is defined, it defaults to 1000. You can also add utm_source, utm_campaign, and utm_medium to your query string, and they will be appended to your output URLs.<br />
The following values can be used in the format string:</p>
<table width="830">
<tr>
<td> </td>
<td colspan="2"><strong>Format String</strong></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><em>http://www.domain.com/index.php?controller=wmfeed&format=url|title|keywords|embed</em></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><strong>Parameter List</strong></td>
</tr>
<tr>
<td width="21"><strong>1</strong></td>
<td width="89"><em>username</em></td>
<td width="720">Username of uploader</td>
</tr>
<tr>
<td><strong>2</strong></td>
<td><em>url</em></td>
<td>Url to video page</td>
</tr>
<tr>
<td><strong>3</strong></td>
<td><em>embed</em></td>
<td>IFRAME embed for video</td>
</tr>
<tr>
<td><strong>4</strong></td>
<td><em>length</em></td>
<td>Duration of video in seconds</td>
</tr>
<tr>
<td><strong>5</strong></td>
<td><em>title</em></td>
<td>Title of video</td>
</tr>
<tr>
<td><strong>6</strong></td>
<td><em>description</em></td>
<td>Description of video</td>
</tr>
<tr>
<td><strong>7</strong></td>
<td><em>main_thumb</em></td>
<td>URL to main thumbnail</td>
</tr>
<tr>
<td><strong>8</strong></td>
<td><em>all_thumbs</em></td>
<td>Comma separated list of all thumbs</td>
</tr>
<tr>
<td><strong>9</strong></td>
<td><em>pornstars</em></td>
<td>Comma separated list of model names</td>
</tr>
<tr>
<td><strong>10</strong></td>
<td><em>channels</em></td>
<td>Comma separated list of channels</td>
</tr>
<tr>
<td><strong>11</strong></td>
<td><em>keywords</em></td>
<td>Comma separated list of keywords</td>
</tr>
<tr>
<td> </td>
<td><strong>Returns</strong></td>
<td><em>Output in format defined above, one video per line</em></td>
</tr>
</table>
</div>
</div>
</div>
<div class="content collapsible collapsed">
<h3 class="api-head head"><i class="ion ion-arrow-down-a"></i> API</h3>
<div class="contents">
<div class="text">
<p>Current API documentation is located at http://www.domain.com/api/. If you would like to disable the public API, you can simply rename or remove the entire /api/ directory. It is completely standalone and does not effect any other code in the script.</p>
</div>
</div>
</div>
<div class="content collapsible collapsed">
<h3 class="api-head head"><i class="ion ion-arrow-down-a"></i> Script Configuration Options</h3>
<div class="contents">
<div class="text">
<p>You may edit the configuration file using ftp located at /admin/config.php. Here you can set stuff such as the cache time for pages (in seconds), the maximum thumbs per page, and so forth. Everything or almost everything in here will have a comment behind it explaining what it does, so I probably don't need to tell you too much about this as it will be pretty self explainatory once you are in there. Again, this file must be edited via ftp. If you try to access it via http, it will return a blank white page.</p>
</div>
</div>
</div>
<div class="content collapsible collapsed">
<h3 class="api-head head"><i class="ion ion-arrow-down-a"></i> Tips & Tricks</h3>
<div class="contents">
<div class="text">
<p>
- You can select the 'main thumbnail' for a video by clicking the thumb in existing content or publish queue.<br />
- Make sure imagemagick's mogrify command is installed into /usr/bin/mogrify or /usr/local/bin/mogrify. It will vastly improve the thumbnail quality!<br />
- Keep an eye out for updates in the news box in the admin area. Due to the unencoded nature of the script, we cannot automatically push updates to you.<br />
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<? require "footer.php"; ?>