Welcome Guest [Log In] [Register]
This board has been archived and is no longer accepting new questions. If you have a support question for your ZetaBoard, please visit us at the new support board. Registration is free and easy.


Visit the NEW ZetaBoards Support forum!

Username:   Password:
Add Reply
Images in profile fields?
Topic Started: Feb 16 2008, 07:07 AM (1,175 Views)
Nemesis
Member
[ * ]
A member of my board had a brilliant idea.

The idea was this: using extra profile fields only editable by admins, it would be possible to have a "medals" system to show each member's achievements.

However, to my knowledge, it isn't possible to use images in profile fields. Does anyone know of a CSS/Javascript hack that I can use to show images in a profile field?
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
i'm stanley nao
[ *  *  *  *  * ]
Here is a version of the code, but it will do it to every single profile field if it contains http:// in it.

Code:
 
<script type="text/javascript">
//<![CDATA[
$(function () {
$("dl.user_profile dd:contains('http://')").each(function () {
var item = $(this).html();
$(this).html('<img src="' + item + '"/>');
});
});
//]]>
</script>


I am checking now whether it works or not.

EDIT: http://s1.zetaboards.com/replace/topic/94289/1/#new

Yeah, it works :D.
Edited by Viral, Feb 16 2008, 04:19 PM.
Offline Profile Quote Post Goto Top
 
CaptBlarg
Member Avatar
I has corn.
[ *  * ]
nice :D im bookmarking this page
Offline Profile Quote Post Goto Top
 
Nemesis
Member
[ * ]
Hooray! Thank you so much. It seems to be working quite happily.

To be honest I tried playing about with the jQuery tutorial myself, but made a right mess of it.

Anyway, I hope this comes in useful for more people, besides myself.
Offline Profile Quote Post Goto Top
 
happysoup
Member Avatar
Member
[ *  * ]
Er.. borrowing this topic..
How do i get this to work for different members?
I am waiting to try out all Viral's code! :D
Offline Profile Quote Post Goto Top
 
RyuraGS
Member Avatar
Member
[ *  *  * ]
happysoup
Feb 24 2008, 09:03 AM
Er.. borrowing this topic..
How do i get this to work for different members?
I am waiting to try out all Viral's code! :D
It already works on all members.
Offline Profile Quote Post Goto Top
 
happysoup
Member Avatar
Member
[ *  * ]
Er.. I mean to like work differently for different members, like member A uses image A and member uses image B. Is it possible with this code?
And er, how do i change the image?

Thanks! :)
Offline Profile Quote Post Goto Top
 
RyuraGS
Member Avatar
Member
[ *  *  * ]
happysoup
Feb 25 2008, 02:02 AM
Er.. I mean to like work differently for different members, like member A uses image A and member uses image B. Is it possible with this code?
And er, how do i change the image?

Thanks! :)
Again, it already does this. To change the image you just have to change the URL in the profile field.
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
i'm stanley nao
[ *  *  *  *  * ]
Hover on the link above saying Preferences, in the dropdown, click on Update Profile. Then in the profile field add the image link. It will do this for everyone who has an image link in the profile fields.
Offline Profile Quote Post Goto Top
 
Christian
Member Avatar
Member
[ *  *  * ]
Viral
Feb 25 2008, 06:26 PM
Hover on the link above saying Preferences, in the dropdown, click on Update Profile. Then in the profile field add the image link. It will do this for everyone who has an image link in the profile fields.
Do you just post the direct image link, or do you need image tags as well?
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Coding & Modifications · Next Topic »
Add Reply