Video Publisher PRO Support

FAQ ENTRY
ID36
VersionALL
SectionALL
FunctionTemplate changes
Short DescriptionThis is a basic guide to modify templates...
Full DescriptionHere is how the templates work on the script.  This applies to 1.4 and on. 

There are 3 tpl files
* index.tpl (this is the main page of the site)
* svideo.tpl (this is where individual videos are shown,and also where categories main pages are shown)
* search.tpl (where search results are shown)

You can have and arrange all the different elements of the script on that pages using html. 
There are also special includes sections that are used to show for example the video, the ads, the partners, etc.  This are explained below.

Also bellow there's attached a very stripped out version of the svideo.tpl file as sample.
------------------------------------------------

LOGO
When you want to show your logo just add this to the tpl file,

<?php
include ("logo.php");
?>

------------------------------------------------

ADS
You can have up to 20 different ad sections on your site layout.  When you want to show an ad you just add this to the tpl file,

<?php
        $section=1;
        include ("showad.php");
?>

The $section=1 specifies the section number, that can be anything from 1 to 20.  In your stie admin you can specify which ads you want for each section.  This ads of course can be of any size you want, for example you can have 4 small 125x125 ads, 1 160x600 and so on. 

------------------------------------------------

VIDEO
There are 3 different calls to show the video depending on which tpl file you are working.

For the index.tpl

<?php
               include('invideo.php');
?>


For the svideo.tpl

<?php
              include('svvid.php');
?>


For the search.tpl

<?php
              include('svsearch.php');
?>

SHOWCASE
The Showcase is the section where all the video thumbs are shown.  From version 1.4 and on you can have as many of this sections on your layout as you want, and each section can have any size you want. 

When you want to show the thumbs you use this include,

<?php
                        $scrows=15; //rows in the showcase
                        $sccols=4; //columns in the showcase
                        $vthumb1="vthumba1.tpl";
                        $vthumb2="vthumba2.tpl";
                        $dsblinks=1; //dont show more button

                         include('showcase.php');
?>

$scrows=15 specifies the number of rows, this can be any number you want.
$sccols=4 specifies the number of columns, this can also be of any number.
$vthumb1="vthumba1.tpl";  indicates the template to use for each indivudual thumb. The template can have any name you want. And for each different showcase section you can use a different thumb template or use the same for all if you prefer.
$vthumb2="vthumba2.tpl";  Same as before but for the links that go outsite of your site.
$dsblinks=1; specifies to show or not to show the more videos button section, 0 shows it, 1 don't show it.

If you want to show more than one section with thumbs, the following sections need to be like this,

<?php
                        $scrows=6; //rows in the showcase
                        $sccols=2; //columns in the showcase
                        $plusst=60; //from which video this section will start, in this case 15x4=60
                        $vthumb1="vthumba1.tpl";
                        $vthumb2="vthumba2.tpl";
                        $dsblinks=1; //dont show more but
                         include('svshow.php');
?>

Everything is the same except that you have to add
$plusst=60; this is from which video this sectio have to start, if for example the previous section was 15x4 then this number is 60

The showcase section have to be inside a div with id='showcase' If you have more than one showcase section only one should be named like that or the script will have some errors.

Following the example if you have a third section after this one it will be $plusst=72; 60 for the first section + 6x2 from the second section.

If you want you can make a section show only plugs by adding this to that section, $outin=" and outin='out' ";
If you want you can make a section show only featured videos by adding this to that section, $featured='on';
You can also combine this two options to show for example a featured plugs section.
In the next section you have to reset this or it will show the same kind of the previous section.  You reset it by adding $outin=''; or $featured='';  Here is an example.

<?php
                        $scrows=6; //rows in the showcase
                        $sccols=1; //columns in the showcase
                        $vthumb1="vthumb1.tpl";
                        $vthumb2="vthumb2.tpl";
                        $dsblinks=1; //dont show more but
                        $outin=" and outin='out' ";
                        $featured='on';

                         include('showcase.php');

?>

You can also show a section with only hosted videos using $outin=" and outin='hos' ";
You can also show a section with only embeded videos (videos from other sites) using $outin=" and outin='in' ";

FEATURED VIDEOS SLIDESHOW
To add a featured videos slideshow (the flash thing with scrolling thumbs) you add this

<?php
                          $fstart=0;  //first featured to show
                          $fend=10;  //last featured to show
                          include ("featured1.php");
?>

If you want it to be vertical instead of horizontal you have to change featured1.php with featured2.php
If you want it to show only plugs you can add this $outin=" and outin='out' "; See the sample bellow

<?php
                          $fstart=0;  //first featured to show
                          $fend=10;  //last featured to show
                          $outin=" and outin='out' ";
                          include ("featured1.php");
?>

You can also make it show only hosted videos by adding $outin=" and outin='hos' "; or to show only embeded videos by adding $outin=" and outin='in' ";

THUMB TEMPLATE
The name of the thumb template is asigned in the $vthumb1 and $vthumb2 variables.  All the parameters are optional you can specify any combination of them. You can even have a section with text links and without image thumbs. 

This is how you specify diferent things on this file

The line bellow should be included in your template if you want to show the stars for rating.
include("rshow.php"); //this line is to calculate the amount of stars to show

Address of the video
$site".$path."video/$rowpad[id]/$adr/

Thumb image addres
$thum

The name of the video
$rowpad[name]

Description of the video
$rowpad[description]

Number of views
$viex

Rating stars,
$stars

SORTING VIDEOS
You can use the search to show the videos ordered by rating and by views.  To order by rating it will be something like this
http://www.yougotfile.com/search.php?order=rating

And by views
http://www.yougotfile.com/search.php?order=views

The usual way of doing this will be to add a button in your template pointing to that link, the results that you see will be ordered by what you select.

PARTNERS
Use the following to show the partners, as with the showcase you can have your partners divided in many sections


<?php

                        $tstart=0;  //first trade to show
                        $tend=10;  //last trade to show
                        include('partners.php');

                       echo "<div class='plink1'><a href='$site".$path."trade.php'>Your Site Here</a></div>";
                       echo "<div class='plink1'><a href='$site".$path."submit.php'>Submit Link</a></div>";

?>

$tstart=0; this is the number of the first partner in this section
$tend=10;  this is the last partner to show on this section


CATEGORIES
To show the categories use this,

<?php

   include ("scategory.php");

?>