MyBB Community Forums

Full Version: TNX Ads and MyBB
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey,
I'm trying to use TNX ads with my MyBB forum software. For your forum or website to be indexed, they give you a PHP code. From what I understand, MyBB doesn't allow you to use PHP in template changes (?).
How can I make this work? I've tried using Ad plugins, but with no sucess -- Most of them seem to be built only for images.

If you want to see the code that TNX provides, just head on over to TNX.net - signing up takes less then 30 seconds, you don't have to enter paypal, address or anything such as. I'd post my code, but I'm not sure if I should Confused

Anyway, thanks for any help. Smile
You can use my Link Vault plugin for a good example of how you can implement this....it's over at mybb central.
Could I just replace the Link Vault links and such with TNX's? Or would I have to modify your plugin?

(I can't code btw :/)
Snowy Wrote:Could I just replace the Link Vault links and such with TNX's? Or would I have to modify your plugin?

(I can't code btw :/)

That won't work becuase TNX is a code not a link.

This should work:

Download the LinkVault.php plugin and set it aside.

Create a new file in the plugins folder called tnx_ads.php

Now paste all the code tnx give you into the tnx_ads.php file.

Save and close tnx_ads.php

Open up linkvault.php (the plugin you downloaded)

Find:
include ('lv5cB29PlRGDl7d1Sn.php');  

Replace it with:

include ('tnx_ads.php');

Save, close, and upload the linkvault.php file to the plugins directory. Activate the plugin.

To ensure it works

To see if the plugin works, open up tnx_ads.php and add these lines after the '<?php' opening tag of php.

echo '<strong>The TNX ads are accessible</strong>';

Save and close tnx_ads.php and visit your forums and look for: The TNX ads are accessible. If you see it, this indicates that it works, you may now remove these lines from the tnx_ads.php file:

echo '<strong>The TNX ads are accessible</strong>';

Let me know if you have any troubles.

EDIT: just looked at it further, it isn't going to work without a few modifications. I'll work on it and let you know.
Hm ok thanks for working on it rcpalace Smile