Solved: 1 Year, 8 Months ago 170*50 banner
#1
Solved: 1 Year, 8 Months ago
Hello.
Tell me, how can I insert a 170*50 banner into the forum line on the main one?


Attached Files Thumbnail(s)
   
Reply
#2
Solved: 1 Year, 8 Months ago
Edit the "Forum Bit Templates" > forumbit_depth2_forum.
Simply add a right-floating div element with your banner inside like this for example (line 4):
<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}">
<div class="float_right"><img src="banner.png" width="170" height="50" alt="..."></div>
<strong><a href="{$forum_url}">{$forum['name']}</a></strong>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$modlist}{$subforums}</div>
</td>
<td class="{$bgcolor}" align="center" style="white-space: nowrap">{$threads}{$unapproved['unapproved_threads']}</td>
<td class="{$bgcolor}" align="center" style="white-space: nowrap">{$posts}{$unapproved['unapproved_posts']}</td>
<td class="{$bgcolor}" align="right" style="white-space: nowrap">{$lastpost}</td>
</tr>
This will show the banner at the right side of the column with thread titles.

[ExiTuS]
New Forum / MyBB 1.8.26 + innovative full-responsive Theme
Live-Escape-Game-Forum
Reply
#3
Solved: 1 Year, 8 Months ago
[quote = "[ExiTuS]" pid = '1341431' dateline = '1578571893']
Отредактируйте «Битовые шаблоны форума»> forumbit_depth2_forum.
Просто добавьте правый элемент div с баннером внутри, например, так (строка 4):
<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}">
<div class="float_right"><img src="banner.png" width="170" height="50" alt="..."></div>
<strong><a href="{$forum_url}">{$forum['name']}</a></strong>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$modlist}{$subforums}</div>
</td>
<td class="{$bgcolor}" align="center" style="white-space: nowrap">{$threads}{$unapproved['unapproved_threads']}</td>
<td class="{$bgcolor}" align="center" style="white-space: nowrap">{$posts}{$unapproved['unapproved_posts']}</td>
<td class="{$bgcolor}" align="right" style="white-space: nowrap">{$lastpost}</td>
</tr>
Это покажет баннер в правой части столбца с заголовками темы.

[Exitus]
[/ Цитата]

How to make it not in each, but at choice?
For example, in the third and seventh line.


Attached Files Thumbnail(s)
   
Reply
#4
Solved: 1 Year, 8 Months ago
you can use template conditionals plugin to display required banners at specific forums

after installing & activating above plugin,
you can add if condition for above suggested code by [ExiTuS]

<if $fid == x then>
<div class="float_right"><img src="banner1.png" width="170" height="50" alt="..."></div>
</if>
<if $fid == y then>
<div class="float_right"><img src="banner2.png" width="170" height="50" alt="..."></div>
</if>
note: x, y are forum IDs [numbers]
Reply
#5
Solved: 1 Year, 8 Months ago
(2020-01-09, 01:57 PM).m. Wrote: you can use template conditionals plugin to display required banners at specific forums

after installing & activating above plugin,
you can add if condition for above suggested code by [ExiTuS]

<if $fid == x then>
<div class="float_right"><img src="banner1.png" width="170" height="50" alt="..."></div>
</if>
<if $fid == y then>
<div class="float_right"><img src="banner2.png" width="170" height="50" alt="..."></div>
</if>
note: x, y are forum IDs [numbers]

In what form do you need to register this forum ID?
As I understand it, one of these needs to be taken, for example:
https://mysite.net/forumdisplay.php?fid=4
Already just tried to insert from this, it does not work.
Assumed so:
<if $fid == 4 then>
.............
........
Reply
#6
Solved: 1 Year, 8 Months ago
^ have you installed & activated template conditionals plugin ? it is required.
Reply
#7
Solved: 1 Year, 8 Months ago
Yes, installed and activated.
It’s bad with English and it’s very difficult to understand such technical manuals especially through Google translator.


Attached Files Thumbnail(s)
   
Reply
#8
Solved: 1 Year, 8 Months ago
^ okay. please change $fid with $forum['fid'] & check
<if $forum['fid'] == x then>
<div class="float_right"><img src="banner1.png" width="170" height="50" alt="..."></div>
</if>
<if $forum['fid'] == y then>
<div class="float_right"><img src="banner2.png" width="170" height="50" alt="..."></div>
</if>
Reply
#9
Solved: 1 Year, 8 Months ago
Something went wrong...

And with the first code $ fid and with the second $ forum ['fid']

And what exactly needs to be inserted instead of X, Y if the link to the necessary forum itself looks like this
https://mysite.net/forumdisplay.php?fid=4

So? 
<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}">	
	<if $forum['fid'] == 4 then>
<div class="float_right"><img src="banner1.png" width="170" height="50" alt="..."></div>
</if>
<if $forum['fid'] == 4 then>
<div class="float_right"><img src="banner2.png" width="170" height="50" alt="..."></div>
</if>
<strong><a href="{$forum_url}">{$forum['name']}</a></strong>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$modlist}{$subforums}</div>
</td>
<td class="{$bgcolor}" align="center" style="white-space: nowrap">{$threads}{$unapproved['unapproved_threads']}</td>
<td class="{$bgcolor}" align="center" style="white-space: nowrap">{$posts}{$unapproved['unapproved_posts']}</td>
<td class="{$bgcolor}" align="right" style="white-space: nowrap">{$lastpost}</td>
</tr>

All. The issue has been resolved.

Inserted stubs this way:

<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}">	
<if $forum['fid'] == 4 then>
<div class="float_right"><a href="https://ktonanovenkogo.ru" Target="_blank"><img src="banner/36.gif" width="170" height="50" alt="..."></div>
</if>
<if $forum['fid'] == 6 then>
<div class="float_right"><img src="banner/36.gif" width="170" height="50" alt="..."></div>
</if>
<if $forum['fid'] == 9 then>
<div class="float_right"><img src="banner/36.gif" width="170" height="50" alt="..."></div>
</if>
<strong><a href="{$forum_url}">{$forum['name']}</a></strong>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$modlist}{$subforums}</div>
</td>
<td class="{$bgcolor}" align="center" style="white-space: nowrap">{$threads}{$unapproved['unapproved_threads']}</td>
<td class="{$bgcolor}" align="center" style="white-space: nowrap">{$posts}{$unapproved['unapproved_posts']}</td>
<td class="{$bgcolor}" align="right" style="white-space: nowrap">{$lastpost}</td>
</tr>

I sincerely thank everyone for their support!


Attached Files Thumbnail(s)
               
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)