Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

how to make default profile avatar

Asked Modified Viewed 4,641 times
S
sekum
S
sekum 10
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 9 threads in the forums
  • Started this discussions
asked
Junior Member

hi all fusioneer...:)

anyone can help me to make a default profile avatar?
recently, i have noticed that in PHPFusion CMS if there is no avatar uploaded, in the profile avatar will be blank [no picture at all]..
I wonder to make some modification in the avatar section, so if there is no avatar uploaded, a default avatar will be show up [like a siluet picture maybe]..but i don't know where to start the modification of the code script...anyone can help me, please?..thanks...

GO PHPFusion !!! :@
www.kotakhitam.net
0 replies

3 posts

F
fanggaming
F
  • Junior Member, joined since
  • Contributed 43 posts on the community forums.
  • Started 3 threads in the forums
answered
Junior Member

in forums/viewthread.php

change this line

if ($data['user_avatar'] && file_exists(IMAGES."avatars/".$data['user_avatar'])) {
echo "<img src='".IMAGES."avatars/".$data['user_avatar']."' alt='".$locale['567']."' /><br /><br />\n";
}



to:

if ($data['user_avatar'] && file_exists(IMAGES."avatars/".$data['user_avatar'])) {
echo "<img src='".IMAGES."avatars/".$data['user_avatar']."' alt='".$locale['567']."' /><br /><br />\n";
} else {
echo "<img src='".IMAGES."avatars/default.jpg' alt='No User Avatar' /><br /><br />\n";
}


Make sure you change the file name "default.jpg" to your image path and that work :)
0 replies
S
sekum
S
sekum 10
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 9 threads in the forums
  • Started this discussions
answered
Junior Member

wow..thanks buddy..

i will try it...cheers..:P
0 replies
S
sekum
S
sekum 10
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 9 threads in the forums
  • Started this discussions
answered
Junior Member

@fangaming,..thanks a lot buddy...it works..!!!:D

www.bulletinrenewal.com
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 3 posts
  • Votes 0 votes
  • Topic users 2 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet