MyBB Community Forums

Full Version: Ads after X posts Adsense and Inline ads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
This mod works very well and I believe I have fully tested it.  The only negative is if you want to change your seperator you will need to edit the code.  

Features:
  • no core file changes and only 1 automated template change
  • you can align the inline ads left, right, or center
  • Ability to turn on and off in board settings
  • 3 ways to place the code (after first post only, after X posts, after first post plus every X posts)

Instructions:
1. Save the attached file adsafp.php and upload to your inc/plugins/ directory.
2. Activate plugin within your admincp.
3. Change settings in admincp under "Board Settings". You should see a "Ads after first post" setting group.  There you can add your full adsense code and change other parameters.

I just want to thank the original author Michael83 for starting this plugin.  It also would be a good base to add a revenue sharing hack for the forums. I might tackle that next.  :-)

Feel free to ask any questions or report any bugs in this thread and I will do my best to assist you.

Enjoy.

[edit]MOD removed as per request of original author[/edit]
To be honest: I'm not happy about distributing this plugin as 90% of the code is taken from my plugin. At least you could have asked me for permission.

I already finished version 2 which is compatible to MyBB 1.2, fixes a minor bug and there's no need to make changes to the code anymore (thanks Chris!). It will be published after the release of MyBB 1.2.
I will remove the plugin on your request. However you should add a license.txt to your files if you don't want anyone to improve them and redistribute. IMHO this is an open source project and developers should be happy when their code is improved. I spent hours yesterday trying to get this working and it's a shame that no one else will benefit from that.
You should have talked to micheal first.
In the future I will. I am now looking into rewriting my mod entirely so that his code isn't used. I may make this a revenue sharing mod which I know has been requested many times.
labrocca Wrote:I will remove the plugin on your request. However you should add a license.txt to your files if you don't want anyone to improve them and redistribute.
He did create it... You'd think that if you wannted to modify and redistribute you'd ask. Because it's not your code to begin with.
labrocca Wrote:IMHO this is an open source project
open source project? It's only open source if the author releases it like that..
labrocca Wrote:and developers should be happy when their code is improved.
What if Michael's verision for 1.2 does the same exact stuff as your and the code is better? Just a thought I had...
labrocca Wrote:I spent hours yesterday trying to get this working and it's a shame that no one else will benefit from that.
I guess, the rule of thumb is ask first!
The code is open source..I don't believe you understand what that means.

Also he didn't add any license.txt or note about modifying or distributing the code. 99% of coders do that. If you don't want your code released then you say so.

This is from the readme. Nothing there about modyfing. He could easily have added that.
Quote:### UPDATE ###
Deactivate the plugin in your Admin-CP. After that upload the new plugin file into the folder inc/plugins/ and overwrite the old one. Replace the old code in the file inc/functions_post.php through the new code that you can find above. After that you can activate the plugin again.

### NOTE ###

You agree that the author of this plugin will not be held responsible for anything which may happen as a result of downloading, installing or using any of the files that you are downloading, including any instructions included in the download.

### CHANGELOG ###

1.5
- Ability to show ads after x posts
- The ads are shown after the first post on each page
- No queries

1.0
- First release

Go check yourself.
http://mods.mybboard.com/view.php?did=197

I am not sure what the big deal is..I credited him as original author and when he even peeped about my release I immediately deleted. I just offered him some friendly advice about license to prevent future problems.


As it stands...my code was better and it was ready for 1.17. It would take 2 small changes to be 1.2 ready. How do I know he won't use my changes and hard work that I put into it? If he had it updated and ready why not release it? Just a thought I had...

And I don't mind spending the time because honestly I enjoy coding and I needed to learn how to hook into the plugin system. It was my first attempt at a plugin and other than 1 snag it wasn't too bad. I will be definetly using the code on a couple of my own sites so the time was not wasted at all.

Thanks for posting. This thread might be better served moved to Off Topic since it no longer is a code modification thread.
labrocca Wrote:I will remove the plugin on your request.
I never requested to remove your files. I just said that you could have asked me about using my code.

You're right, there's no notice about modifying and redistribution in the readme file. That is because on the old mods site there was a disclaimer which exactly said that your not allowed to redistribute the plugin/theme/... without the permission from the author. This message before the downloads is gone on the new site.

Nevertheless is something someone produced copyrighted by the author.

labrocca Wrote:If he had it updated and ready why not release it?  Just a thought I had...
I did not release the new version because the actual one works as expected. As MyBB 1.2 will be released soon I made sure that it is compatible with this version. If you want to take a look into the code send me a PM with your email address.

I didn't and don't want to sound rude but it's not the nice way to use the code another person made without even asking about that.
Michael83 Wrote:I didn't and don't want to sound rude but it's not the nice way to use the code another person made without even asking about that.

Oh I agree. I worked late on the mod and after it was all working I just decided to release it. Yeah I realized I should have asked first but I used to write mods for phpbb, oscommerce, and other open source projects. Most authors simply want credit which I did give you. Here at mybb I think some of the programmers and designers are a bit touchier on the subject. I see restrictions all the time for distribution and modifying. I have no problems with that.

I just made an assumption that since there was no license the author didn't mind. I know you didn't fully request the removal of my mod but I realized my mistake and though it best simply to remove it.

On your mybb 1.2 version what changes are there to the function itself? Any new features you can tell us about? I wouldn't mind seeing it if it had new features. Chris just gave me access the to 1.2 beta which I plan to play with this week.
It's very similar to the actual version. There are no new features, only fixes atm.
Pages: 1 2 3