MyBB Community Forums
[How To?] Different ads between threads in forumdisplay and flp_avatar (Tomm plugin) - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: [How To?] Different ads between threads in forumdisplay and flp_avatar (Tomm plugin) (/thread-185724.html)



Different ads between threads in forumdisplay and flp_avatar (Tomm plugin) - niere8 - 2015-10-27

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


RE: Different ads between threads in forumdisplay and flp_avatar (Tomm plugin) - Leefish - 2015-10-28

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.


RE: Different ads between threads in forumdisplay and flp_avatar (Tomm plugin) - niere8 - 2015-10-28

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 :*


RE: Different ads between threads in forumdisplay and flp_avatar (Tomm plugin) - Leefish - 2015-10-28

Maybe flag that up to Frostschutz re Xthreads /lastAvatar and patches.