Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 7    Views: 63

richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
05/08/14 10:21 PM (10 years ago)

Banner Ads in Plugins

Hi Guys. I have been away for nearly a year due to inability to get US Tax ID sorted - done at last (almost). I am about to make an app for a small local magazine in Northern Thailand. Most of the advertisers (about 95%) will not have a web link so that is not my question here. Placing the banner ads on the PDF pages is not a problem but I also want to place banner ads at the bottom of the menu plug ins. Is this possible and if so where would I find the code and how would I place the code? Thanks in advance. Richard
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
05/08/14 10:29 PM (10 years ago)
I'm not sure why I'm replying; I've never used anything like those… but… if it's apples 'iAds', there is support built into BT. For the others (and Android), the SDK you choose usually gives you instructions on how to insert it into your app/plugin. Figure out 'which' kind you want to use, and check out their installation instructions to see which one fits you better. Cheers! -- Smug
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
05/08/14 10:48 PM (10 years ago)
Hi Smug. Thanks for the quick response. You were a great help a year ago when I tried to start this. I have just briefly looked at iAds and really, for what I want, I think Apple is just too big. Most of the magazines present advertisers have a logo and a telephone number. So the banner ads will be very basic. Also I am not advertising my app. I know this sounds strange but the magazine is 38 months, hence 38 issues, old and prints 2000 copies per month. It has a huge following locally but not even nationally. Local people will send a link to family and friends abroad but that's it. From my point of view it is a way to get my first app up and running. I have been thinking about this all morning and I think I just need to insert some code in the Xcode plugins. I may just have to leave adverts off the menus for now and just stick to the PDF's. Thanks, Richard
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
05/09/14 02:44 AM (10 years ago)
Well, if you don't mind digging in the code a little, you can always insert your own banner 'view' to display whatever you wanted, however you wanted it. It's pretty basic, but in my apps (and in my plugins 'usually') I have a little banner space on top of almost every screen, that I pawn out to local vendors as a partial revenue stream. It's not organized at all, lol! It's just a URL pointing to a php script that rotates banners, and my company banner if the app is offline. I got most of the display code from Susan's menu with image plugin, modified slightly for my needs, which are sparse at best. Maybe some similar method might work for you... Cheers! -- Smug
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
05/09/14 02:49 AM (10 years ago)
Sounds like what I need. Apple don't mind? You say "got most of the display code from Susan's menu" which plugin? Thanks Ricard
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
05/09/14 03:11 AM (10 years ago)
"Menu with Image". But Chris1's "Menu with Image Advanced" has the same kind of code for his banner as well. Or if you have my Smug Climate plugin, and I think Location Menu has it too. any one of those has code that will allow for a banner "in" the app, or from a dataURL. Just create a few banners for testing or real world use, and this script (rename to .php) handles the banner: https://dl.dropboxusercontent.com/u/115208762/rotateimage.txt I'm not sure if Apple minds or not, lol! They didn't say anything, and I didn't ask, heh heh. Cheers! -- Smug Edit: Basically you put all the banners in a directory on your server somewhere, and call the rotating banner script as your dataURL value… (http://www.yourserver.com/file/path/rotate.php)
 
trouty
I hate code!
Profile
Posts: 338
Reg: Mar 26, 2013
London Outskirt...
4,830
like
05/09/14 08:40 AM (10 years ago)
that looks like a cool script! I tried it (dumped it into my BT-server/images folder as a test) and ran it through MacImageGallery as a data source, but it didnt work :o/
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
05/09/14 03:33 PM (10 years ago)
I don't want to sound silly, but did you change the suffix to 'php' rather than 'txt' ? And of course, you need PHP on the host server too... I have it on my servers, and it's been humming flawlessly for over a year now on a couple of different apps… Of course, it 'might' have something to do with php version, but I'm not sure… Cheers! -- Smug
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.