Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

category image

Quote Reply
category image
hmmm .... was just looking for the g-forum section again ... I seem to scroll past it at least 3-4 times a week.

before I had suggested be able to subscribe to your favorite areas ... hehe one way to prevent this problem of mine ... wonder if others have the same ???

but, today ... I thought since Links can use category images I thought it would be cool if we could do the same thing with g-forum.

ie:
gt logo -- gossmaer threads inc.
gmail logo -- gossamer mail
etc ....

I wonder if other bb have this option or hack?

openoffice + gimp + sketch ... Smile
Quote Reply
Re: [QooQ] category image In reply to
Good suggestion.

Quote:

I wonder if other bb have this option or hack?


UBB does...you can display an unique logo for each category/forum.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Heckler] category image In reply to
didn't know that seems like all the UBB I've visited nobody had that option/hack.

might be nice to have.

actually here at GT is was thinking like a small image on the main page for each category .... right now it' just one big mass of words.

thanks for the info Eliot.

Angelic

openoffice + gimp + sketch ... Smile
Quote Reply
Re: [QooQ] category image In reply to
Quote:

didn't know that seems like all the UBB I've visited nobody had that option/hack.


It is NOT a hack. It is a built-in option. I had it working in my old discussion forum for "madagascar" where I had my web site logo in the header section of the category/forum.

Wouldn't be too difficult to add...(at least rudimentarily speaking), like having a column called Image (ENUM, Yes/No, Default = No, NOT NULL)...then create a global tag for where the category images are stored.

Then put the category images in the category image folder using the ID of the forum category.

Then edit the forum category template to include the following conditional statements:

Quote:

<%if Image%>
<img src="<%build_catimage_url%>/<%ForumID%>.gif" alt="<%ForumCatName%>" width="XXX" height="XX" border="0">
<%endif%>


Note that the "forum" type of tags are not correct, since I have not installed GT forum yet. But you can get the jist of it.

There could be robust options like uploading an image via the admin screen...and the above codes would have to be adjusted a bit.

But using the FORUMID column would be best for the file name of the CATEGORY IMAGE.

Hope this helps.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [QooQ] category image In reply to
I have built a plugin for this (really simple), but it's on my home computer, so I cannot access it at the moment. I will post it here as soon as possible.

The plugin makes it possible to add an image for each category. You can store the image name, height and width.


Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [QooQ] category image In reply to
OK, here is a very simple plugin that you can use to display an image for every category. There is also one for displaying an image for every forum. It's very simple, it just adds three fields to the category/forum table containing the image filename, the image height and the image width.

You can use the tags <%cat_image%>, <%cat_image_height%>, <%cat_image_width%> on the appropriate pages in the appropriate loops.

Example: if you store the images in the GForum image directory, you can display the image per category using

Code:
<%if cat_image ne ''%>
<img src="<%image_url%>/<%cat_image%>" height="<%cat_image_height%>" width="<%cat_image_width%>">
<%endif%>

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] category image In reply to
Eliot / Yogi,

thanks ... Cool .. thought it would be cool but since you've been kind enough to help out I'm gonna havbe to try and play with this before X-mas ... I'm in a grading crunch right now ... errr ... work work work.

openoffice + gimp + sketch ... Smile
Quote Reply
Re: [yogi] category image In reply to
Out of interest why do you have:

<%if cat_image ne ''%>

Can't you use:

<%if cat_image%>
Quote Reply
Re: [PaulW] category image In reply to
you can use both, I guess...


Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] category image In reply to
Thank you Yogi for your plugins! They work perfectly! Smile

I have a suggestion. Why don't put two variables for the images forum: one for the image which indicates that there is new posts, and another one for the image which indicates that there is no new post? With this feature, your plugins will be perfect for my needs. Smile

Thank you again!
Quote Reply
Re: [Marc_B] category image In reply to
Ok I found how to create new variables. It's so easy when you know it. Smile. I did not know that all the variables appear in the form automatically.

Thanks

Marc


Quote Reply
Re: [yogi] category image In reply to
Sorry Iván, but still i cant do it work (your plugins). Can you give another example?

1) What is the template as i need edit? Category_list.html?
2) i can see the new fields in forun and category options, the field for the image file, most have the name and extention of the file? like... wub.gif?


Please can you give me a complete example for a total newbie? Blush

Thanx.




http://www.webconferencia.net/
Quote Reply
Re: [acidoinmetal] category image In reply to
Uhhh, this plugin is basically useless Blush, it just creates a few columns in the Category/Forum tables, which you can easily do by hand.

The image file field has to contain the location of the image, url plus filename.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] category image In reply to
Yes Iván, is too easy, for that reason i cant inderstand why this doesn't work in my forum FrownFrown

Let's see... In the category_list template, i added the following code:

<%if cat_image%>
<img src="<%image_url%>/<%cat_image%>" height="<%cat_image_height%>" width="<%cat_image_width%>">
<%endif%>

just below of <%include include_header.html%>

In the category record, i fill the new fields with :

Image file name: banner.gif
Image height : 138
Image width : 100

It this suppose that a image should appear below the header, ok? But i cant get any image!!! In any category!!!! Tell me please, i'm doing something wrong? Or it can be a trouble with the plugin or sql database?
I see vere easy to use your plugin, that is the reason for wich i'm becoming crazy when i cant do it work!PiratePiratePiratePiratePiratePiratePirate


Just tell me if my procedure is correctly, and i promess dont become crazy to you too Wink
Thanx and excuse me for my insistence




http://www.webconferencia.net/
Quote Reply
Re: [acidoinmetal] category image In reply to
You have to put the cat_image tag somewhere inside the 'everything' loop on the category_list template, otherwise it doesn't make sense.

For other templates, you can use <%GT::Template::dump%> to see whether the cat_image tag is available on that specific template.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] category image In reply to
Success!!!!!

Finally i can could make it work, in the category_list template. I'm not familarized with codes like <%GT::... %> but i can learn how it work by my own, since that your suggestion point me to study that. Now i know where i can use the tags <%cat_image%> and <%Forum_image%> from your plugin, really is too easy to handle, all this was a problem of a newbie. Thanx for your Help Iván. Wink




http://www.webconferencia.net/