• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] How to add ads to the left sidebar on homepage manually?

Started by Lunar,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LunarTopic starter

I'd like to add ads under the left sidebar to be displayed on the homepage. How can this be done?

Do I need to paste the code somewhere in sidebar.php?

Thank in advance.
  •  

PHPVibe A.

Hi ,
you create an ad and spot for left-sidebar (for example) and paste the code for the spot in sidebar.php (it needs php bracelets).

for my example:

echo _ad('0','left-sidebar');


or (if not between bracelets)
<?php echo _ad('0','left-sidebar'); ?>


PHPVibe A.

For the other question you had misplaced.

You can use:

if(com() == profile) {
//code here for profile only
}


You can find the seo page definitions in root, file vibe_setts.php

LunarTopic starter

  •  

conghandang

I want fixed ads left and right sidebar...! when i scroll down..! How can I do?

Can you hepl me? Thanks.
  •  

Marius P.

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!
  •  

conghandang

Ok Thanks @Mario...hii,.I think It is simple way! but is not for me!
  •  

demonguru18

I am fan of PHP Vibe
  •  

maverickbk1

what php file can i place

<?php if($channel_id == "4") { ?>
<p>{your ads code}</p>
<?php } ?>

to display above right sidebar?above suggested videos v3? plzz help
  •  

Marius P.

To the right sidebar file tpl/main/sidebar-right.php


You may want to do


if((com() == "channel") && ($channel_id == "4")) {



to suppress errors.
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!
  •  

maverickbk1

i dont have the file . im using phpvibe 3 ,i know its a bit outdated but the lay out is different please help. the topic is no longer available  i dont know where in sidebar.php if thats the correct file to place it .
  •  

Marius P.

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!
  •  

maverickbk1

theres no theme. i need the ads to appear according to channel. papasjunk.com i need to edit it in video.tpl.php. a full working example would be helpful. thank you.

i tried

<?php if((com() == "channel") && ($channel_id == "4")) {
?>
<p>{your ads code}</p>
<?php } ?>

but it breaks the page.
  •  

maverickbk1

i updated to phpvibe 4 but i need to add my ads according to channel . How do  accomplish this. please provide specific file name and code it would help me alot, thanks
  •  

PHPVibe A.

Hi! From what I understand you try to add ads to the video page according to channel?

if($video->category == 3) {
//ad code
}


change 3, you can work with tpl/main/video.php

maverickbk1

Excellent that worked thank you very much.  :-X I would like to know how to fix some minor css issues. my footer logo is slightly out of the screen on desktop . also a huge void after video player after  remote import link is added. pleas help seems remote imported videos have a huge gap between video player and social like. php vibe 4 thank and sorry for the bother
  •  

Similar topics (7)