MyBB Hacks

Full Version: Custom Forum Legend - Perforum Basis
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Not an application, only a basic XThreads usage Biggrin

Basically, we can use template_prefix_forumbit_depth2_forum template to use different Forum Legend, per forum basis.

Default:

HTML Code
<img src="{$theme['imgdir']}/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" />


Replace the {$theme['imgdir']} with the path of our custom forum legend images:

HTML Code
<img src="image_path/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" />


We can still use the {$theme['imgdir']} variable if we want the forum legend custom per forum basis and per theme basis:

HTML Code
<img src="{$theme['imgdir']}/image_path/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" />


And maybe we need to change the template_prefix_forumbit_depth2_cat template too, if the forum has a sub forum.

I do not understand what it does. And how do I do?I have no template named, template_prefix_forumbit_depth2_forum.
Forum Legend?

[attachment=188]

We can use different images (per forum basis) for our forum legend.
That looks nice Tongue
(09-06-2010 09:21 AM)RateU Wrote: [ -> ]Not an application, only a basic XThreads usage Biggrin
...

The trick is to strike on an idea. Wink2 Thanks RateU!
Simple and elegant Smile
It didn't work for me Frown
You need to explain what you did and what happened.
(09-16-2010 03:29 PM)ZiNgA BuRgA Wrote: [ -> ]You need to explain what you did and what happened.

Hi Yumi,

I copy images folder (which is named /imran/ and having .png images) in forum_root/images/ directory.

Then I go to ACP > Templates > ForumBit Templates > forumbit_depth2_forum > and change;

PHP Code:
<img src="{$theme['imgdir']}/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" />


to;

PHP Code:
<img src="{$theme['imgdir']}/imran/{$lightbulb['folder']}.png" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" />


It changes the legend column to this;

[Image: 28034errorrr.png]

Does I miss something ??

Then you should check the URL that is being put in (right-click -> Copy Image Location in Firefox) and track the issue there.

But I think you've somewhat got the wrong idea.  All you're doing is changing the path of the image.  If you want what the first post is talking about (different images per forum), you'll need separate templates for each forum, with a forum template prefix set up for each forum.
Alternatively, you could use something like this:

HTML Code
<img src="{$theme['imgdir']}/forum{$forum['fid']}/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" />

And have your images in:
images/forum1/on.gif
images/forum1/off.gif
images/forum2/on.gif
etc
...where the numbers refer to the forum ID.  If you do this, you'll need an image for every single forum and don't need XThreads.

Pages: 1 2
Reference URL's