| User | Post |
|
12:30 pm 28 Mar 2008
| mark
Guest
| | | |
|
| |
|
|
Hi
First of all thank you mister swordfish for the great plugins!
But I have a little question. Wich php function shows the useres avatar? I want to integrate into a list called “the team”
thank you for your time and go on like thi
|
|
|
|
|
I think I must have written this post a dozen times!
sf-topiccomponents.php
function:
sf_render_avatar($icon, $userid, $useremail, $guestemail)
the $icon parameter must be set to 'admin', 'member' or 'guest'
the $userid speaks for itself or pass a null string if not a user
the last two also speak for themselves - the email address of the member and/or guest with the other being passed as a null.
The problem is that there is formatting (i.e., class assignments). So yiuld be better off copying the function and then changing it to suit.
A template tag for this is on the card
|
|
|
3:19 pm 28 Mar 2008
| mark
Guest
| | | |
|
| |
|
|
Sorry that you have to post theese things so often but is searched for avatar and didnt find anything
Im no php guru so can you say me what i have to include into my wordpress template for the team page ?
I Hope you are so kind
greetings mark
|
|
|
|
|
Well that was what post 2 was all about really. I can't help you with the parameters as i dont know your system.
|
|
|
4:14 am 29 Mar 2008
| mark
Guest
| | | |
|
| |
|
|
Its just a normal template i use in this wordpress page
and i want to show the avatar
so i dont know what to write in the src of the img tag!
i hope you got me now!
and go on like this with your great plugins i live them
|
|
|
|
|
Ah! I thought you were writing your own code.
Best approach will be await the next version of the forum as we hope to include a proper temlate tag for this.
Or - if you use the gravatar service - the forthcoming wp2.5 has a new temlate tag for this very purpose.
|
|
|
1:24 pm 31 Mar 2008
| mark
Guest
| | | |
|
| |
|
|
Hey
I tested now Gravatars and i dont like the system 
cant you say me the code snipped you used in the board software`?
thanks!
|
|
|
|
|
As I said already the code function is above. It's not just a matter of what you put in the src and if you do not code in php then you probably wont be able to do it.
We will be introducing a template tag for this very soon
|
|
|
4:16 pm 31 Mar 2008
| mark
Guest
| | | |
|
| |
|
|
Shit
what does soon mean? hours ,days , or weeks because i need it as fast as possible
thanks for your answer
|
|
|
|
|
If you are that impatient I suggest you find someone who can code it for you.
|
|
|
6:36 pm 1 Apr 2008
| mark
Guest
| | | |
|
| |
|
|
My budget is so low at the moment
cant you post it? i think a lot like to know the code for showing avatars in comment
|
|
|
|
|
I'm sorry but I do keep telling you that you will need code. There is nothing to post. I have also said that there will be a template tag in the next update. That will probably be around this weekend coming.
|
|
|
7:06 pm 1 Apr 2008
| mark
Guest
| | | |
|
| |
|
|
okay i will wait
i hope it will be this weekend
|
|
|
6:05 pm 2 Apr 2008
| Synister
Member
| | | |
|
| posts 8 |
|
|
hi mark,
here is how i am currently doing it.. i am using forum avatar to post on my comments wordpress page based on commentid.
<img src=”http://www.yourwebsite.com/wp-content/forum-avatars/<?php $myid = $wpdb->get_var(”SELECT id FROM wp_users WHERE user_login='”.get_comment_author().”';”); $myavatar = get_usermeta($myid, 'sfavatar'); if ($myavatar==””){ echo “commentdefault.jpg”; } else { echo $myavatar; } ?>” alt=”<? comment_author() ?>'s Avatar” class=”avatar” height=”30″ width=”30″ />
$myid is the id of the users avatar you want. (numeric id not string id)
if you already have the numeric id then get_usermeta($myid, 'sfavatar') will return the image name of the users avatar. return is null if there is no avatar so you would load a default image.
|
|
|
7:23 pm 7 Apr 2008
| mark
Guest
| | | |
|
| |
|
|
The avatar template tag is out now. But im not 100% Happy.
How can i give the avatars am max height and width so that they wont look bad like doing it with html image width if they are not in the right relation
greetz mark
|
|
|
|
|
I'm not happy tonight either. I've had a bitch of a day which included having to go shopping for shoes and I absolutely hate shopping for shoes. But I did pick up a new LED torch to replace mine with the broken on/off switch so that was good. And then when we got home the tree man came and told me it would cost about £1000 to pollard the Ash tree out front so that was sort of depressing as I wasn't expecting it to cost that much.
And when I finally sat down and opened up the laptop I found some bugs I needed to fix and a whole lot of people on the forum here asking questions that I have to answer.
So that's two of us not happy. As to your question.. the answer really is 'I don't know'.
|
|
|
8:52 pm 7 Apr 2008
| mark
Guest
| | | |
|
| |
|
|
Oh so im more unhappy if you are unhappy but don't worry be happy
If you can find some time to have a solution like show_avatars ( 50 , 60 ) or something like this
here i found somethin you can use i think
function resize_jpg($inputFilename, $new_side){ $imagedata = getimagesize($inputFilename); $w = $imagedata[0]; $h = $imagedata[1];
if ($h > $w) { $new_w = ($new_side / $h) * $w; $new_h = $new_side; } else { $new_h = ($new_side / $w) * $h; $new_w = $new_side; }
$im2 = ImageCreateTrueColor($new_w, $new_h); $image = ImageCreateFromJpeg($inputFilename); imagecopyResampled ($im2, $image, 0, 0, 0, 0, $new_w, $new_h, $imagedata[0], $imagedata[1]); return $im2; }
|
|
|
|
|
I'm sorry but I really do believe it is not the function of the forum system to be resizing images.
The easiest way is to edit the code and remove the size parameters…
|
|
|
10:17 am 8 Apr 2008
| mark
Guest
| | | |
|
| |
|
|
Okay i will try
where is the tag defined and the sice of the image
greetz
|
|
|
|
|
start with the new tag in 'sf-tags.php' and trace it back from there. The call it makes in the tag is to a function in the file 'sf-pagecomponents.php' that does all the work.
|
|
|
4:22 pm 8 Apr 2008
| mark
Guest
| | | |
|
| |
|
|
in wich line?
i cant finde the class sfavatartag ore something similar there i search the part <img class=”'sfavatartag” .-…..
greetz
|
|
|
|
|
where did you look? As I said, the tag is in sf-tags.php which calls the avatar display routine in sf-pagecomponents.php. In that routne the wifht and heoght are embedded into the image string. It's not hard to find if you look for it.
|
|
|
9:02 pm 8 Apr 2008
| mark
Guest
| | | |
|
| |
|
|
I cant find
here it says that it will be an img tag with the class of the avatar
/* ===================================================================
sf_show_avatar($forumids)
displays avatar of current user
parameters: None
returns: <img> class = 'sfavatartag' ====================================================================*/
function sf_show_avatar() { global $current_user;
sf_extend_current_user('', 0);
if($current_user->guest) $icon='guest'; if($current_user->member) $icon='user'; if($current_user->forumadmin) $icon='admin';
echo sf_render_avatar($icon, $current_user->ID, $current_user->user_email, $current_user->guestemail, true); return; }
But when I search in the sf-pagecomponets for the class i cant find it, so wehere is this defined? can you give me the line perhaps
|
|
|
|
|
Yes - apologies. My mistake. The routine was in sf-pagecomponents right up to V3 and it got moved to sf-topiccomponents.php. So apologies. I still keep looking in thw wrong place for quite a lot of routines.
sf_render_avatar()
|
|
|
7:45 am 23 Apr 2008
| faze one
Guest
| | | |
|
| |
|
|
i ve read the whole forum and, sir you are one of the most criptic people i have ever came across, Could you please post the code to add our aviatars in user comments on the BLOG, i know alot of people are asking for it, mabey sticky it to a hacks thread
this is drivin me bananas, are you just tryng to teach us a lesson, dude !
|
|