miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /  
 

Add avatar img to anonymous user

 
Author bjcolsn
Partaker
#1 | Posted: 20 Oct 2014 00:23 
Hi !
i've tried to add a small image avatar to anonymous profile by updating $l_anonymous in the language file to :
$l_anonymous='Anonymous <br><img="imageURL">'

Yet this led to several bugs. Why ? What can i do please ? Thanks !
Bj

Author Paul
Lead Developer 
#2 | Posted: 20 Oct 2014 00:57 
Possibly the most easy way is to edit the core file and add such a stuff there.

bb_func_vthread.php - locate the code which looks like

else {
if($cols[1]!=$l_anonymous) $viewReg=$l_anonymous;
else $viewReg='';
$pLink1='';
$pLink2='';
}
there, you may add something to $viewReg=$l_anonymous; definition. For example,

$viewReg=$l_anonymous.'<br /><img src=""...>';
Another (non-destructive way) would be to install the Avatars add-on for members and then modify parseUserInfo_user_custom1 function from bb_plugins.php so it also generates the content for Guests.

Author bjcolsn
Partaker
#3 | Posted: 20 Oct 2014 18:19 
Hi Paul ! thanks for your quick reply.
This works great as long as the guest choses a username : the image shows up - but it doesnt when the guest leaves "username" empty.

Author Paul
Lead Developer 
#4 | Posted: 21 Oct 2014 16:10 
Logically, you should add the same then to the second $viewReg appearance :) i.e. instead of

else $viewReg='';
try

else $viewReg='<br /><img src=""...>';

Author bjcolsn
Partaker
#5 | Posted: 21 Oct 2014 17:08 
GREAT ! tx Paul :)
Bj

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 Add avatar img to anonymous user
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑