MyBB-Plugins Forums

Full Version: Advertisements with variabile
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to put a variable in the My Advertisments mod: {$post['fid6']}
I saw that it doesn't work.

So my idea is adding some javascript code in myadvertisments.php and put the variable {$post['fid6']} in a javascript variable.

Then I'll add the javascript variable in the advertisement code.

Is this the right direction or are there other better ways?
You could do that but if you're going to use javascript to replace {$post['fid']} - which I am not sure if gets eval'd or not (can't remember if MyAdvertisements inserts the ad code after the MyBB templates are eval'd or not) - you can just use the actual value?
The value is dynamic.
Every user has a different value.

I copy here what I wrote on the mybb board.
If you already know that it's not possible/easy, this can be a feature request, and I'll pay the 7$ for it.

Quote:I added Coinurl to my board, and it works well:
Banner example:
<iframe scrolling="no" style="border: 0; width: 728px; height: 90px;" src=""></iframe>

But I want to do more.
Coinurl offer a feature called "revenue sharing".
With this code:
<iframe scrolling="no" style="border: 0; width: 468px; height: 60px;" src=""></iframe>
If I enter a Bitcoin address in share=address (ex: share=1HostFatgTXWdRmVoneC8M6ErhiuQ7An5o ), the address will get a % of the income from the click on the banner.

I have added a "Custom Profile Field" called "Bitcoin address".
So every user can now enter his own Bitcoin address in his profile.

What I trying to get is that all banners will show with the bitcoin address of the user that started the topic.
I want to give some of the income to users that actively participate to the board.

I'm using the "My Advertisements (2.0.3)" mod right now.
I tried to enter something like this:
<iframe scrolling="no" style="border: 0; width: 728px; height: 90px;" src="{$post['fid6']}"></iframe>
But it didn't work.

Can you give me some advice? Smile

Is it better to move this topic to "MyBB 1.6 General Support" ?
Ah well that requires some changes to the inner workings of the plugin. What do you mean by "paying the $7"?. If you are talking about subsciribing, that has nothing to do with requests being fulfilled.
honestly. do you think that it's better that I'll add banners by myself in the code ( without using your mod ) or waiting for a possible modification of your mod? Sleepy
Ok, solved.
I just put the ads code directly on the template.
Thank you anyway Smile
Damn it, I thought it was easier.
{$post['fid6']} isn't the right thing, I need the fidX of the thread starter.
I'm sorry but I cannot help you with this. This forum is for those who understand PHP and MySQL but need help with this or that, or suggestions on how to do this or that. Not for people who know nothing about it and need general support - which is pretty much what you're asking here.