Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 14 Years, 3 Months, 2 Weeks ago Default Avatar
#1
Solved: 14 Years, 3 Months, 2 Weeks ago
Hi,
How do I fix this?

When a user registers and does not set an avatar I just get the dreaded missing image red cross (this only appears to happen on the portal page, on the forum pages the avatar just doesn't show), this is fixed when the user chooses an avatar.

How do I:

Set a default avatar for new users that haven't set their own.

Thanks
#2
Solved: 14 Years, 3 Months, 2 Weeks ago
The default profile plugin hasn't been updated to 1.6 yet, but the avatar doesn't show on the portal by default, so this is really an issue with how the avatar is being put on the portal.
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
#3
Solved: 14 Years, 3 Months, 2 Weeks ago
Thanks Matt,
My error!
I had put the avatar variable in one of the portal templates without considering how it was being called...dooooh!!

By the way,I love MyBB and everything about it, the day I found MyBB was a happy day for me and I could give up vBulletin for ever.

A Million Thanks.
#4
Solved: 14 Years, 3 Months, 2 Weeks ago
So its not possible without the Add-on?
#5
Solved: 14 Years, 3 Months, 2 Weeks ago
(2010-08-19, 01:55 PM)MadDogTen Wrote: So its not possible without the Add-on?
No. MyBB doesn't has an inbuilt No-avatar feature Sad

I will be making a plugin for it soon Wink
#6
Solved: 14 Years, 3 Months, 2 Weeks ago
The existing plug in is very easy to update - change to 1.6 and remove the line that refers to the remember me column.

Thats it

remove
'defaultprofile_remember' => array('Remember Login', 'Remember login status next time the user visits?', 'yesno', '1'),

and

		if($mybb->settings['defaultprofile_remember'] == 1)
		{
			$user->user_insert_data['remember'] = 1;
		}
		else
		{
			$user->user_insert_data['remember'] = 0;
		}

Or if you want a default avatar showing in posts and don't want to use the profile plugin you can use php in templates and put in an if function in the post bit.

<td class="tcat">
				<div class="float_left smalltext">
                                        <if $post['avatar'] then>
                                        <a href="member.php?action=profile&amp;uid=$post[uid]"><img src="{$post['avatar']}" alt="avatar" /></a>
                                        <else>
                                        <img src="{$mybb->settings['bburl']}/images/avatars/guestfish.gif"  alt="avatar" />
                                        </if>						
                                        <strong>{$post['profilelink']}</strong>{$post['postdate']}, {$post['posttime']} 
                                        <div><span id="edited_by_{$post['pid']}"></span></div>
				</div>
				{$post['posturl']}
			</td>

guestfish is the name I gave my guest avatar, that is my horizontal post bit but I think it is clear what to do


EDIT : sorry, missed one, edited post.


Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


#7
Solved: 14 Years, 3 Months, 2 Weeks ago
This Plug-in:
http://mods.mybb.com/view/default-profile
?

#8
Solved: 14 Years, 3 Months, 2 Weeks ago
(2010-08-19, 04:28 PM)MadDogTen Wrote: This Plug-in:
http://mods.mybb.com/view/default-profile
?

yup

http://mods.mybb.com/archive/view/default-profile



Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


#9
Solved: 14 Years, 3 Months, 2 Weeks ago
The Plugin didn't work, I Changed the Version and Removed everything you said, but it wont set the Avatar.
#10
Solved: 14 Years, 3 Months, 2 Weeks ago
Hmm, its working fine for me. Did you use notepad++ as the editor? Did you install the plugin? Obviously this is for NEW users, not existing users. That is what the OTHER code can do for you, the code in the postbit etc
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved




Forum Jump:


Users browsing this thread: 1 Guest(s)