miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Official Addons and Solutions miniBB Support Forums / Official Addons and Solutions /  
 

Avatars

 
 
Page  Page 6 of 9:  « Previous  1  2  3  4  5  6  7  8  9  Next »

Author Paul
Lead Developer 
#76 | Posted: 6 Nov 2006 04:11 
Instead of

$maxFileSize=5120;

setting of addon_avatar.php you should have an additional code:

$availMods=array();
foreach($mods as $key=>$val) {
foreach($val as $modId) {
if(!in_array($modId, $availMods)) $availMods[]=$modId;
}
}
if($user_id==1 or in_array($user_id, $availMods)) $maxFileSize=10240;
else $maxFileSize=5120;

First condition defines the maximum size for admins and moderators, second one - for regular users.

Author Anonymous
Guest
#77 | Posted: 6 Nov 2006 10:39 
Awesome! Thanks

Author Anonymous
Guest
#78 | Posted: 6 Nov 2006 11:07 
is it possible to allow image links for avatars?

in other words, instead up uploading a file, you can put a link from another web site for avatar, and it loads off of site?

Author Paul
Lead Developer 
#79 | Posted: 6 Nov 2006 12:56 
No, it's not allowed.

It's a very bad solution! You can't even imagine how many broken links are on the web... It's a very bad outlook, when you came up to the page with dead images. I often see that in other forum software... I dislike it. I doesn't look good. Sorry :-)

Author Anonymous
Guest
#80 | Posted: 6 Nov 2006 13:30 
The image does not show as anything Paul. No broken-image square.

Author Paul
Lead Developer 
#81 | Posted: 6 Nov 2006 16:21 
The image does not show as anything Paul. No broken-image square
- that only can mean it either is not build for the viewing thread page at all, either something is messed up in templates. Unfortunatelly, I can not say more without debugging... as our forum rules say: if you can not repeat the problem on our test server, where all addons are compiled in default versions, it is on your very own side.

Author athlon_crazy
Partaker
#82 | Posted: 25 Dec 2006 08:09 
I try to find my problem answer around this forum b4. But, stil nothing happen in my user preference..I suspect, It could be a different data field problem.. Hope, someone can guide me here.

addon_avatar.php
$avatarDbField='user_custom1'; //*

user_dataform.html
{$avatarForm}

setup_option.php
$userInfoInPosts=array($dbUserSheme['user_custom1'][1]); //*For my avatar add-on
$userInfoInPosts=array($dbUserSheme['user_custom2'][1]); //*For my signature add-on

bb_plugins.php
function parseUserInfo_user_custom1($av){ //*is it true?

avatar_eng.php
$l_avatar='Avatar';
$l_uploadAvatar='Upload new avatar';
$l_deleteAvatar='Delete current avatar';
$l_chooseAvatar='Choose avatar from list';
$l_chooseFile='Choose file';
$l_uploadError='There was an error uploading the file! Probably, it has illegal type, too big size, or was not uploaded for some technical reasons. Please, try again or contact administrator for more.';
$l_usrInfo[12]='User Avatar';

main_posts_cell.html
{$userInfo_user_custom1[$poster_id]}

Thanks

Author Paul
Lead Developer 
#83 | Posted: 26 Dec 2006 11:01 
You are defining $userInfoInPosts array twice, and it has only the last value specified. You should have

$userInfoInPosts=array($dbUserSheme['user_custom1'][1], $dbUserSheme['user_custom2'][1]);

Author athlon_crazy
Partaker
#84 | Posted: 12 Jan 2007 00:56 
So, in my addon_avatar.php
$avatarDbField=('user_custom1')'; or ?

Author Paul
Lead Developer 
#85 | Posted: 12 Jan 2007 03:17 
$avatarDbField is set correctly I suppose. Pay attention at the option I described above, it's a very common mistake of all users.

Author JaWe
Guest
#86 | Posted: 26 Jan 2007 12:58 
I have a problem. Cannot upload avatars. both "shared_files" and "shared_files/avatars" are chmod 0777 and the script created the "avatars" folder.

"if(isset($_FILES['userfile']) and is_uploaded_file($_FILES['userfile']['tmp_name'])){"
fails. "isset($_FILES['userfile']" is true but "is_uploaded_file($_FILES['userfile']" is false. Any ideawhat could be wrong? Uploading works with other scripts.

print_r($_FILES['userfile']
) gives:

Array
(
[name] => b_compose.gif
[type] =>
[tmp_name] =>
[error] => 6
[size] => 0
)

Author Paul
Lead Developer 
#87 | Posted: 27 Jan 2007 14:55 
I actually don't know what the reason may be, but I've checked by error #6 for this array and found this:

Value: 6; Missing a temporary folder.

I recommend to remove the folder 'avatars' which has been created by PHP, and create this folder manually, giving permissions for writing (0777).

Author JaWe
Partaker
#88 | Posted: 28 Jan 2007 13:06 
Problem solved! /tmp directory was missing from server. I emailed the administrator and they fixed it so now everything is working perfectly. I have two accounts and domains on same server and they had forgotten to create /tmp directory for other account.

The reason why I couldn't figure out what was wrong was because uploads were working in other account but not under other domain and account on same server where I have miniBB installed. So this was server side problem, nothing was wrong with my configuration or script. Thanks for your time trying to help.

Author Graf
Partaker
#89 | Posted: 4 Jul 2007 12:50 
I had same problem as hokic. (.mbb not suported by server)

And i found a reason without mail to provider.
If u running Apache server just create file .htaccess in forum/shared_files/avatars. .htaccess must contain string
AddType image .mbb
If u have another server read http://developer.mozilla.org/en/docs/Properly_Configuring_Server_MIME_Types

Hope it wil help someone!

Author Anonymous
Guest
#90 | Posted: 31 Dec 2007 12:32 
Hi, it would be great if you could add an option to use image links for avatars. I am a moderator of a board with more than 260.000 users and I disagree with the argument of Paul. I don't know what kind of boards you are using but the majority uses linked avatars for some reasons (traffic, webspace) ;-)

I think a lot of people would thank you very much for an implementation like this...

Page  Page 6 of 9:  « Previous  1  2  3  4  5  6  7  8  9  Next » 
Official Addons and Solutions miniBB Support Forums / Official Addons and Solutions /
 Avatars
 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
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑