MyBB Community Forums

Full Version: myadvertisements showing {myadvertisements[zone_1]} on custom php page from eztrader
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I recently installed eztrader plugin for mybb 1.8 (working great) and myAdvertisements wich is also working great except for the eztrader.php page where it shows
{myadvertisements[zone_1]}
{myadvertisements[zone_3]}
Those are from header template / footer template (code added by myadvertisement), and so ads are not showing, only this text.
Ads are working & showing everywhere else.

Is there anyway I can load those "custom" template from myadvertisement plugin into eztrader.php page ?
I'm pretty new to mybb right now, sorry for any dumb question.
Really no one have any idea on how to fix this ?
I can't figure it out myself sadly Sad
Still having this issue, I'm trying to understand how those two plugins can work correctly together but can't find any solution !!
I had the same problem.

You have to go into header and footer templates and manually remove that code.

However, this is a problem that it is showing, because it SHOULD be outputting your ads instead of that code. And if you remove it, ads won't show (unless you manually add them there).

EDIT: as I mentioned above, if you remove your code then the ads will not show (ANYWHERE) on your forums. I read that you said that myadvertisements IS WORKING elsewhere, just not on eztrader page. Same here.

I would however like a solution also regarding eztrader.

One quick fix could be, find it in your header and footer, wrap in tags like for example, <span class="ads">{myadvertisements[zone_1]}</span>, and then in eztrader.php file add inline css removing it only when on eztrader, i.e. .ads {display: none;}

=====================================================================

Verified working fix (does not show ads but removes code without breaking myadvertisements on rest of site)

Here is the code:

1.  Go to ACP > Templates & Style > (your theme) > Edit > Header Templates > header

2. FIND

{myadvertisements[zone_1]}

3. REPLACE with:

<div class="ads-uniqueclass">{myadvertisements[zone_1]}</div>

4. Go to ACP > Templates & Style > (your theme) > Edit > Footer Templates > footer

5. FIND

{myadvertisements[zone_2]}

6. REPLACE with:

<div class="ads-uniqueclass">{myadvertisements[zone_2]}</div>

7. Find file (relative to root of your installation): 

/inc/plugins/eztrader.php

8. FIND

echo '
<div class="tborder">
<table border="0" cellpadding="4" cellspacing="1" align="center" class="bordercolor" width="100%">
	<tr class="titlebg">
		<td >' . $lang->eztrader_feedbacktitle . ' - ' . $context['tradername']  . '</td>
	</tr>

9. REPLACE (add the css)

echo '
<style type="text/css">
	/* myadvertisements fix */
	.ads-uniqueclass {
		display: none;
	}
</style>
<div class="tborder">
<table border="0" cellpadding="4" cellspacing="1" align="center" class="bordercolor" width="100%">
	<tr class="titlebg">
		<td >' . $lang->eztrader_feedbacktitle . ' - ' . $context['tradername']  . '</td>
	</tr>
^ yes, css method is the simple one which is generally used as a quick fix for such issues.
(2017-08-12, 04:49 AM).m. Wrote: [ -> ]^ yes, css method is the simple one which is generally used as a quick fix for such issues.

would appreciate some rep if my answer helped thanks!