PDA

View Full Version : Adding an image to a profile block


richards112
10-19-2008, 04:51 AM
Hello, i currently use vBuleltin 3.7.0
I was just wondering, how do i go about Adding an image to a profile box, that i created via the user profile field.
I would just like to know how i could add an image to the block.
Any ideas?
Thanks.

Lynne
10-19-2008, 09:23 PM
Have you tried using $userinfo[fieldxx] where xx is the field number?

richards112
10-21-2008, 07:20 AM
Ok so all i have to do is...

Create a profile field, then input the image HTML inside.
Then put the field number i put the image in
Then it will work?

Lynne
10-21-2008, 02:59 PM
Ok so all i have to do is...

Create a profile field, then input the image HTML inside.
Then put the field number i put the image in
Then it will work?
Well, since it's an image, you need to make sure that your use the field in <img> tags. You may also run into problems if your users don't fill out the field correctly. For instance, if you ask them to enter the full url (http://www.whatever.com/image.jpg), then you would write the tag as:
<img src="$userinfo[fieldxx]">
But, what if they don't follow directions and only input www.whatever.com/image.jpg ? Then when you write the tag, you will end up with a broken link. So, you may have to do some checking in the field. I've seen users talk about this here before, but I don't know how to do it so you'll have to search it out.

richards112
10-21-2008, 07:42 PM
I added that into the memberinfo_block template, with the desired field ID
But it still did not work, and i tried adding some HTML directly to it, and it changed the look of all my profile blocks.

So just to completely cut things down, just two questions.

1- Where do i put the <img src="$userinfo[fieldxx]">
2- do i put IMG code, or HTML code to the image?

The rest i will work out by myself
-Thanks

Lynne
10-21-2008, 07:55 PM
It would have been nice to see the code you tried and an image of the result.

I don't know where you put the image tag - you put it where you want the image to be shown. And, if you are modifying a template, then you need to use valid html for the image.

richards112
10-22-2008, 10:28 AM
Ok, i have found exactly what i want.
Its is like this, if you check out the block that says "member status" with an image into it

http://i244.photobucket.com/albums/gg15/112richard112/block.png

That is what i would like to do.
Thanks.

Lynne
10-22-2008, 02:02 PM
That doesn't show where you want it though. That is for a 3.6 board, and you are running 3.7 which is quite different. I would guess you will want to modify one of the memberinfo_block_xxxx templates to add in your field.