• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] ads on homepage.

Started by aryan2029,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

aryan2029Topic starter

Dear support.

i tried a lot to put ads on home page but failed,
i tried:
http://www.phpvibe.com/forum/how-to/ads-on-homepage
http://www.phpvibe.com/forum/how-to/how-to-add-ads-to-the-left-sidebar-on-homepage-manually

when i put the code inside the tpl**home, and create ads spot the site does not load.
i'm not good at coding but still trying. if you give me the php code to place in a page or put my adsense code to some place please give me the address of the page.

i place my adsense code in to video-loop.php and it show the ads on home page, but problem is that it show ads on every blocks create at home page. i use three blocks and it is very nice and fine for me but when i click on videos channel it show ads after every channel name. < i would have 10 channel and when i click on channel it shows 10 ads which is a problem.

Dear @mario, please recommend me to place 3 google ads on home page. i'm very new to php please help.
Please keep in mind i use UltimaTube themes, and don't want to place ads at both side of the page.
thank you very much in advance.
  •  

Marius P.

So, let me get this right, isn't it easy to simply remove the add from channels page for you?
I can give you that quick fix, if you confirm this is what you need.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

aryan2029Topic starter

Dear @Mario,
Thank you very much.

this is what i want...
i want to show 3 google adsense ads at home page, and at browse videos section.

right now i put 1 adsense code into the video-loop.php at and it show ads at every block of home page and after every video channel.


ps. i'm very sorry about my bad english, if you didn't understand please let me know... i will attach screen shots so you could better understand.
if you need account access please let me know i will pm you.
regards,
  •  

Marius P.

I assume in video loop you have an ad call like:

echo _ad('0','your-chosen-name');


right?


You can just wrap it in an if like:


if(com() !== channels) {
echo _ad('0','your-chosen-name');
}



This way the ad spot will not render on the channels list.

Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

aryan2029Topic starter

Quote from: @Mario on
I assume in video loop you have an ad call like:

echo _ad('0','your-chosen-name');


Dear mario i don't have this code in my video-loop.php, i am going to post some screen shots for better understanding,

1st attachment is home page, if i create 10 home page blocks from admin panel it will show 10 ads in every block starts,
2nd attachment is from video channel page, it will show 1 ads before a channel name. if i have 10 channel it will show 10 ads too.

please keep in mind i have added only 1 code in video-loop.php... all these ads are from 1 ad code.



Dear mario, if they are not fixed or you don't understand again i ask you simple question.
i want my home page show 3 google ads.... and please let me how to put ads on home page ???



  •  

Marius P.

Show me the code change you did.
I hope I've understood right what you need.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

aryan2029Topic starter

/public_html/tpl/UltimaTube2/video-loop.php

i open the video-loop.php with notepad and put the code at the top of the script.
i'm sorry i don't know coding so much.
  •  

Marius P.

Ok, then do this:

<?php if(com() !== channels) { ?>
put here all that javascript/ad code
<?php } ?>




Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

aryan2029Topic starter

Thank you very much... it doesn't show ads in channel section, but it show in every block
if i have 10 block then it show 10 ads at home page
  •  

Marius P.

Uff, indeed videoloop is a main global.

Try this (very dirty hack, but...):

instead of

<?php if(com() !== channels) { ?>



do this:


<?php 
if(!isset($z)) {$z = 1;} else {$z++;}
if((com() !== channels)  || ($z >= 3)){ ?>
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Marius P.

Never-mind, it will not work.
0:51 here the time, way to tired.
I will test tomorrow and come up with a solution for you.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

aryan2029Topic starter

Thank you very much.
see you tomorrow.
  •  

Marius P.

You can do this for now:


<?php if((com() !== channels) || (!com() || empty(com()))) { ?>



to remove it from both home and channels.
I'll guide you trough adding it 3 times in home.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Similar topics (7)