miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /   

Add avatar img to anonymous user

Author bjcolsn
Registered
#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 | Edited by: Paul 
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
Registered
#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
Registered
#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 Top

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

 Short link for this topic:

 ?
You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB