Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
coding-topic
if function_exists is returning false
Avatar
rickandersonaia
Edmonds, WA - USA
Member
sp_UserOfflineSmall Offline
Aug 24, 2014 - 3:23 pm

So, the plugin is installed and functioning properly.  In a function I'm using in my WordPress theme I am trying to call the logged in user's avatar.  The function below returns "whoops" -

if(function_exists('sp_UserAvatar')){
 sp_UserAvatar('tagClass=spImg spLeft');
 }else{
 echo 'whoops';
 }

do I need to include any API files before using this function?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 24, 2014 - 3:53 pm

Start by making a call to:

sp_forum_api_support();

which may be all you need. Let me know if that works for you.

andy-signature.png
YELLOW
SWORDFISH
Avatar
rickandersonaia
Edmonds, WA - USA
Member
sp_UserOfflineSmall Offline
Aug 24, 2014 - 4:53 pm

That did it.  Thanks for your help!smile

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 24, 2014 - 5:40 pm

good deal!  you are welcome!

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626