News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Adding content after first board

Started by NaneK, September 21, 2017, 04:39:20 AM

Previous topic - Next topic

NaneK

Hi guys,

I want to add some custom HTML/CSS content after my first board.
I will show you with pictures down below.

Right now it look like this: https://i.imgur.com/OOqTsFq.png (the red is place where I would insert something)

I want it to look like this: https://i.imgur.com/21BOZQK.png
So you can notice this dark area after first board, where I put some of my stuff.

Can it be done?
Can I put some of my custom codes after a specific board (not just the first one)?

My forum is: www.zbsamp.com

ps. I made this in Photoshop ;D

br360

I'm not 100% sure, but I think you may be able to add content there with the ad management mod. https://custom.simplemachines.org/mods/index.php?mod=255

I would post this on the support topic of that mod as well and ask if what you are looking for can be done with it

NaneK

Thanks for reply, I could it with a mod if I don't find a manual way, since I am trying to do it without any mods.

I have something come to my mind...
In display.template.php file I have put a AdSense baner that shows only after first post.
The code looks like this:

//Show Google Adsense after the 1st post
if ($message['id'] == $context['first_message'])
echo '
<div class="google-reklame-postovi"><center>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Elastica - ostalo - responsive -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="XX-XX-XXXXXXXXXXXXXXXX"
data-ad-slot="XXXXXXXXXX"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></center>
</div>';
//End of the adsense Code


Look at the begining of the code
if ($message['id'] == $context['first_message'])

Can this be modified for boards?
Something lik ...$context[first_board]...

Dzonny

themes/default/boardindex.template.php

   foreach ($context['categories'] as $category)
{
// If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
if (empty($category['boards']) && !$category['is_collapsed'])
continue;


You can use $category['id'] to target specific category though.

Advertisement: