Add ads/banner inside category
#1
dear all ,

I need a help...
I create a new forum and i need to add a banner in every category / sub category
(please see the attached file)


Attached Files Thumbnail(s)
   
Reply
#2
You could use Template PHP/Conditionals to check if Forum ID (FID) is the correct one then hardcode your ad/banner.

Other than that you could get someone to code a plugin for you where you can create ads/banners for each or multiple forums.
Reply
#3
Can you give me one example ?
Reply
#4
Using this plugin http://mybbhacks.zingaburga.com/showthread.php?tid=260

or a more restricted version

http://mybbhacks.zingaburga.com/showthread.php?tid=464

Inside your "forumdisplay" template under "Forum Display Templates" you can add somewhere the following


<if $foruminfo['fid'] == YOUR_FID_WHERE_TO_DISPLAY then>
    <div>YOUR THING GOES HERE</div>
</if>

an example would be

<if $foruminfo['fid'] == 5 || $foruminfo['fid'] == 6 then>
    	<div style="margin:auto;text-align:center;height:30px;line-height:30px;border-radius:3px;background:#999;max-width:20%;margin-bottom:10px;"><a href="upgrade.php">CLICK HERE TO UPGRADE NOW!</a></div>
	</if>

This would show a small rounded box saying upgrade now if the forum id was either 5 or 6.

Place this below {$header} in your template.
Reply
#5
thank you very much ,

i will try it today !

Thank you again

Succeeded with using this plugin http://mybbhacks.zingaburga.com/showthread.php?tid=260 .

GodLess101 do you know if exist also for postbit? (for the showthread ['tid']
Reply
#6
For the postbit? I'm not sure what you mean? You want it to above the thread when you go to read a thread, that is not anything to do with the postbit.

Inside your templates scroll down to the Show Thread Templates and go inside your Showthread template.

You can use the corresponding variables {$thread['tid']} for THREAD ID or {$thread['fid']} for the forum id the thread is in.
This should do the trick for you.
Reply
#7
Thats exactly I mean inside threads

so i have to enter that?
<if $thread['tid'] == YOUR_FID_WHERE_TO_DISPLAY then>
<div>YOUR THING GOES HERE</div>
</if>

below {$header} ?
Reply
#8
Well depends what you want to do? for it to work on all threads inside a specific forum id you need to use the thread['fid'] but if it's only ínside THE THREAD with the TID == SOMETHING which you should know by now is a unique ID and is therefore only one thread.

Goodluck.
Reply
#9
Thank you GodLess101 again for the help .

One more question .
Banner under the post is available to insert ( i mean in a thread or to a subforum) .

Thanks in advance.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)