Tutorial

Insert your own add, banner, or even google adsense into the movie player. Works with Free or AdFree version. No boonex ads are removed in your Free version. You are simply placing an ad. under the boonex ad. Looks even better in the AdFree version.

Same concept can be applied to Photo Gallery pictures, and Ray Music Gallery.

Before / Original:
Before



After / With Free Version and ad inserted:
After



Tested with Dolphin 6.1.4.

File to edit:
/inc/classes/BxDolSharedMedia.php

Backup this file before making any changes just in case.

Then open the file:
/inc/classes/BxDolSharedMedia.php

Find:

    function showFile($iFile) {
        $iFile = (int)$iFile;
        $sCode = '';
       
        switch ($this->sType) {
            case 'photo':
                $aFile  = $this->getFileInfo($iFile);
                $sImage = $this->sFilesUrl.$iFile.'_m.'.$aFile[$this->aTableFields['medExt']];
                $sCode  = '<div id="viewFile" style="background-image: url(\''.$sImage.'\')">&nbsp;</div>';
                break;
            case 'music':
                $sCode  = '<div class="viewFile" style="text-align:center;">'.getApplicationContent('music','player',array('id'=>$iFile,'password'=>$this->sViewerPass,'vId'=>$this->iViewer,'song'=>'true'),true).'</div>';
                break;
            case 'video':
                $sCode  = '<div class="viewFile" style="text-align:center;">'.getApplicationContent('movie','player',array('id' => $iFile, 'file' => 'true'),true).'</div>';
                break;
        }
       
        return $sCode;
    }
   


Add your image and link code such as the following:

    function showFile($iFile) {
        $iFile = (int)$iFile;
        $sCode = '';
       
        switch ($this->sType) {
            case 'photo':
                $aFile  = $this->getFileInfo($iFile);
                $sImage = $this->sFilesUrl.$iFile.'_m.'.$aFile[$this->aTableFields['medExt']];
                $sCode  = '<div id="viewFile" style="background-image: url(\''.$sImage.'\')">&nbsp;</div>';
                break;
            case 'music':
                $sCode  = '<div class="viewFile" style="text-align:center;">'.getApplicationContent('music','player',array('id'=>$iFile,'password'=>$this->sViewerPass,'vId'=>$this->iViewer,'song'=>'true'),true).'</div>';
                break;
            case 'video':
                $sCode  = '<div class="viewFile" style="text-align:center;">'.getApplicationContent('movie','player',array('id' => $iFile, 'file' => 'true'),true).'<br><a href="http://www.link-to-somewhere.com" title="Link Title" target="_blank"><img src="http://www.yoursite.com/path-to-image.jpg" border="0" alt="Alt Text"></a></div>';
                break;
        }
       
        return $sCode;
    }
   

 

Change the http://www.link-to-somewhere.com (where you want it to go when clicked)

Title = What displays when mouse hovers over

Change the http://www.yoursite.com/path-to-image.jpg (where the image is actually located on your host/account)

alt = Alt Text (Also for when mouse hovers over)
Optional you can include in the image tag the size of your banner/image width="200" height="50" (usually not necessary but it is sometimes a good idea)


Save file and re-upload.
Refresh the movie player page to see the changes.

You will need to have a image uploaded some where on your server/host and provide the exact location to it in the img src tag, and the link you want it to go to when someone clicks on it in the a href tag.

Also you will need to find or use banner/image sizes that will actually fit this area. Do not use 700+ wide pixels size images or you will mess the page display up.

Good Luck!!

 
Written By
Tutorial by: Jeremy LeSarge (AKA Ray)

I am the owner and administrator of DialMe.com. I write Tutorials for Boonex Dolphin as well as tips and resources surrounding website programming and development. I enjoy working with WordPress, SEO, and Web Hosting / Servers. I also maintain a WordPress Blog here on this site where you will find a variety of technology and webmaster resources.

Actions
Recommend
Sponsored Links