MyBB Community Forums

Full Version: Different ads between threads in forumdisplay and flp_avatar (Tomm plugin)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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

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 Sad Sad 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
heyyy Deb Smile

For the showthread avatar

<span><a href='{$flp_avatar['profile']}' title='Started by {$flp_avatar['username']}'><img src='{$flp_avatar['avatar']}' {$flp_avatar['dimensions']} alt='' /></a></span>

not sure on this last avatar thing.
Lee..it's a problem with Patches plugin Sad

If I add manually the code on  forumdisplay.php and load it on server via FTP, it works perfectly.

If I use Patches instead I have problems with avatars (I see always my avatar also on other user) and I don't see neither thumbails uploaded with Xthreads.

So I use it manually Big Grin

Thanks the same :*
Maybe flag that up to Frostschutz re Xthreads /lastAvatar and patches.