On these pages are my WordPress plugins, the odd article and my Support Forum.

For my random rantings on everything else please visit my blog at Yellow Swordfish

WP Plugins


Articles

If you find any of my plugins useful, please comsider a donation towards my running costs.

Thank you

In preparation for the release of Simple:Press Version 4.0, the Support Forum has moved to a new site dedicated to the plugin. This will also be the future home for Simple:Press Forum.


Version 3.1.4 will still be available for download here in the short term.


For the support forum - and to visit our new site and to get details of version 4.0, click on the logo to take you to simplepressforum.com

This forum is currently locked - access is read only
Current User: Guest
Please consider registering

 
Search Forums:


 




code for sfavatar changed?

UserPost

10:39 am
25 May 2008


Puttee

Guest

1

Hi,

on my wordpress I'm useing a Code to show avatars (from simple forum member) in wordpress comments, if existing. Since v3.11 only the default Avatar of those members is showing. Following an excerpt of the code:

<?php
if ($comment->user_id != '0') { // Kein Gastkommentator
    $user_forum_ava = get_usermeta($comment->user_id,'sfavatar');
    if (!empty($user_forum_ava)) {
        echo(”<img src=\”/wp-content/forum-avatars/”.$user_forum_ava.”\”>\n”);
    } else {
        echo(”<a href=\”http://www.miranda-fusion.de/?page_id=11&amp;profile=user\”><img src=\”/wp-content/forum-avatars/userdefault.png\”></a>\n”);
    }
} else { // Ist Gastkommentator
    echo get_avatar( $comment, $size = '32', $default = 'http://www.miranda-fusion.de/wp-content/forum-avatars/guestdefault.png' );
}
?>

This code uses “sfavatar”, before that it was “wp-sfavatar” And it worked, but not now. So the question, has it changed dramatically?

btw, another question, is it possible to read out a special number of TOP posters of SF and show it in the wordpress sidebar? (maybe with avatar and last posting)

thx in advance
puttee.de

11:09 am
25 May 2008


Yellow Swordfish

Admin

Peterborough, England

posts 5252

2
  1. Yes the code has changed. We no longer store the avatar name in the WP usermeta table but in  the new forum table 'sfmembers'. This new table has given us more flexibility and, most importantly, some major performance benefits in some key areas.
  2. Were you aware that there is a new template tag to do this for you? (see template tags online help)
  3. There is also a template tag for the stats info.

12:53 pm
25 May 2008


Puttee

Guest

3

thx for answering,

sorry but my php knowledge is worst than basic :-/
My code (above) uses a query to show gravatar and/or avatar if set. So i would use this code in future, but how to? what line i have to change :-S Can you help me please?

2:06 pm
25 May 2008


Yellow Swordfish

Admin

Peterborough, England

posts 5252

4

To show your forum members avatar you just need this:

<?php sf_show_members_avatar($user_id); ?>

and pass into it the the users ID



Reply to Topic: code for sfavatar changed?

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Guest URL (required)

Math Required!
What is the sum of: 7 + 10        (Required)

Topic Reply:


 
 

About the Stuff at Yellow Swordfish forum

Currently Online:

20 Guests

Maximum Online: 71

Forums:

Groups: 3

Forums: 16

Topics: 2068

Posts: 14091

Members:

There are 1003 members

There are 837 guests


Yellow Swordfish has made 5252 posts

Top Posters:

Mr Papa - 1602

-Radio- - 558

ovizii - 114

jfv - 82

angelic007 - 72

Administrator: Yellow Swordfish | Moderators: Yellow Swordfish, Mr Papa, -Radio-


© Simple:Press Forum - Version 3.1.4 (Build 357)