Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

help placing Longtail ads in phpmelody 1.6

40 replies [Last post]
Reply

Hi

I use phpmelody 1.6 and installed latest jwplayer
Please help me to place ads in the video
the existing code for the player is

div id="Playerholder">
You need to have the <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> installed and
a browser with JavaScript support.
</div>
{literal}

<script type="text/javascript">        
var flashvars = {
file: '{/literal}{$smarty.const._URL2}{literal}/videos.php?vid={/literal}{$video.uniq_id}{literal}',
enablejs: 'true',
backcolor: '{/literal}{$smarty.const._BGCOLOR}{literal}',
frontcolor: '{/literal}{$smarty.const._TIMECOLOR}{literal}',
screencolor: '000000',
repeat: 'false',
autostart: '{/literal}{$smarty.const._AUTOPLAY}{literal}',
type: 'video',
logo: '{/literal}{$smarty.const._WATERMARKURL}{literal}',
linktarget: '_blank',
link: '{/literal}{$smarty.const._WATERMARKLINK}{literal}',
bufferlength: '5',
controlbar: 'over'
};

var params = {
wmode: 'window',
allowfullscreen: 'true',
allowscriptaccess: 'always',
allownetworking: 'all'
};

var attributes = {};

swfobject.embedSWF('{/literal}{$smarty.const._URL2}{literal}/jwplayer.swf', 'Playerholder', '{/literal}{$smarty.const._PLAYER_W}{literal}', '{/literal}{$smarty.const._PLAYER_H}{literal}', '9.0.115', false, flashvars, params, attributes);
</script>
{/literal}

help me to modify this code to work with ads

Thanks

Vendan

Reply

Underneath:

repeat: 'false',

Add

plugins: 'ltas',
'ltas.cc': 'YOUR CHANNEL CODE',

You get the channel code from your Dashboard.

Reply

Thanks alot Ethan that worked.

Cheers

Reply

NP! :-D :)

Reply

thx Ethan for your help but when i apply that ads appare in the top of the video plz help :s http://www.gossip-kech.info/im-not-a-superstar-dj-antoine-mix/im-not-a-superstar-dj-antoine-mix-vide...

Reply

This is because you need to wrap another div tag around your div, when using swfobject 2. Also make sure you set wmode to transparent.

Reply

hi after adding this ads show up but it hide play button and align the player to left side, how to show a button "close this to play"

thanks ..

Reply

am sorry ethan i dint see ur post .. after setting up wmode to transparent it ads showing correctly .. but player still align to left side and i dint understood warping div tag around div tag. can u pls explain a bit .

thanks ..

Reply

@royal monde - Your page's CSS and our AdSolution's CSS are probably clashing. Can you show me the link to where you are running this?

Reply

Hi Ethan,

I use php 1.6.3. The above 2 lines of code did the trick and the ads are now displayed. But once i Close the Ad I'm not able to play the video.The player seems to freeze.

sample link: http://www.webisodesite.com/musicvideo.php?vid=c0633d739

Thanks,
Vasudev

Reply

Disable autostart, since you are using prerolls anyways. This will fix it.

Reply

Thanks Ethan, it worked.

How can I use post-roll, midrolls and overlays as well?

Reply

Np! Glad it worked! :)

To use the other ad units, you just have to activate them in your Dashboard account.

Reply

I'm a little confused. Can you tell me precisely what I need to do to activate another Ad Units?

Thank you

Reply

Go to - https://dashboard.longtailvideo.com/

Go to Setup - Click Edit.

You can check off the midroll and postroll spots here.

Reply

Hi i did all this but it does not work, all i see is the video and on top of that a loading image.. do i need to modify anything besides

Reply
Underneath:

repeat: 'false',

Add

plugins: 'ltas',
'ltas.cc': 'YOUR CHANNEL CODE',

You get the channel code from your Dashboard.

Reply

You don't need to modify anything else.

If you can't get it working, provide a link.

Reply
Reply

You need to change - controlbar: 'over'

To - controlbar: 'over',

Add add the AdSolution variables under there.

Reply

I made the changes and is still not working

here is the code:

{literal}

enablejs: 'true',
backcolor: '{/literal}{$smarty.const._BGCOLOR}{literal}',
frontcolor: '{/literal}{$smarty.const._TIMECOLOR}{literal}',
screencolor: '000000',
repeat: 'false',
autostart: '{/literal}{$smarty.const._AUTOPLAY}{literal}',
logo: '{/literal}{$smarty.const._WATERMARKURL}{literal}',
linktarget: '_blank',
link: '{/literal}{$smarty.const._WATERMARKLINK}{literal}',
image: '{/literal}{$video.preview_image}{literal}',
bufferlength: '5',
controlbar: 'over',
plugins: 'ltas',
'ltas.cc': 'prqjbxcllejrulb'
};

var params = {
wmode: 'transparent',
allowfullscreen: 'true',
allowscriptaccess: 'always',
allownetworking: 'all'
};

Reply

The issue is that you have autostart turned on - http://www.citymio.com/index.php

Turn it off. It will fix it.

Reply

i use php melody from 1.6.3 to 1.6.6
and i update the jpayer by just replacing *.swf
it work nice ( flv payer dot work any more it fix it on player.tpl )

but when i try to add the channel code !! not working

i try to fix it on tpl ( template file) as you said before but no chance
i thought that may be it msut be changed on other file like functin.php or ajax.php of php melody script

any way i think it will not be working because script use his own swfobject.js and dont use jwplayer.js

Reply

this an example
http://zdig1.biz/video/musicvideo.php?vid=8fe1d2eeb

ajax.php

else if ($video['video_player'] == 'jwplayer')
{
$embed_code  = '<embed src="'. _URL .'/jwplayer.swf" ';
$embed_code .= ' width="'. $config['player_w_favs'] .'" height="'. $config['player_h_favs'] . '"';
$embed_code .= ' scale="noscale" bgcolor="'. _BGCOLOR .'"';
$embed_code .= ' type="application/x-shockwave-flash" allowFullScreen="true" ';
$embed_code .= ' allowScriptAccess="always" wmode="transparent" ';
$embed_code .= ' flashvars="';

function.php

$embed_code .= '<embed src="'. _URL .'/jwplayer.swf" ';
$embed_code .= ' width="'. _PLAYER_W_EMBED .'" height="'. _PLAYER_H_EMBED . '"';
$embed_code .= ' scale="noscale" bgcolor="'. _BGCOLOR .'"';
$embed_code .= ' type="application/x-shockwave-flash" allowFullScreen="true" ';
$embed_code .= ' allowScriptAccess="always" wmode="window" ';
$embed_code .= ' flashvars="'. $jw_flashvars .'">';
$embed_code .= '</embed>';
$embed_code .= '</object>';

and player.tpl is the one showen on othe post

{literal}
<script type="text/javascript">
var flashvars = {
{/literal}
{if $video.source_id == 3}
{literal}
file: '{/literal}{$video.direct}{literal}',
{/literal}
{else}
{literal}
file: '{/literal}{$smarty.const._URL2}{literal}/videos.php?vid={/literal}{$video.uniq_id}{literal}',
type: 'video',
{/literal}
{/if}
{literal}
enablejs: 'true',
backcolor: '{/literal}{$smarty.const._BGCOLOR}{literal}',
frontcolor: '{/literal}{$smarty.const._TIMECOLOR}{literal}',
screencolor: '000000',
repeat: 'false',
autostart: '{/literal}{$smarty.const._AUTOPLAY}{literal}',
logo: '{/literal}{$smarty.const._WATERMARKURL}{literal}',
linktarget: '_blank',
link: '{/literal}{$smarty.const._WATERMARKLINK}{literal}',
image: '{/literal}{$video.preview_image}{literal}',
bufferlength: '5',
controlbar: 'over'
};

var params = {
wmode: 'window',
allowfullscreen: 'true',
allowscriptaccess: 'always',
allownetworking: 'all'
};

var attributes = {
name: '{/literal}{$video.uniq_id}{literal}',
id: '{/literal}{$video.uniq_id}{literal}'
};

swfobject.embedSWF('{/literal}{$smarty.const._URL2}{literal}/jwplayer.swf', 'Playerholder', '{/literal}{$smarty.const._PLAYER_W}{literal}', '{/literal}{$smarty.const._PLAYER_H}{literal}', '9.0.115', false, flashvars, params, attributes);
</script>
{/literal}

Reply

Change all references of:

controlbar: 'over'

To:

controlbar: 'over',
plugins: 'ltas',
'ltas.cc': 'your_id'

your_id you get from your dashboard account.

Reply

done but still have no affect

http://zdig1.biz/video/musicvideo.php?vid=cb48d5e23

i must have a licence one ?

Reply

or i must have any add on ???

Reply

for mid roll it is ok

but for pre and post roll no working
i added my own tag ( cpm erano not nedd clik like other platform)
ani idea !

Reply

For running your own ads, in the Dashboard account, make sure to go to Run Your Own Ads > Target Ads, to set up the mappings correctly.

Reply

This is because you need to wrap another div tag around your div, when using swfobject 2. Also make sure you set wmode to transparent.

Reply

is is because you need to wrap another div tag around your div, when using swfobject 2. Also make sure you set wmode to transparent.http://newtopshop.net/Pandora-Beads-With-Stones-category-4.html

Reply

Yep! You got it.

Reply

please help me,I didn't understand at all.
I have made my videosite at http://www.extrafilmovi.com/ and I want to stream movies from world movies site youtube,sevenload etc
and I want to know how to insert TITLE plugin.
I will give more informations just ask,I really don't know what you need...

Reply

There is no such thing as the TITLE plugin. We also don't support sevenload.

Reply

I understand that.
I need captions plugin,and where to insert it,and what to edit...
help pls

Reply
Reply

I know that but please give me intructions which file I need to edit,do I have to insert ( upload ) something...

Reply
Reply

Hello,

I am using PHP Melody 1.6 and my site name is www.sportyhub.com

I want to put the overlay ads in front on my videos. I am searching all over the internet but i couldn't able to find that.

Please help me with the Overlay ad code that are used to put in front of the videos.

Please reply ASAP on my email id meetvarunabrol@gmail.com

Reply

Do you have an AdSolution account?

Reply

Hello Sir,

My name is Varun Abrol and I am the owner of www.sportyhub.com. I am using PHP Melody 1.6 video script for my site and as my site is related to video, therefore, I want to use the OVERLAY ADS for my videos. In that, I want to put the ads in front of my videos or in pause or in lower section of the player etc.

I am providing one example by which you all could understand:::
http://www.mycricketvideos.com/Highlights-Free/pakistan-vs-sri-lanka-asia-cup-highlights-3rd-odi-mat...
Also I have seen on your site::: http://www.longtailvideo.com/support/open-video-ads/13060/configuring-ova-to-deliver-overlay-ads

Please reply me with the code of Overlay Ad for the PHP Melody by which adsense ads, clicksor ads could be placed in front of the site videos. If you required any thing please feel free to tell me.

Varun Abrol
meetvarunabrol@gmail.com

Reply

@Varun - You need to edit the TPL file for the player to add the "ltas" plugin to do. I am not sure which file specifically it is though, as PHP Melody is not our product. The two variables to add though are the ltas plugin and a variable called ltas.cc, which is your AdSolution channel code, which you get from your Dashboard account.

Post new comment

  • Allowed HTML tags: <code> <blockquote> <em> <strong> <strike> <ul> <li> <ol>
  • You may post code using <code>...</code> .
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options