(2010-08-19, 09:28 PM)leesester Wrote: [ -> ]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
I used Wordpad.
I did Install the Plugin then Configure it.
I deleted my Test Account then Remade it.
Can you be more specific about what not works? I cannot post my modified file here because of the Licence on the original plugin.
Like when you make the testuser, do they get the default set up? Is it just the avatar that does not work? Are you getting MYSQL or PHP errors?
You need to go through the registration process to have the default avatar set up automatically. If you make them via the ACP then it will not work - its for when users REGISTER.
(2010-08-19, 03:58 PM)leesester Wrote: [ -> ]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&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
Hi Leesester,
My postbit template file looks like this and is quite different than yours:
{$ignore_bit}
<a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
<tbody>
<tr>
<td class="tcat">
<div class="float_left smalltext">
{$post['postdate']}, {$post['posttime']} <span id="edited_by_{$post['pid']}">{$post['editedmsg']}</span>
</div>
{$post['posturl']}
</td>
</tr>
<tr>
<td class="trow1 {$unapproved_shade}">
<table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
<tr>
<td class="post_avatar" width="1" style="{$post['avatar_padding']}">
{$post['useravatar']}
</td>
<td class="post_author">
<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
<span class="smalltext">
{$post['usertitle']}<br />
{$post['userstars']}
{$post['groupimage']}
</span>
</td>
<td class="smalltext post_author_info" width="165">
{$post['user_details']} <br />{$post['iconfacebook']}
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="trow2 post_content {$unapproved_shade}">
<span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>
<div class="post_body" id="pid_{$post['pid']}">
{$post['message']}
</div>
{$post['attachments']}
{$post['signature']}
<div class="post_meta" id="post_meta_{$post['pid']}">
{$post['iplogged']}
</div>
</td>
</tr>
{$post['fr_votes']}
<tr>
<td class="trow1 post_buttons {$unapproved_shade}">
<div class="author_buttons float_left">
{$post['fid9']}{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}
</div>
<div class="post_management_buttons float_right">{$post['social1']}{$post['button_spam']}{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}
</div>
</td>
</tr>
</tbody>
</table>
I´m not sure exactly where should I add your code into my postbit template.
The file "images/default_avatar.gif" comes in the MyBB package and I would like to use it for my non avatar friends in the board.
Could you give me a hand?...
...anyone?.
Thanks.
Hey Nayar,
Thanks...armmm...Activated it.
Should I put the values in the settings?
Edited: I think i got it!
This is great!, I think this should be in memberlist page too.
Thanks again.