Big Performance Tip: Specify a Custom Avatar Directory

Started by Something like that, September 30, 2007, 10:19:16 PM

Previous topic - Next topic

Chas Large

Quote from: curlin on February 08, 2010, 11:56:21 AM
Quote from: ppbz on February 08, 2010, 09:02:43 AM
hi there i'm on smf 2.0 rc2 and i've gone to

QuoteAdministration Center » Attachments and Avatars » Avatar Settings

and on 'Upload avatars to...' i've selected 'specify directory' but i can type anything in the two below boxes?

    I thought i was alone on this as it weirded me out  :o
See this discussion. There is a bug in 2.0 relating to this, the link in my post shows the fix to cure it. The instruction to move avatars has changed for 2.0 see the posts following.
HtH
Chas
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

steve51184

Quote from: Chas Large on February 08, 2010, 12:53:40 PM
Quote from: curlin on February 08, 2010, 11:56:21 AM
Quote from: ppbz on February 08, 2010, 09:02:43 AM
hi there i'm on smf 2.0 rc2 and i've gone to

QuoteAdministration Center » Attachments and Avatars » Avatar Settings

and on 'Upload avatars to...' i've selected 'specify directory' but i can type anything in the two below boxes?

    I thought i was alone on this as it weirded me out  :o
See this discussion. There is a bug in 2.0 relating to this, the link in my post shows the fix to cure it. The instruction to move avatars has changed for 2.0 see the posts following.
HtH
Chas

sweet thank you :)

steve51184

ok folders changed now but when i go to the below address it just takes me to 'Attachments and Avatars » File Maintenance' and no avatars have been moved?

Quotehttp://domain.com/index.php?action=admin;area=manageattachments;sa=maintenance

Chas Large

Quote from: ppbz on February 08, 2010, 01:31:16 PM
ok folders changed now but when i go to the below address it just takes me to 'Attachments and Avatars » File Maintenance' and no avatars have been moved?

Quotehttp://domain.com/index.php?action=admin;area=manageattachments;sa=maintenance
You need to run the script to move the avatars from the current location in Attachments to the new folder, see the post under the one I pointed you to earlier.
Your link does not work and just points to a domain registration page. Perhaps the URL is not yet live.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

steve51184

Quote from: Chas Large on February 08, 2010, 02:07:30 PM
Quote from: ppbz on February 08, 2010, 01:31:16 PM
ok folders changed now but when i go to the below address it just takes me to 'Attachments and Avatars » File Maintenance' and no avatars have been moved?

Quotehttp://domain.com/index.php?action=admin;area=manageattachments;sa=maintenance
You need to run the script to move the avatars from the current location in Attachments to the new folder, see the post under the one I pointed you to earlier.
Your link does not work and just points to a domain registration page. Perhaps the URL is not yet live.

I replace my domain with domain.com lol

Owdy

Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Arantor


steve51184


Arantor

Quote from: ppbz on February 08, 2010, 05:14:15 PM
so can anyone help me please?

So you've set the folders up right?

You know, you could read the first post in this thread again which gives you the proper address you go to, putting your website at the front though.

steve51184

Quote from: Arantor on February 08, 2010, 05:35:16 PM
Quote from: ppbz on February 08, 2010, 05:14:15 PM
so can anyone help me please?

So you've set the folders up right?

You know, you could read the first post in this thread again which gives you the proper address you go to, putting your website at the front though.

i've done the folder and i did set the link up right i showed you how i had it before... (changed my domain to domain.com thought)

Arantor

So you've used domain.com/index.php?action=admin;area=manageattachments;sa=moveAvatars

Because if you have... you haven't said that. All you've said:

Quote from: ppbz on February 08, 2010, 01:31:16 PM
ok folders changed now but when i go to the below address it just takes me to 'Attachments and Avatars » File Maintenance' and no avatars have been moved?

Quotehttp://domain.com/index.php?action=admin;area=manageattachments;sa=maintenance


Different URL entirely.

steve51184

Quote from: Arantor on February 08, 2010, 05:53:31 PM
So you've used domain.com/index.php?action=admin;area=manageattachments;sa=moveAvatars

Because if you have... you haven't said that. All you've said:

Quote from: ppbz on February 08, 2010, 01:31:16 PM
ok folders changed now but when i go to the below address it just takes me to 'Attachments and Avatars » File Maintenance' and no avatars have been moved?

Quotehttp://domain.com/index.php?action=admin;area=manageattachments;sa=maintenance


Different URL entirely.

i've used the index.php?action=admin;area=manageattachments;sa=moveAvatars one but it redirects to index.php?action=admin;area=manageattachments;sa=maintenance

Arantor


steve51184


curlin

Hoss Talk At Thoroughbred Junkie

waruna

Quote from: Chas Large on February 08, 2010, 12:53:40 PM
See this discussion. There is a bug in 2.0 relating to this, the link in my post shows the fix to cure it. The instruction to move avatars has changed for 2.0 see the posts following.
HtH
Chas

Sorry for being hard to understand. Can I have details instruction on how to specify a custom avatar directory for RC2? I know in RC2 there's a bug in Upload directory text box. But I'm confuse which instruction should I follow to make this thing done. :(

Thanks for helping.
Trust of Lust

steve51184

is there a manual way to move as the link for rc2 isn't working as it moves nothing :\

Chas Large

Quote from: waruna on February 13, 2010, 02:29:43 AM
Quote from: Chas Large on February 08, 2010, 12:53:40 PM
See this discussion. There is a bug in 2.0 relating to this, the link in my post shows the fix to cure it. The instruction to move avatars has changed for 2.0 see the posts following.
HtH
Chas

Sorry for being hard to understand. Can I have details instruction on how to specify a custom avatar directory for RC2? I know in RC2 there's a bug in Upload directory text box. But I'm confuse which instruction should I follow to make this thing done. :(

Thanks for helping.
You need to fix the bug in RC2 by changing the two instances of updateStatus to FUpdateStatus in ManageAttachments.php as described in the notes HERE
You can then enter the Name and URL of the new Avatar directory in the boxes.

Once you have done that you then run the code to move the Avatars from the current attachment directory to the new directory. To do this add the code in the browser address bar like this.

http://yourdomain/yourforum/index.php?action=admin;area=manageattachments;sa=moveAvatars
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

waruna

So that means I have to open Source/ManageAttachmenst.php, and find:

// External avatars?
array('title', 'avatar_external'),
array('permissions', 'profile_remote_avatar', 0, $txt['avatar_external_url_groups']),
array('check', 'avatar_download_external', 0, 'onchange' => 'updateStatus();'),
array('text', 'avatar_max_width_external', 6),
array('text', 'avatar_max_height_external', 6),
array('select', 'avatar_action_too_large',
array(


And replace the whole code above with:

Index: ManageAttachments.php
===================================================================
--- ManageAttachments.php   (revision 9462)
+++ ManageAttachments.php   (revision 9463)
@@ -229,7 +229,7 @@
       // External avatars?
       array('title', 'avatar_external'),
          array('permissions', 'profile_remote_avatar', 0, $txt['avatar_external_url_groups']),
-         array('check', 'avatar_download_external', 0, 'onchange' => 'updateStatus();'),
+         array('check', 'avatar_download_external', 0, 'onchange' => 'fUpdateStatus();'),
          array('text', 'avatar_max_width_external', 6),
          array('text', 'avatar_max_height_external', 6),
          array('select', 'avatar_action_too_large',
@@ -247,7 +247,7 @@
          array('text', 'avatar_max_height_upload', 6),
          array('check', 'avatar_resize_upload', 'subtext' => $txt['avatar_resize_upload_note']),
          array('check', 'avatar_download_png'),
-         array('select', 'custom_avatar_enabled', array($txt['option_attachment_dir'], $txt['option_specified_dir']), 'onchange' => 'updateStatus();'),
+         array('select', 'custom_avatar_enabled', array($txt['option_attachment_dir'], $txt['option_specified_dir']), 'onchange' => 'fUpdateStatus();'),
          array('text', 'custom_avatar_dir', 40, 'subtext' => $txt['custom_avatar_dir_desc'], 'invalid' => !$context['valid_custom_avatar_dir']),
          array('text', 'custom_avatar_url', 40),
    );


Is that right sir? Thanks.
Trust of Lust

Chas Large

Quote from: ppbz on February 13, 2010, 02:34:09 AM
is there a manual way to move as the link for rc2 isn't working as it moves nothing :\
Providing you have created the directory (I created mine in FTP and gave it 777 permission). then the code to move the files does work. There is no easy manual way to move them and cross reference them back to the profile. If you have a lot of members with uploaded avatars then ask them to re-upload them and they will be placed in the new directory from now on.

Are you sure you fixed the bug correctly as shown HERE?
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Advertisement: