MyBB Community Forums
How to display different logos on selected forums? - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Requests (https://community.mybb.com/forum-65.html)
+---- Thread: How to display different logos on selected forums? (/thread-153933.html)

Pages: 1 2 3


How to display different logos on selected forums? - fabaa - 2014-05-20

Hi,

I want to specify different images/logos/banners in place of the forum logo on specific forums (or all forums). And no I do not want random logos.

I tried post #9 of this one http://community.mybb.com/thread-49305.html

But it just displays a dead picture link (the php file). Can anyone please help?

Thanks!

For example, I have a default banner which displays on index.php.

But then I have a logo A which I want it to be replacing default banner at forum #1, logo B for forum #3, and so on...


RE: How to display different logos on selected forums? - Leefish - 2014-05-20

Are your images in the forum root or in the images folder? You need to make sure the path you set to the image is correct.


RE: How to display different logos on selected forums? - fabaa - 2014-05-20

(2014-05-20, 11:02 AM)Leefish Wrote: Are your images in the forum root or in the images folder? You need to make sure the path you set to the image is correct.
Thanks for replying.

I set absolute paths to the images. They should be correct. Does the code provided on that thread look correct to you and theoretically should work?


RE: How to display different logos on selected forums? - Leefish - 2014-05-20

it does - where are you using the code?


RE: How to display different logos on selected forums? - fabaa - 2014-05-20

(2014-05-20, 03:20 PM)Leefish Wrote: it does - where are you using the code?

I saved the code as a php file, and uploaded it to my forum's root directory. I then put the URL to the php file to where my Board Logo is in ACP... does this look correct?

I think I'm not editing the code correctly that's why it's not showing up...

Could you take a look? Words highlighted in yellow are things I changed. I noticed that he has single quotation marks for 'image_for_forum2.jpg', but double quotation marks for "image_for_forum3.jpg"

Which is correct?

I changed "image_for_forum2.jpg", "image_for_forum3.jpg", and "default_forum_logo" to absolute paths to the images.

And I changed case 2's "$image_name" to name A, case 3's "$image_name" to name B, and default's $image_name to name C.


RE: How to display different logos on selected forums? - Leefish - 2014-05-20

You know, you could just do this with CSS. If you make the forum a background-image in css then you can set the logo per forum like that. Is that an option?


RE: How to display different logos on selected forums? - fabaa - 2014-05-20

(2014-05-20, 06:50 PM)Leefish Wrote: You know, you could just do this with CSS. If you make the forum a background-image in css then you can set the logo per forum like that. Is that an option?

I am not sure... it depends on how the outlook looks like?

Currently I treat the logo as 'an image on the top of the forum' and not a 'logo' per se. I show an image relevant to the forum, on top of forum pages. I'm not too fond of seeing the same image on every page, that's why I like seeing a different image on different forums... if this makes sense?

Thanks for looking into this.


RE: How to display different logos on selected forums? - Leefish - 2014-05-20

Yea. It depends where you want it placed. Can you take a screenshot of where you would like it? A link to the live board is best.


RE: How to display different logos on selected forums? - fabaa - 2014-05-20

(2014-05-20, 07:36 PM)Leefish Wrote: Yea. It depends where you want it placed. Can you take a screenshot of where you would like it? A link to the live board is best.

PM'ed you the URL. Thanks!


RE: How to display different logos on selected forums? - Leefish - 2014-05-20

ok, totally doable.

You need to edit the forumdisplay template and the index template

open the templates and find the <body> tag (at the top)

make the index body tag into <body class="index">

Make the forumdisplay body tag <body class="forum_{$foruminfo['fid']}">

Then post the contents of your header template here.