News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Big Performance Tip: Specify a Custom Avatar Directory

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

Previous topic - Next topic

searchgr

Did u change the link in Adm = Attachments & avatars - Avatars settings?


PLs let me know if the performance has been improved.


Thanks

teos55

  Left the server settings as it is and changed only uploadable avatars part.  Then executed moveavatars ...
Should I also change the server part to the new directory ?

teos55

  Ha ha found the mistake ,
In the "uploadable avatars"  I coded "www.xxx.org/httpdocs/avs"  which should be "www.xxxx.org/avs" .
Found it by coincedance while digging for another issue.
Thanks guiding me to look into settings.
Case closed
Oguz

Quote from: teos55 on April 29, 2011, 04:02:27 AM
  Left the server settings as it is and changed only uploadable avatars part.  Then executed moveavatars ...
Should I also change the server part to the new directory ?

searchgr

Have you seen any improvement in the performance?

teos55

  Unfortunately not. Since I'm running a shared hosting, most of the issues are related to this environment.
Thanks for your follow up

Martine M

I got the avatars moved and ran sql

UPDATE `smf_attachments` SET `attachment_type` = '1' WHERE `smf_attachments`.`ID_MEMBER` != 0

But avatars of people who uploaded them don't show anymore, table prefix is the same.

I did it all at my test forum so no harm done.
Running SMF 2.09 - Diego Andrés Theme Elegant Mind - TP 1.0 - Main Forum language English - Browser Firefox 33


Martine M

it's solved.
I made a mistake filled in twice the directory of the specific avatar, instead of once the url.

I'm going to do this at the live forum now and let you know if things speed up.
Running SMF 2.09 - Diego Andrés Theme Elegant Mind - TP 1.0 - Main Forum language English - Browser Firefox 33



Martine M

It did speed up, pages load good but It is still slow with posting.
Changed some other settings now, so I hope that will help to.
Or maybe it is the host to although they say everything fine at there end.
Running SMF 2.09 - Diego Andrés Theme Elegant Mind - TP 1.0 - Main Forum language English - Browser Firefox 33


ladiewinter

If anyone is still helping with this thread, I was wondering what I can do about the avatar directory.  Here's the problem: when I select the option to upload it to a specific directory, as is recommended, the page does not allow me to actually enter that specific directory into the box below this.  I've clicked on it, and nothing happens.  I can't type in it, and can't add anything to it in any way.  Does anyone know why this is, and how I can fix it? 

Any help is greatly appreciated.  Thank you in advance. 

vistaway

I didn't see it mentioned, but there is a small typo in the first post:

SMF 1.1: index.php?action=manageattachments;sa=moveAvatar

Should be:

SMF 1.1: index.php?action=manageattachments;sa=moveAvatars


Feldunost

Hello,


Why we don't delete directly index.php file ?

Something is related ?


Thanks

IgorS

Hi.

I'm sorry that I unearthed this old topic, but I've got one question.

Can I do the same with attachments folder? My forum is something like photo-gallery and users upload photos to forum server. For each message there is at least one image (up to three).

Arantor

No, you can't. The avatars folder can be safely extracted like this, but the attachments folder cannot, for security reasons and privacy reasons.

IgorS

So it's unpossible to bypassing PHP in attachments (like in avatars) or it's "just" unsafe?

Arantor

If you consider having your server taken over as 'just' unsafe, I'd hate to consider what you consider actually unsafe.

Let me explain. Prior to SMF 1.1.9 / 2.0 RC1-1, it was possible to hack an SMF installation through the attachments system. It was possible to the point where entire servers were taken over. All because of this 'bypassing'. Which is why 1.1.9 / 2.0 RC1-1 disabled that little 'helpful' facility.

rancid4all

hello
i have followed the instructions from page 1 and everythings working fine *thank you*
but i have another problem:
i have installed cometchat on my forum before this
now the cometchat getavatar function on integration failed to show avatar because the function gets the default address for avatar
it goes like this

function getAvatar($image) {

$avatar = explode('^',$image);
$avatar_name = $avatar[0];
$avatar_id = $avatar[1];

if($avatar_name == "")
{
if($avatar_id == "")
{
return BASE_URL.'../avatars/blank.gif';
}
else
{
return BASE_URL.'../index.php?action=dlattach;attach=' . $avatar_id . ';type=avatar';
}
}
elseif(strpos($avatar_name,'http',0) >= -1)
{
return $avatar_name;
}
else
{
return BASE_URL.'../avatars/' . $avatar_name;
}

}


so whats need to be changed?
would you guys kindly help me

kevin.michiels

Hi
I had some big problems lately with this so I decided to return things to what they where before.
The attachment directory.

Now when users upload avatars they are put in the original attachment folder = GOOD;
The only thing I cant mange to do is the current ones. Old Members profile pictures are still directing to the old non existing directory.
I want to move the old avatars back to the attachment folder.
How can this be achieved ? Cause the index.php?action=manageattachments;sa=moveAvatars is not working.


Arantor

Are you using SMF 2.0 or 1.1? If you're using 2.0, you need to re-read the instructions, as it says the URL is different.

kevin.michiels

I also tried index.php?action=admin;area=manageattachments;sa=moveAvatars and it changes moveAvatars at the end into maintenance.
Then redirects to "attachments and avatars" > "File maintenance ".
Avatars are not moved yet.

Advertisement: