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
Excellent Yumi Smile it is now working.
Thank You very much.
(09-16-2010 03:50 PM)ZiNgA BuRgA Wrote: [ -> ]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.


Alright, I did your technique, and it works, however the AJAX mark read feature doesn't work. And this seems to be the case on Imran's forum as well.
What's the issue? I have to refresh the page before the icon changes.
What's your forum url?
If I post it, it won't do any good as this theme isn't available to be used by the public yet Wink
However, you may try going over to Imran's forum which has the same issue.
(05-21-2011 04:30 AM)lucasbytegenius Wrote: [ -> ]Alright, I did your technique, and it works, however the AJAX mark read feature doesn't work. And this seems to be the case on Imran's forum as well.
What's the issue? I have to refresh the page before the icon changes.
I imagined it would, if you did exactly what I said.
Imran uses "images/custom/forum{$fid}.png" instead of my suggested "images/forum{$fid}/on.gif"

If you want to use a different scheme, you'll need to modify jscripts/general.js appropriately.  Just do a search for "off.gif" and edit them to suit your needs.
(05-21-2011 10:02 AM)ZiNgA BuRgA Wrote: [ -> ]
(05-21-2011 04:30 AM)lucasbytegenius Wrote: [ -> ]Alright, I did your technique, and it works, however the AJAX mark read feature doesn't work. And this seems to be the case on Imran's forum as well.
What's the issue? I have to refresh the page before the icon changes.
I imagined it would, if you did exactly what I said.
Imran uses "images/custom/forum{$fid}.png" instead of my suggested "images/forum{$fid}/on.gif"

If you want to use a different scheme, you'll need to modify jscripts/general.js appropriately.  Just do a search for "off.gif" and edit them to suit your needs.
I did images/icon/fid/on.png. But I suppose it was the file type change Erf
I'll try your suggestion Smile
Yes, png is not gif - the code looks specifically for ".gif" (so to change, just replace appropriate).
Wow, I was looking for something just like this. Very simple and clever solution!
Does this bascically set a different ON/OFF image per forum? I've been looking for this,  Don't really understood what to doo, do I need a folder per each forum?
(05-23-2012 11:18 AM)zero Wrote: [ -> ]Does this bascically set a different ON/OFF image per forum?
Yes.

(05-23-2012 11:18 AM)zero Wrote: [ -> ]do I need a folder per each forum?
Unfortunately, yes.

If you don't want to that, maybe you can try this way (the lightbulb image tag):
forumbit_depth2_forum

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

Then upload forumid_on.gif, forumid_off.gif and forumid_offlock.gif to your theme's images folder.
For example for forum id = 2:
2_on.gif, 2_off.gif and 2_offlock.gif

Pages: 1 2
Reference URL's