MyBB Central

Full Version: Want some advice to setup a new feature in my Forum.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I have a forum powered by MyBB and I want to start an adsense revenue sharing program for my members. I have searched a lot about this type of MOD but failed. I think there is no such mode for mybb.
So, I am thinking to make one by myself for my forum. I don't know PHP, but I know html partially. But still I think that I can setup this for my forum through someone support who know PHP. Actually, I do not necessarially need an automated MOD like other. I also want to do it manually.

First of all, I need the following features for my MOD.

1) Ads of the members who post a new thread will show after the first post in the topic. (Probablly 100% of views because I think splitting into fractions may be difficult)
2) Ads of the last poster in the specific thread will show after the last post in the topic. (This one I think also should be 100%)
3) I am talking about only Google Adsense.

Now, I have the following things to do this in my mind.

1) When someone post a new thread, all the data of the specific member is taken from his profile. I am talking about signature, post count etc. When I opened the templates, I have seen many codes representing all these things. For example "Signature" is represented by "{$post['signature']}" and other things are also like this.
So, what I am thinking is that first of all we make a custom profile field (signature is also a profile field) and then we will add it in the template where we want to show ads. Let us say it is "{$post['first_member_ad_ID']}" and insert it in the space between first post in the topic and second post in the topic. Here we should also specify that only ads of first poster in the topic should be shown. On the board index, It is shown in front of forums the last poster in that forum and also his name. So, i think it is also possible to insert the ad code of first poster in the place we want. I mean that we can insert "first_member_ad_ID" after the first post in the topic in the same way as poster's "username" is shown on the board index page.
Now, i want to say some thing about how can we insert it after the first post. For this, I think mybbcenteral have also created mod named something like "Ad management" which can show ads after the first post. So, we can replace the adsense ID in the code which we put in "Ad management" MOD with the code "{$post['first_member_ad_ID']}" , which should represent first poster's ad ID.

2) for ad after the last post in the topic, I think the procedure should be the same. Only we have to use the ad ID of last poster in the topic and the rest is the same. I am currently running adsense ads after the first post and last post in the topic in my forum. I have manually added the ad code after the last post in the topic.

So, I only need help with PHP. Can someone make the php codes representing the Ad IDs of first poster in the topic and the last poster in the topic. Please help me. I am really in need of this MOD. I think someone will help me after the above explanation.

Use Labrocca's My Ad Manager Plugin.

You Need To Be A Subscriber Big Grin