2015-10-27, 03:39 PM
Hi all,
I would like to add different ads on forumdisplay. For now this works:
In forumdisplay.php after $plugins->run_hooks("forumdisplay_thread"); added
and in forumdisplay_thread template :
So three different kind of ads.
This works..but avatar of threadstarter is always the same I see always my avatar in forumdisplay_thread user starter avatar and no avatar from other users.
Where is the conflict?
I use also plugin
Last/First Post Avatar (1.0.2)
A plugin that allows the first and last post avatar around the forum.
Created by Tomm
to show startedthread avatar (<img src="{$flp_avatar['avatar']}">)
Thank you in advance
I would like to add different ads on forumdisplay. For now this works:
In forumdisplay.php after $plugins->run_hooks("forumdisplay_thread"); added
if (!isset($threadcounter)) {
$threadcounter = 0;
}
$threadcounter++;
and in forumdisplay_thread template :
<if (($threadcounter - 2) % $mybb->settings['threadsperpage'] == 0) then>Ads first kind
<elseif (($threadcounter - 5) % $mybb->settings['threadsperpage'] == 0) then>Ads second kind
<elseif (($threadcounter - 10) % $mybb->settings['threadsperpage'] == 0) then>Ads third kind
</if>
So three different kind of ads.
This works..but avatar of threadstarter is always the same I see always my avatar in forumdisplay_thread user starter avatar and no avatar from other users.
Where is the conflict?
I use also plugin
Last/First Post Avatar (1.0.2)
A plugin that allows the first and last post avatar around the forum.
Created by Tomm
to show startedthread avatar (<img src="{$flp_avatar['avatar']}">)
Thank you in advance