The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.

Create a free forum like this one.

Category image in navigation problem

View previous topic View next topic Go down

Category image in navigation problem

Post by nigh7mare on August 21st 2013, 1:41 am

On my forumhttp://horrific.forumpl.netI'm using images as category name. Here is example:

<img src="" alt="Fabuła" class="subtitle-img"/>
And when I choose one of forum, I've got this:

As you see, navigation bar is broken, becouse it shows cat as image. I found a solution, but have problem to implement it.

In viewforum_body I added a script, just after{BOARD_INDEX}:

<script type="text/javascript">imgs = new Array();imgs["organizacja"] = "";imgs["akcja"] = "";imgs["fabuła"] = "";$.each($(".secondarytitle h2"), function(v, k) {if(imgs[k.innerHTML.toLowerCase()] !== undefined) {k.innerHTML = '<img src="' + imgs[k.innerHTML.toLowerCase()] + '" alt="' + k.innerHTML + '" class="subtitle-img" />';}});</script>
As you see, script read "alt" attribute from cat image. Now I need implement correct varible into this line:

<td class="nav" valign="middle" width="100%"><div class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a>{NAV_CAT_DESC}</div></td>
I think I should replace {NAV_CAT_DESC}, but varibles {imgs}, {k.innerHTML}, don't work. Some one hae got the solution?

Last edited by nigh7mare on August 21st 2013, 1:44 am; edited 1 time in total (Reason for editing : misspells)

New Member

Posts : 1
Reputation : 1
Language : Polish and English

Back to top Go down

Re: Category image in navigation problem

Post by Sir Chivas™ on September 1st 2013, 10:49 am


None will work, CSS nor JavaScript will do it, since it's the same image. Sorry, mate. Your only option is to resize the image itself.

Sir Chivas™
Support Moderator
Support Moderator

Male Posts : 6756
Reputation : 428
Language : English, Spanish, and French
Location : || CSS || HTML || Graphics Designs || Support ||

Back to top Go down

View previous topic View next topic Back to top

Permissions in this forum:
You cannot reply to topics in this forum