MyBB Community Forums

Full Version: Ads in Forum Section
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
hello all,

i just want to add a little small banner in between the forum sections, different banners in different section. i just need a code and need a template name where to put it. or if there is other-way please tell me.

please help me. thx
ACP >>Templates & Style>>Templates>>your theme>>Forum Bit Templates>>forumbit_depth2_forum

Find (Line 1)
<div class="{$bgcolor} row-bit bottom-border">

replace with

<div class="{$bgcolor} row-bit bottom-border" style="background: url('images/ForumsBackground/background_forum_{$forum['fid']}.png') 0 0 no-repeat #333a40">
Go to
/images
and create a new folder
ForumsBackground
and upload there your images

NoteConfusedave them with specific ForumID in filename, e.g.:
background_forum_NUM.png
NUMToungueut your forum`s fid number
[Image: h7TJxqa.png]
(2020-12-30, 01:43 PM)Mastersly Wrote: [ -> ]ACP >>Templates & Style>>Templates>>your theme>>Forum Bit Templates>>forumbit_depth2_forum

Find (Line 1)
<div class="{$bgcolor} row-bit bottom-border">

replace with

<div class="{$bgcolor} row-bit bottom-border" style="background: url('images/ForumsBackground/background_forum_{$forum['fid']}.png') 0 0 no-repeat #333a40">
Go to
/images
and create a new folder
ForumsBackground
and upload there your images

NoteConfusedave them with specific ForumID in filename, e.g.:
background_forum_NUM.png
NUMToungueut your forum`s fid number
[Image: h7TJxqa.png]


I cannot find the line you said

Here is a code of Templete


<tr>
<td class="{$bgcolor}" valign="middle">
  <strong><a href="{$forum_url}"><span class="titletext">{$forum['name']}</span></a></strong> {$forum_viewers_text}<br /> {$forum['description']} {$subforums}</td>
  
<td class="{$bgcolor}" valign="middle" align="left" width="23%" style="white-space: nowrap">{$lastpost}</td>
  
  <td class="{$bgcolor}" valign="middle" align="center" width="9%" style="white-space: nowrap">
    <span class="threadtext">Topics </span><br />{$threads}{$unapproved['unapproved_threads']}</td>
  
<td class="{$bgcolor}" valign="middle" align="center" width="9%" style="white-space: nowrap">
  <span class="threadtext">Replies </span><br />{$posts}{$unapproved['unapproved_posts']}</td>
</tr>
Anyone please help !
That's because he showed you code based on a custom theme, mybb default theme uses tables and not divs to structure the board.

<tr>
<td class="{$bgcolor}" align="center" width="1"><span class="forum_status forum_{$lightbulb['folder']} ajax_mark_read" title="{$lightbulb['altonoff']}" id="mark_read_{$forum['fid']}"></span></td>
<td class="{$bgcolor}">

This is the first 3 lines of code inside ACP -> Templates & Style -> Templates -> Default Templates -> Forum Bit Templates -> forumbit_depth2_forum

The third line that says
<td class="{$bgcolor}">

Is the one he wants you to edit, do not make it into a div though, keep it as <td> and just add in the attributes suggested.
please let me know.
I believe if we take your code it would be this <td> that needs changing:

<td class="{$bgcolor}" valign="middle">
  <strong><a href="{$forum_url}"><span class="titletext">{$forum['name']}</span></a></strong> {$forum_viewers_text}<br /> {$forum['description']} {$subforums}</td>

So with the changes proposed by @Mastersly



<td class="{$bgcolor}" valign="middle" style="background: url('images/ForumsBackground/background_forum_{$forum['fid']}.png') 0 0 no-repeat #333a40">
  <strong><a href="{$forum_url}"><span class="titletext">{$forum['name']}</span></a></strong> {$forum_viewers_text}<br /> {$forum['description']} {$subforums}</td>



It should look like this. The extra classes "row-bit bottom-border" are redundant in your case if I'm not wrong.
it would be much more attractive if in the index page on forum's lastpost coloum ; background image should be the last posters avatar. like this image:-

[Image: IMG-20210107-132557.jpg]
https://i.ibb.co/bsVgmGY/IMG-20210107-132557.jpg

can anyone do this by using any of the existing plugin of mybb ?
(2021-01-07, 07:59 AM)PARADOXP Wrote: [ -> ]it would be much more attractive if in the index page on forum's lastpost coloum ; background image should be the last posters avatar. like this image:-

[Image: IMG-20210107-132557.jpg]
https://i.ibb.co/bsVgmGY/IMG-20210107-132557.jpg

can anyone do this by using any of the existing plugin of mybb ?

what about this ?
You can use last poster avatar plugin and with some css customize it like that,
You can check reusers.to and copy some stylesheet from there
Pages: 1 2 3