boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Topic Icons

 
Post new topic   Reply to topic    boardom Forum Index -> Feature requests
View previous topic :: View next topic  
Author Message
Marzar00



Joined: 19 Oct 2003
Posts: 7

PostPosted: Sun Oct 19, 2003 3:10 am    Post subject: Topic Icons Reply with quote

I was wondering if anyone has developed a script that when creating news you select a catogory and when posted the catogory name appears as normal but also an image relevant to that catagory. I have made an example:

Thanks for any help.

Regards
Marzar00
Back to top
View user's profile Send private message
moose



Joined: 04 May 2003
Posts: 196
Location: Winnipeg Canada

PostPosted: Sun Oct 19, 2003 3:28 am    Post subject: Reply with quote

if you read the readme, you can find out that you can call the category ID number with a function, and then if you want you could put that function into an <img> tag so it would display an image like:

<img src="<?php function(); ?>" />

and replace function() with the real function
Back to top
View user's profile Send private message Visit poster's website
Viper007Bond



Joined: 15 Aug 2003
Posts: 266
Location: Portland, Oregon, USA

PostPosted: Sun Oct 19, 2003 5:26 am    Post subject: Reply with quote

A simpler way is to use the tag <?php the_category_ID() ?>, upload an image for each category into the same folder that your blog file is in and rename them to the name of the category you want it to show up (CASE SENSITIVE) for and then do this:

Code:
<img src="<?php the_category() ?>.gif" alt="<?php the_category() ?>"


Example: It will show General.gif for posts from the category "General" and when you hover over the image, it will display the title of the category, "General".

I haven't tested it personally, but it should work.
_________________
http://www.viper007bond.com

If you haven't already installed b2, I advise you look into WordPress or b2evo instead as b2 is dead.


Last edited by Viper007Bond on Sun Oct 19, 2003 5:45 am; edited 2 times in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
epolady



Joined: 30 Jul 2002
Posts: 800
Location: Texas

PostPosted: Sun Oct 19, 2003 5:37 am    Post subject: Reply with quote

That should work, I did something simliar but with the_author as an icon. Or if s/he wants something more organized s/he can use the_category and it would be named news.gif, sports.gif, rants.gif, etc.
_________________
No more support from me. Goodbye!
Go upgrade to WordPress, you'll find better support there.
Back to top
View user's profile Send private message
Viper007Bond



Joined: 15 Aug 2003
Posts: 266
Location: Portland, Oregon, USA

PostPosted: Sun Oct 19, 2003 5:43 am    Post subject: Reply with quote

Didn't think of that. Doh. Fixed. Smile
_________________
http://www.viper007bond.com

If you haven't already installed b2, I advise you look into WordPress or b2evo instead as b2 is dead.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Marzar00



Joined: 19 Oct 2003
Posts: 7

PostPosted: Sun Oct 19, 2003 6:29 am    Post subject: Reply with quote

WOW That is so simple. Thanks for the help.

Regards
Marzar00
Back to top
View user's profile Send private message
Viper007Bond



Joined: 15 Aug 2003
Posts: 266
Location: Portland, Oregon, USA

PostPosted: Sun Oct 19, 2003 6:43 am    Post subject: Reply with quote

No problem. Smile
_________________
http://www.viper007bond.com

If you haven't already installed b2, I advise you look into WordPress or b2evo instead as b2 is dead.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
frauke



Joined: 31 Dec 2003
Posts: 4

PostPosted: Wed Dec 31, 2003 1:29 am    Post subject: help Reply with quote

Hi everyone, I hope someone can help me. Idea

I have 2 different b2s installed on my server, one as my personal blog and one as sort of a reviews section. I used the aforementioned way to include category/resp. title icons to the posts and it's been working smoothly until a few days ago.

Now the images won't show up, but there are no red crosses or anything. When I hover over the place where the images should be the title pops up correctly...only there's no image.

Look here: http://www.meinetwegen.org/culture/

This is the code in the reviews blog

Code:
<img src="b2-img/<?php the_title() ?>.gif" alt="<?php the_title() ?>" style="border: 1px solid #F3F3F3; margin-right: 6px" align="left">


I don't know if that's important, but on the reviews blog I run the b2customfields hack (v.2).

So...the smallest hint at the solution would make me really really happy! Smile

Thanks in advance
frauke
Back to top
View user's profile Send private message Visit poster's website
epolady



Joined: 30 Jul 2002
Posts: 800
Location: Texas

PostPosted: Wed Dec 31, 2003 1:34 am    Post subject: Re: help Reply with quote

frauke wrote:
Look here: http://www.meinetwegen.org/culture/

Images on that site works fine for me.
_________________
No more support from me. Goodbye!
Go upgrade to WordPress, you'll find better support there.
Back to top
View user's profile Send private message
frauke



Joined: 31 Dec 2003
Posts: 4

PostPosted: Wed Dec 31, 2003 1:42 am    Post subject: thx Reply with quote

That was fast! Smile

Are you serious? Well, then I should check my browser... have emptied temporary internet files and cookies several time, but it doesn't help. But anway, thanks!
Back to top
View user's profile Send private message Visit poster's website
epolady



Joined: 30 Jul 2002
Posts: 800
Location: Texas

PostPosted: Wed Dec 31, 2003 1:55 am    Post subject: Reply with quote

I looked at it in my internet explorer (was look at it in a different browser a sec ago).

I have no idea why it wouldn't show. If you right click where the image would go and save the image, it saves. my only guess is because you have spaces in your titles.
_________________
No more support from me. Goodbye!
Go upgrade to WordPress, you'll find better support there.
Back to top
View user's profile Send private message
frauke



Joined: 31 Dec 2003
Posts: 4

PostPosted: Wed Dec 31, 2003 2:26 am    Post subject: Reply with quote

There are indeed spaces... it's just strange, because it had already been working properly for more than a month.

How would this look in action?

Quote:

[...]

<img src="<?php function(); ?>" />

and replace function() with the real function


I'm not really familiar with functions...
Back to top
View user's profile Send private message Visit poster's website
epolady



Joined: 30 Jul 2002
Posts: 800
Location: Texas

PostPosted: Wed Dec 31, 2003 3:20 am    Post subject: Reply with quote

Were you with a different host or anything like for that month?

Well functions are things like the_title, the_author, the_time, so basically you're doing everything right, it could be the spaces.
_________________
No more support from me. Goodbye!
Go upgrade to WordPress, you'll find better support there.
Back to top
View user's profile Send private message
frauke



Joined: 31 Dec 2003
Posts: 4

PostPosted: Wed Dec 31, 2003 5:41 pm    Post subject: Reply with quote

epolady wrote:
Were you with a different host or anything like for that month?


No, I wasn't, it was basically all the same.

I just tried to sort it out and the problem was the command (command? attribute? I don't know...) 'align="left"' in the image tag. I replaced it with 'float: left;' in the image style and again the same error occured. I fixed the problem by placing the content in a table, though I still have no idea why it wouldn't work.

Could it have anything to do with the Doctype?

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">


Maybe not.

Nonetheless, thanks epolady for bothering in the first place! Smile
Back to top
View user's profile Send private message Visit poster's website
epolady



Joined: 30 Jul 2002
Posts: 800
Location: Texas

PostPosted: Thu Jan 01, 2004 5:20 pm    Post subject: Reply with quote

Did you fix it? I went to your site and the images appeared in IE.
_________________
No more support from me. Goodbye!
Go upgrade to WordPress, you'll find better support there.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Feature requests All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group