Choose from our various pricing plans. There is a package for everyone!


Forumotion - Problem with category image in "nav"

View previous topic View next topic Go down

Locked Forumotion - Problem with category image in "nav"

Post by nigh7mare on Thu Aug 22, 2013 9:45 am

Hello,
On my forum http://horrific.forumpl.net I'm using images as category name. Here is example:

Code:
<img src="http://s19.postimg.org/wshf2kour/catfab.png" alt="Fabuła" class="subtitle-img"/>
And when I choose one of forum, I've got this:



As you see, "nav" is broken, becouse it shows category as image and I want to replace that image to img alt text. I found a solution, but have problem to implement it.

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

Code:
<script type="text/javascript">imgs = new Array();imgs["organizacja"] = "http://s19.postimg.org/ohvluqtar/catorg.png";imgs["akcja"] = "http://s19.postimg.org/m4do3qevn/catakc.png";imgs["fabuła"] = "http://s19.postimg.org/wshf2kour/catfab.png";$.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:

Code:
<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 had a solution? Maybie you've got better idea.

P.S.
"nav" should look like that:


Last edited by Th1nK on Fri Dec 19, 2014 1:46 pm; edited 2 times in total (Reason for editing : p.s.)
avatar
nigh7mare
Member
Member

Age : 24
Posts : 5
Join date : 2013-08-22
Forum Version : PhpBB2
Reputation : 0

View user profile

Back to top Go down

Locked Re: Forumotion - Problem with category image in "nav"

Post by Sir Chivas on Wed Aug 28, 2013 2:43 am

So, the problem is that you have an enormous image? I quite didn't understand you with your saying "broken?"


Must Follow the Rules at all times!
No Support via PM
avatar
Sir Chivas
Premium Member


Age : 24
Posts : 55
Join date : 2012-08-04
Reputation : 0

View user profile

Back to top Go down

Locked Re: Forumotion - Problem with category image in "nav"

Post by nigh7mare on Sat Aug 31, 2013 4:10 pm

@Sir Chivas wrote:So, the problem is that you have an enormous image? I quite didn't understand you with your saying "broken?"
The problem is that image itself. I'll try to explain it.

I used image as category name. I looks fine in home page http://horrific.forumpl.net/. When someone'll select (and go to) any forum e.g. http://horrific.forumpl.net/f1-reguly-rozgrywki, "nav" bar will show:

FORUM MAIN TITLE :: CATEGORY NAME :: FORUM NAME

and becouse I've got image as CATEGORY NAME, "nav" will display it and it looks terrible.

In subcategory forum (but not in home page) "nav" should display:

FORUM MAIN TITLE :: "alt" attribution of img's tag :: FORUM NAME
avatar
nigh7mare
Member
Member

Age : 24
Posts : 5
Join date : 2013-08-22
Forum Version : PhpBB2
Reputation : 0

View user profile

Back to top Go down

Locked Re: Forumotion - Problem with category image in "nav"

Post by Th1nK on Sat Aug 31, 2013 4:43 pm

Hello,
I think that you need to resize image to fit in. I don't think there is code for that. However, I hope our technicians will help you. Good luck Smile.
avatar
Th1nK
Administrator
Administrator

Posts : 468
Join date : 2012-04-06
Reputation : 43

View user profile http://www.csshelp.net

Back to top Go down

Locked Re: Forumotion - Problem with category image in "nav"

Post by nigh7mare on Sat Aug 31, 2013 11:24 pm

You guys don't understand me. If I'll resize image, it will change on home page (start page) too. And I dont want that. I'm gonna show you my problem by those shoots.

Look. On start page, everything looks fine (Green rectangle):


But when I choose a forum, it looks like this:

And I don't want this (red rectangle).

I want to look like this (green rectangle):

I used Google Chrome devTools to show you how it should look like.

You understad me now? CATEGORY IMAGE in START PAGE, but no in OTHER PAGES. In OTHER PAGES, I want text and more specifically "alt" attribute from img tag.
avatar
nigh7mare
Member
Member

Age : 24
Posts : 5
Join date : 2013-08-22
Forum Version : PhpBB2
Reputation : 0

View user profile

Back to top Go down

Locked Re: Forumotion - Problem with category image in "nav"

Post by Sir Chivas on Sun Sep 01, 2013 9:49 am

Hi,

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.


Must Follow the Rules at all times!
No Support via PM
avatar
Sir Chivas
Premium Member


Age : 24
Posts : 55
Join date : 2012-08-04
Reputation : 0

View user profile

Back to top Go down

Locked Re: Forumotion - Problem with category image in "nav"

Post by nigh7mare on Mon Sep 02, 2013 7:47 am

Sorry, but you're wrong.
Look at that forum: http://rabbit-doubt.web-rpg.com/
That forum administrator's has image as category name, and when you choose forum, you'll see that in "where you are navigation" there's no image.
So It's possible and I'm looking for answer how to do that.


Last edited by nigh7mare on Mon Sep 02, 2013 7:48 am; edited 1 time in total (Reason for editing : misspells)
avatar
nigh7mare
Member
Member

Age : 24
Posts : 5
Join date : 2013-08-22
Forum Version : PhpBB2
Reputation : 0

View user profile

Back to top Go down

Locked Re: Forumotion - Problem with category image in "nav"

Post by nigh7mare on Mon Sep 02, 2013 9:38 am

OK, I found a solution by myself.

e.g. code in CATEGORY NAME:
Code:
<img src="http://s19.postimg.org/ohvluqtar/catorg.png" class="subtitle-img" /><p class="catalt">ORGANIZACJA</p>
e.g. code in CSS:
Code:
.catalt {
  display:none; }

h1 .catalt {
  display: inline;
  visibility: visible; }

h1 .subtitle-img {
  display:none; }

.nav .catalt {
  display: inline;
  visibility: visible; }

.nav .subtitle-img {
  display: none; }
It's a little chaotic, but works fine.
avatar
nigh7mare
Member
Member

Age : 24
Posts : 5
Join date : 2013-08-22
Forum Version : PhpBB2
Reputation : 0

View user profile

Back to top Go down

Locked Re: Forumotion - Problem with category image in "nav"

Post by RSguideMaker on Tue Sep 03, 2013 3:20 pm

Is this solved now then?



Please do not request help via PM! Post on the forums where it can help everyone.
avatar
RSguideMaker
Support Moderator
Support Moderator

Age : 18
Posts : 421
Join date : 2012-05-23
Reputation : 9

View user profile http://euanfitzpatrick.co.nf/

Back to top Go down

Locked Re: Forumotion - Problem with category image in "nav"

Post by Th1nK on Fri Dec 19, 2014 1:45 pm

User inactive and topic locked
avatar
Th1nK
Administrator
Administrator

Posts : 468
Join date : 2012-04-06
Reputation : 43

View user profile http://www.csshelp.net

Back to top Go down

Locked Re: Forumotion - Problem with category image in "nav"

Post by Sponsored content


Sponsored content


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