Support Forums - Classified Ads Script Osclass

Osclass plugin support => Banners & Advertisement Plugin => Topic started by: slicer on February 03, 2018, 05:37:48 AM

Title: Banner ID
Post by: slicer on February 03, 2018, 05:37:48 AM
Hello, look everything seems to be working fine, I can see my banners etc... But I got a question: where can I find Banner ID?

there's a reference about that but I can't find that thing to manually insert banner's code like:
Code: [Select]
<?php if(function_exists('osp_banner_button')) { osp_banner_button({banner_id}); } ?>
So if I manually wants to decide wich banner is on X position or Y for Payment Plugin to cooperate.
Title: Re: Banner ID
Post by: slicer on February 04, 2018, 07:06:00 AM
I found the ID's but the banner only shows up when I use
Code: [Select]
<?php if(function_exists('ba_hook')) { ba_hook('my_custom_hook'); } ?>
If I use for example for specific banner
Code: [Select]
<?php if(function_exists('osp_banner_button')) { osp_banner_button(2); } ?> it shows the text: Advertise here!

if the user ask for that banner and pay for it, the ad won't show up.
Title: Re: Banner ID
Post by: MB Themes on February 05, 2018, 11:22:33 AM
@slicer
Banner ID is hidden (you could see it on page's source code), will show it as readonly in next version.

The code you've posted is correct, it's showing just button. You put hook line above, so final setup is like:
Code: [Select]
<?php if(function_exists('ba_hook')) { ba_hook('my_custom_hook'); } ?>
<?php if(function_exists('osp_banner_button')) { osp_banner_button(2); } ?>

could be improved a bit... you could use also ba_show_banner($id) to show banner.
Title: Re: Banner ID
Post by: slicer on February 05, 2018, 11:28:10 PM
Amazing man ^_^ works really awesome  ;D

ba_show_banner($id) is tricky because we can set different places and display different banners.
Title: Re: Banner ID
Post by: MB Themes on February 06, 2018, 08:19:50 AM
Cool ;)