MyBB Community Forums

Full Version: Change forum icons and reputation page not dispalying correctly
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Forum url: http://thevideogameforum.com/index.php
Version: 1.8.5

Hey everyone,

Got a couple of questions to ask regarding my forum:


1) I have sucsesfully changed the default forum icons for the theme I am using for my forum. I used this for reference: http://community.mybb.com/thread-92128.html

On myBB 1.6 the above guide worked awesome. It works just as well for 1.8, but the only problem I have is that when you click an icon to mark the forum as read, the icon doesn't change to the read version of the icon. If you refresh the page after marking a forum as read it does change though.

My current forumbit_depth2_forum template contains:
<tr>
<td class="{$bgcolor}" align="center" valign="top" width="1"><img src="{$theme['imgdir']}/ficon/icon_{$forum['fid']}_{$lightbulb['folder']}.png" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" /></td>
<td class="{$bgcolor}" valign="top"
<strong><a href="{$forum_url}">{$forum['name']}</a></strong>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$modlist}{$subforums}</div>
</td>
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap"></td>
<td class="{$bgcolor}" valign="top" align="left" style="padding-right: 20px; width: 70px;">
 <i style="font-size: 14px;" class="fa fa-file-text fa-fw" title="{$lang->xstyled_threads}"></i>&nbsp;{$threads}{$unapproved['unapproved_threads']}
 <br />
 <i style="font-size: 14px;" class="fa fa-comments fa-fw" title="{$lang->xstyled_posts}"></i>&nbsp;{$posts}{$unapproved['unapproved_posts']}</td>
<td class="{$bgcolor}" valign="top" align="left" style="width: 200px;">{$lastpost}</td>
</tr>

The specific section regarding icons is:
<td class="{$bgcolor}" align="center" valign="top" width="1"><img src="{$theme['imgdir']}/ficon/icon_{$forum['fid']}_{$lightbulb['folder']}.png" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" /></td>


Is there something I need modify to get it changing the icons to read once you click them? Does "ajax_mark_read" need to be in other places for example.

Any help appreciated.



2) Second minor thing I have to ask is about the reputation page. The table and numbers seem to be missing:

[Image: e8zixSs.png]

Another example if you go to my profile:
http://thevideogameforum.com/reputation.php?uid=1

I thought it was just the theme, but it's also present in the default 1.8 theme for my forum. So im not sure whats up. Not a big deal, but I like everything working.



Thank you for any help in advance!
Hi, first of all, please create a thread per issue next time.

1. You need to edit jscripts/general.js: https://github.com/mybb/mybb/blob/featur...al.js#L259 Instead of changing the sprite class, change the image src attribute. Something like:
var onoff = markreadfid.attr('src').replace('_on.png', '_off.png');
markreadfid.attr('src', onoff);

2. That means you either didn't use the Find Updated Templates functionality after upgrading to 1.8.5 or you didn't upload the new reputation.php file (check with ACP -> Tools & Maintenance -> File Verification, more files may be missing)
(2015-07-07, 12:04 PM)Destroy666 Wrote: [ -> ]Hi, first of all, please create a thread per issue next time.

1. You need to edit jscripts/general.js: https://github.com/mybb/mybb/blob/featur...al.js#L259 Instead of changing the sprite class, change the image src attribute. Something like:
var onoff = markreadfid.attr('src').replace('_on.png', '_off.png');
markreadfid.attr('src', onoff);

Thank you! That worked like a charm! One last thing though, how do I change the alt text for these forum icons?

[Image: I0XBLhB.png]

As you can see the word 'undefined' has been snuck in there somehow. I trying to find where I can change it. Thank you!


(2015-07-07, 12:04 PM)Destroy666 Wrote: [ -> ]2. That means you either didn't use the Find Updated Templates functionality after upgrading to 1.8.5 or you didn't upload the new reputation.php file (check with ACP -> Tools & Maintenance -> File Verification, more files may be missing)

Ah yes, you are correct again. Turns out my reputation.php was an older version. Think I used a old reputation.php at some point.

Reuploaded the correct one, and problem solved.


Thanks so much for the support.