Category image in navigation problem

Go down

Category image in navigation problem

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

On my forum I'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 : 6810
Reputation : 433
Language : EN, FR, ES
Location : || CSS || HTML || Graphics Designs || Support ||

Back to top Go down

Back to top

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