Fight the automated spam - protect your miniBB-forums,
getting the Captcha addon! Click here to read more.
Captcha Addon for miniBB
miniBB ®
 
miniBB Community Forum
 | Forums | File Bank | Sign Up | Reply | Search | Statistics | Manual |
Official Addons and Solutions miniBB Community Forum / Official Addons and Solutions /

Avatars add-on discussions

 Page:  ««  1  2  3  4  5  6  7  »» 
Paul
CEO
#76 | Posted: 6 Nov 2006 04:11
Reply 
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.
Anonymous
Guest
#77 | Posted: 6 Nov 2006 10:39
Reply 
Awesome! Thanks
Anonymous
Guest
#78 | Posted: 6 Nov 2006 11:07
Reply 
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?
Paul
CEO
#79 | Posted: 6 Nov 2006 12:56 | Edited by: Paul
Reply 
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 :-)
Anonymous
Guest
#80 | Posted: 6 Nov 2006 13:30
Reply 
The image does not show as anything Paul. No broken-image square.
Paul
CEO
#81 | Posted: 6 Nov 2006 16:21
Reply 
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.
athlon_crazy
Forums Member
#82 | Posted: 25 Dec 2006 08:09
Reply 
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
Paul
CEO
#83 | Posted: 26 Dec 2006 11:01
Reply 
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]);
athlon_crazy
Forums Member
#84 | Posted: 12 Jan 2007 00:56
Reply 
So, in my addon_avatar.php
$avatarDbField=('user_custom1')'; or ?
Paul
CEO
#85 | Posted: 12 Jan 2007 03:17
Reply 
$avatarDbField is set correctly I suppose. Pay attention at the option I described above, it's a very common mistake of all users.
JaWe
Guest
#86 | Posted: 26 Jan 2007 12:58
Reply 
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
)
Paul
CEO
#87 | Posted: 27 Jan 2007 14:55 | Edited by: Paul
Reply 
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).
JaWe
Forums Member
#88 | Posted: 28 Jan 2007 13:06 | Edited by: JaWe
Reply 
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.
Graf
Forums Member
#89 | Posted: 4 Jul 2007 12:50
Reply 
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!
Anonymous
Guest
#90 | Posted: 31 Dec 2007 12:32
Reply 
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:  ««  1  2  3  4  5  6  7  »» 
Your Reply

» Username  » Password 
You are welcome to post anonymously by entering a nickname with no password (if that nickname has not been taken by another member) or by leaving both fields empty. If you have a forums membership 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.

 
Online now: Guests - 7
Members - 0
Most users ever online: 214 [11 Jan 2009 10:23]
Guests - 214 / Members - 0

Forums are powered by miniBB®