1
martinw2008
Yogurt - avatar problem
  • 2009/8/7 1:52

  • martinw2008

  • Just popping in

  • Posts: 9

  • Since: 2008/9/4 1


Hi
Can someone help me to solve out this problem?
A user decides to delete his picture(this picture is set as an avatar).When he clicks a delete button, user_avatar in database still remains unchanged(user_avatar line was supposed to be emptied and then automatically changed to blank.gif).
How to fix it? I think that a code needs to be changed here yogurt/class/yogurt_images.php

2
martinw2008
Re: Yogurt - avatar problem
  • 2009/8/7 7:11

  • martinw2008

  • Just popping in

  • Posts: 9

  • Since: 2008/9/4 1


I think that this code $sql = sprintf("DELETE FROM %s WHERE user_avatar = %u", $this->db->prefix('users'), $users->getVar('user_avatar')); should be placed below these lines in delpicture.php:
* Try to delete
*/
if ($album_factory->deleteAll($criteria)){

if ($xoopsModuleConfig['physical_delete']==1){
//unlink($xoopsModuleConfig['path_upload']."\/".$image_name);
unlink(XOOPS_ROOT_PATH."/uploads"."\/".$image_name);

unlink(XOOPS_ROOT_PATH."/uploads"."\/resized_".$image_name);
/**
* Delete the thumb (avatar now has another name)
*/
//if ($avatar_image!=$image_name){
unlink(XOOPS_ROOT_PATH."/uploads"."\/thumb_".$image_name);
//}

}

Please help me to fix it.

3
martinw2008
Re: Yogurt - avatar problem
  • 2009/8/8 6:54

  • martinw2008

  • Just popping in

  • Posts: 9

  • Since: 2008/9/4 1


Still no answer to my question.

4
martinw2008
Re: Yogurt - avatar problem
  • 2009/8/11 2:51

  • martinw2008

  • Just popping in

  • Posts: 9

  • Since: 2008/9/4 1


Nevermind,I fixed it.

5
ghia
Re: Yogurt - avatar problem
  • 2009/8/11 7:51

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


What was the solution?

Login

Who's Online

381 user(s) are online (299 user(s) are browsing Support Forums)


Members: 0


Guests: 381


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits