• [Mod] Avatar v2.01 5 0 5 1
Currently:  

Author Topic: [Mod] Avatar v2.01  (Read 537947 times)

0 Members and 2 Guests are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Avatar v2.01
« Reply #450 on: September 10, 2010, 03:09:20 PM »
In that case you've changed something else, because what you were supposed to change is a HTML template, it could not possibly cause the error you've mentioned. Without that extra data inside <form> tag, you won't be able upload files through that form.

[EDIT]
The error you've mentioned doesn't show inside a form, it shows when you submit the form (save profile), it comes from incorrect modification of includes/upload.php
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Re: [Mod] Avatar v2.01
« Reply #451 on: September 10, 2010, 03:55:06 PM »
@Vano,

What i did is deleted my /upload.php  and replaced it with original upload.php and installed again very carefully the upload.php part modification. And i am still recieving problems regarding the fact it says parse error: syntax error, unexpected ';', expecting T_FUNCTION in /home/globa122/public_html/xxxxx/includes/upload.php on line 334

Code is below sir, When i add that part to the form tag <form> i seem to get that error above :( when 1 thing goes right 100 thing goes wrong for me i hate it

Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: upload.php                                           *
 *        Copyright: (C) 2002-2009 Jan Sorgalla                           *
 *            Email: jan@4homepages.de                                    * 
 *              Web: http://www.4homepages.de                             * 
 *    Scriptversion: 1.7.7                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/
if (!defined('ROOT_PATH')) {
  die(
"Security violation");
}

if (!
function_exists("is_uploaded_file")) {
  function 
is_uploaded_file($file_name) {
    if (!
$tmp_file = @get_cfg_var('upload_tmp_dir')) {
      
$tmp_file tempnam('','');
      
$deleted = @unlink($tmp_file);
      
$tmp_file dirname($tmp_file);
    }
    
$tmp_file .= '/'.get_basefile($file_name);
    return (
ereg_replace('/+''/'$tmp_file) == $file_name) ? 0;
  }

  function 
move_uploaded_file($file_name$destination) {
    return (
is_uploaded_file($file_name)) ? ((copy($file_name$destination)) ? 0) : 0;
  }
}

class 
Upload {

  var 
$upload_errors = array();
  var 
$accepted_mime_types = array();
  var 
$accepted_extensions = array();
  var 
$upload_mode 3;

  var 
$image_type "";
  var 
$max_width = array();
  var 
$max_height = array();
  var 
$max_size = array();
  var 
$upload_path = array();

  var 
$field_name;
  var 
$file_name;
  var 
$extension;

  var 
$image_size 0;
  var 
$image_size_ok 0;
  var 
$lang = array();

  function 
Upload() {
    global 
$config$lang;

    
$this->max_width['thumb'] = $config['max_thumb_width'];
    
$this->max_width['media'] = $config['max_image_width'];
    
$this->max_height['thumb'] = $config['max_thumb_height'];
    
$this->max_height['media'] = $config['max_image_height'];
  
$this->max_width['avatar'] = $config['avatar_width'];
  
$this->max_height['avatar'] = $config['avatar_height'];

    
$this->max_size['thumb'] = $config['max_thumb_size'] * 1024;
    
$this->max_size['media'] = $config['max_media_size'] * 1024;
    
$this->max_size['avatar'] = 99999999999;

    
$this->upload_mode $config['upload_mode'];
    
$this->lang $lang;

    
$this->set_allowed_filetypes();
  }

  function 
check_image_size() {
    
$this->image_size = @getimagesize($this->upload_file);
    
$ok 1;
    if (
$this->image_size[0] > $this->max_width[$this->image_type]) {
      
$ok 0;
      
$this->set_error($this->lang['invalid_image_width']);
    }

    if (
$this->image_size[1] > $this->max_height[$this->image_type]) {
      
$ok 0;
      
$this->set_error($this->lang['invalid_image_height']);
    }
    return 
$ok;
  }

  function 
copy_file() {
   if ($this->image_type == "avatar") {
    if (
file_exists($this->upload_path[$this->image_type]."/".$this->file_name)) {
        @
unlink($this->upload_path[$this->image_type]."/".$this->file_name);
      }
      
$ok move_uploaded_file($this->upload_file$this->upload_path[$this->image_type]."/".$this->file_name);
  }else{

    switch (
$this->upload_mode) {
    case 
1// overwrite mode
      
if (file_exists($this->upload_path[$this->image_type]."/".$this->file_name)) {
        @
unlink($this->upload_path[$this->image_type]."/".$this->file_name);
      }
      
$ok move_uploaded_file($this->upload_file$this->upload_path[$this->image_type]."/".$this->file_name);
      break;
    case 
2// create new with incremental extention
      
$n 2;
      
$copy "";
      while (
file_exists($this->upload_path[$this->image_type]."/".$this->name.$copy.".".$this->extension)) {
        
$copy "_".$n;
        
$n++;
      }
      
$this->file_name $this->name.$copy.".".$this->extension;
      
$ok move_uploaded_file($this->upload_file$this->upload_path[$this->image_type]."/".$this->file_name);
      break;
    case 
3// do nothing if exists, highest protection
    
default:
      if (
file_exists($this->upload_path[$this->image_type]."/".$this->file_name)) {
       
$this->set_error($this->lang['file_already_exists']);
       
$ok 0;
      }
      else {
        
$ok move_uploaded_file($this->upload_file$this->upload_path[$this->image_type]."/".$this->file_name);
      }
      break;
     }
    @
chmod($this->upload_path[$this->image_type]."/".$this->file_nameCHMOD_FILES);

    return 
$ok;
  }

  function 
check_max_filesize() {
    if (
$this->HTTP_POST_FILES[$this->field_name]['size'] > $this->max_size[$this->image_type]) {
      return 
false;
    }
    else {
      return 
true;
    }
  }

  function 
save_file() {
    global 
$user_info;

    
$this->upload_file $this->HTTP_POST_FILES[$this->field_name]['tmp_name'];
    
$ok 1;
    if (empty(
$this->upload_file) || $this->upload_file == "none") {
      
$this->set_error($this->lang['no_image_file']);
      
$ok 0;
    }

    if (
$user_info['user_level'] != ADMIN) {
      if (!
$this->check_max_filesize()) {
        
$this->set_error($this->lang['invalid_file_size']);
        
$ok 0;
      }
      if (
eregi("image"$this->HTTP_POST_FILES[$this->field_name]['type'])) {
        if (!
$this->check_image_size()) {
          
$ok 0;
        }
      }
    }

    if (!
$this->check_file_extension() || !$this->check_mime_type()) {
      
$this->set_error($this->lang['invalid_file_type']. " (".$this->extension.", ".$this->mime_type.")");
      
$ok 0;
    }
    if (
$ok) {
      if (!
$this->copy_file()) {
        if (isset(
$this->lang['file_copy_error'])) {
          
$this->set_error($this->lang['file_copy_error']);
        }
        
$ok 0;
      }
    }
    return 
$ok;
  }

  function 
upload_file($field_name$image_type$cat_id 0$file_name "") {
    global 
$HTTP_COOKIE_VARS$HTTP_POST_VARS$HTTP_GET_VARS$HTTP_POST_FILES;

    
// Bugfix for: http://www.securityfocus.com/archive/1/80106
    
if (isset($HTTP_COOKIE_VARS[$field_name]) || isset($HTTP_POST_VARS  [$field_name]) || isset($HTTP_GET_VARS   [$field_name])) {
      die(
"Security violation");
    }

    
$this->HTTP_POST_FILES $HTTP_POST_FILES;
    
$this->image_type $image_type;
    
$this->field_name $field_name;

    if (
$cat_id) {
      
$this->upload_path['thumb'] = THUMB_PATH."/".$cat_id;
      
$this->upload_path['media'] = MEDIA_PATH."/".$cat_id;
    
$this->upload_path['avatar'] = TEMPLATE_DIR."/".$cat_id."/avatars/users";
    }
    else {
      
$this->upload_path['thumb'] = THUMB_TEMP_PATH;
      
$this->upload_path['media'] = MEDIA_TEMP_PATH;
    }

    if (
$file_name != "" && $this->image_type != "avatar") {
      
ereg("(.+)\.(.+)"$file_name$regs);
      
$this->name $regs[1];
      
ereg("(.+)\.(.+)"$this->HTTP_POST_FILES[$this->field_name]['name'], $regs);
      
$this->extension $regs[2];
      
$this->file_name $this->name.".".$this->extension ;
    }
    else {
      
$this->file_name $this->HTTP_POST_FILES[$this->field_name]['name'];
      
$this->file_name ereg_replace(" ""_"$this->file_name);
      
$this->file_name ereg_replace("%20""_"$this->file_name);
      
$this->file_name preg_replace("/[^-\._a-zA-Z0-9]/"""$this->file_name);

      
ereg("(.+)\.(.+)"$this->file_name$regs);
      
$this->name $regs[1];
      
$this->extension $regs[2];
    }

 if (
$this->image_type == "avatar") {
    
$this->file_name $file_name.".".$this->extension;
  }

    
$this->mime_type $this->HTTP_POST_FILES[$this->field_name]['type'];
    
preg_match("/([a-z]+\/[a-z\-]+)/"$this->mime_type$this->mime_type);
    
$this->mime_type $this->mime_type[1];

    if (
$this->save_file()) {
      return 
$this->file_name;
    }
    else {
      return 
false;
    }
  }

  function 
check_file_extension($extension "") {
    if (
$extension == "") {
      
$extension $this->extension;
    }
    if (!
in_array(strtolower($extension), $this->accepted_extensions[$this->image_type])) {
      return 
false;
    }
    else {
      return 
true;
    }
  }

  function 
check_mime_type() {
    if (!isset(
$this->accepted_mime_types[$this->image_type])) {
      return 
true;
    }
    if (!
in_array($this->mime_type$this->accepted_mime_types[$this->image_type])) {
      return 
false;
    }
    else {
      return 
true;
    }
  }

  function 
set_allowed_filetypes() {
    global 
$config;
    
//Thumbnails
    
$this->accepted_mime_types['thumb'] = array(
      
"image/jpg",
      
"image/jpeg",
      
"image/pjpeg",
      
"image/gif",
      
"image/x-png"
    
);
    
$this->accepted_extensions['thumb'] = array(
      
"jpg",
      
"jpeg",
      
"gif",
      
"png"
    
);

 
//Avatar
    
$this->accepted_mime_types['avatar'] = array(
      
"image/jpeg",
      
"image/pjpeg",
      
"image/gif",
      
"image/x-png"
    
);
    
$this->accepted_extensions['avatar'] = array(
      
"jpg",
      
"jpeg",
      
"gif",
      
"png"
    
);


    
//Media
    
$this->accepted_extensions['media'] = $config['allowed_mediatypes_array'];

    
$mime_type_match = array();
    include(
ROOT_PATH.'includes/upload_definitions.php');

    foreach (
$mime_type_match as $key => $val) {
      if (
in_array($key$this->accepted_extensions['media'])) {
        if (
is_array($val)) {
          foreach (
$val as $key2 => $val2) {
            
$this->accepted_mime_types['media'][] = $val2;
          }
        }
        else {
          
$this->accepted_mime_types['media'][] = $val;
        }
      }
    }
  }

  function 
get_upload_errors() {
    if (empty(
$this->upload_errors[$this->file_name])) {
      return 
"";
    }
    
$error_msg "";
    foreach (
$this->upload_errors[$this->file_name] as $msg) {
      
$error_msg .= "<b>".(($this->image_type == "avatar") ? $this->HTTP_POST_FILES[$this->field_name]['name'] : $this->file_name).":</b> ".$msg."<br />";
    }
    return 
$error_msg;
  }

  function 
set_error($error_msg) {
    
$this->upload_errors[$this->file_name][] = $error_msg;
  }
//end of class
?>


Offline haider512

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: [Mod] Avatar v2.01
« Reply #452 on: December 12, 2010, 10:00:42 AM »
Help Help Help Needed...

Im having this error when i upload a file in avatar..??

Code: [Select]
Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /home/haider/public_html/directory/includes/upload.php on line 289
I checked the line 289 it was of this coding
Code: [Select]
$this->accepted_mime_types['avatar'] = array(??

the whole code is

Code: [Select]
 //Avatar
    $this->accepted_mime_types['avatar'] = array(
      "image/jpeg",
      "image/pjpeg",
      "image/gif",
      "image/x-png"
    );
    $this->accepted_extensions['avatar'] = array(
      "jpg",
      "jpeg",
      "gif",
      "png"
    );

This is the whole code of includes/upload.php

Code: [Select]
attached

Please help what to do??? :!: :!: :!: :?: :?: :?: :?: :?:
Looking forward to your help...
« Last Edit: December 12, 2010, 09:21:24 PM by V@no »

Offline haider512

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: [Mod] Avatar v2.01
« Reply #453 on: December 12, 2010, 11:40:26 AM »
In which file i need to do the settings to show the avatar..

please see the attach file i have boxed the area i want to show the avatar..

=====================


ok i found the file now i guess its "user_logininfo" the the problem is i cant set the avatar..

but i dont know what to do to show avatar there..

i did put this in that code

Code: [Select]
{user_avatar_current}
so that current avatar shows up..but no use.. avatar is still not showing up??


Code: [Select]
{lang_loggedin_msg}<br /><br />
{user_avatar_current}
<br /><br />

<ul>
<li><a href="{url_lightbox}">{lang_lightbox}</a></li>
<li><a href="{url_control_panel}">{lang_control_panel}</a></li>
<li><a href="{url_logout}">{lang_logout}</a></li>
</ul>

can you or anyone help me set this avatar there...
« Last Edit: December 12, 2010, 11:58:51 AM by haider512 »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Avatar v2.01
« Reply #454 on: December 12, 2010, 06:38:08 PM »
Im having this error when i upload a file in avatar..??
You've made a mistake in step 3.6

In which file i need to do the settings to show the avatar..
http://www.4homepages.de/forum/index.php?topic=3978.msg17618;topicseen#msg17618
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline haider512

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: [Mod] Avatar v2.01
« Reply #455 on: December 12, 2010, 07:57:44 PM »
Im having this error when i upload a file in avatar..??
You've made a mistake in step 3.6

In which file i need to do the settings to show the avatar..
http://www.4homepages.de/forum/index.php?topic=3978.msg17618;topicseen#msg17618

but you can see my code of upload.php..

i dont understand what did i do wrong..please tell me what did i do wrong in 3.6..it looks to i did exactly what was written in 3.6 and i doubled checked but i cant seem to figure out where did i do wrong....im not a good programmer i guess..
please tell what to do?? what did i do wrong in 3.6??

and many thanks the for second one solution..the avatar is now showing in registered user place..

===================

.......


Hi..i tried your procedure..and yes a drop down list came up in the registration form..but problem is that when i choose a avatar from a drop down list it dont change..only the default image is appearing..

how to make it auto change..like in user edit profile..

when user edit profile and user click the avatar name in the dropdown list the avatar automatically changes..but here in registration form it dosent automatically changes..

you can see my site..

apnadigitalscope.com/directory

what to do??
« Last Edit: January 05, 2011, 05:43:20 AM by Rembrandt »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Avatar v2.01
« Reply #456 on: December 12, 2010, 09:17:10 PM »
i dont understand what did i do wrong..please tell me what did i do wrong in 3.6..it looks to i did exactly what was written in 3.6 and i doubled checked but i cant seem to figure out where did i do wrong....im not a good programmer i guess..
please tell what to do?? what did i do wrong in 3.6??

Move
Code: [Select]
  //Avatar
    $this->accepted_mime_types['avatar'] = array(
      "image/jpeg",
      "image/pjpeg",
      "image/gif",
      "image/x-png"
    );
    $this->accepted_extensions['avatar'] = array(
      "jpg",
      "jpeg",
      "gif",
      "png"
    );

above:above::
Code: [Select]
    //Thumbnails
    $this->accepted_extensions['thumb'] = array(
(I've updated the original instructions so it's less confusing)

Hi..i tried your procedure..and yes a drop down list came up in the registration form..but problem is that when i choose a avatar from a drop down list it dont change..only the default image is appearing..

how to make it auto change..like in user edit profile..

when user edit profile and user click the avatar name in the dropdown list the avatar automatically changes..but here in registration form it dosent automatically changes..

you can see my site..

apnadigitalscope.com/directory

what to do??
Replace
Code: [Select]
                  </b>{endif user_avatar_file} <select name="user_avatar"  onkeypress="if(window.event.keyCode==13){ this.form.submit(); }" onChange="document.images.icons.src='{template_url}/avatars/'+document.creator.user_avatar.options[document.creator.user_avatar.selectedIndex].value;">

with this:
Code: [Select]
                  </b>{endif user_avatar_file} <select name="user_avatar"  onkeypress="if(window.event.keyCode==13){ this.form.submit(); }" onChange="document.images.icons.src='{template_url}/avatars/'+this.value;">
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline haider512

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: [Mod] Avatar v2.01
« Reply #457 on: December 12, 2010, 10:52:49 PM »
...


Gosh!!!! Dude how you do these stuff..you are genius.. wanna Give you a big hug...And wanna say you Big big thank you..

i dont know how do you figure out where is the problem..

i mean how would any one know that avatar coding should b up and the thumbnail should b down..its just different functions..they should b working where ever i put them in that file.. i dont understand why they need to be aligned to work..

i mean 2+3=5 then 3+2=5 ..answer should b the same and both different functions are in same file they should have worked..

but yaar..im not the creater and programmer so dont understand on these stuffs much..

But really you are superb man.. i dont know how do you figure out the problem..but Many Many thanks..

Long Live 4images..superb..
« Last Edit: January 05, 2011, 05:46:15 AM by Rembrandt »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Avatar v2.01
« Reply #458 on: December 12, 2010, 11:25:40 PM »
they should b working where ever i put them in that file.. i dont understand why they need to be aligned to work..
Inside the function it would not make any difference up or down, but you put it outside function, inside a class it's not permitted.
This mod originally was created for 4images v1.7, since then the source of the gallery has changed, that's why you couldn't find the exact lines and put it as you thought was close to.
The updated instructions should now eliminate this confusion and be more universal regardless of 4images version (I hope)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline tutton

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: [Mod] Avatar v2.01
« Reply #459 on: January 04, 2011, 06:05:52 PM »
is there a modification that adds this code to the member.php script:

htmlspecialchars($user_row['user_name']) : REPLACE_EMPTY,

because i cant find it in a clean version of 1.7.7

specifically the, htmlspecialchars part

or is it not possible to use this modification with version 1.7.7?

thanks so much
« Last Edit: January 04, 2011, 06:33:33 PM by tutton »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Avatar v2.01
« Reply #460 on: January 04, 2011, 06:50:50 PM »
I've updated step 1
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline tutton

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: [Mod] Avatar v2.01
« Reply #461 on: January 04, 2011, 07:32:15 PM »
Fantastic!!!!!!! Worked like a charm.  :D

Step 1.4 should also be updated if you feel like it.

Thanks again.

Offline haider512

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: [Mod] Avatar v2.01
« Reply #462 on: January 05, 2011, 07:40:33 AM »
hi v@no.
 can you also add feature which auto resize avatar when uploaded by user?
actually most users when upload avatar..they dont care for height and width and when they get error..then they dont upload..and choose from given..

cuz most users in my country dont know much about resizing of images throgh photoshop or any other tool..

can you please also make a mod..which auto resize the avatar when uploaded..like you did for thumnail and images.?

Offline MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Re: [Mod] Avatar v2.01
« Reply #463 on: February 05, 2011, 02:00:10 PM »
I have this error, but my safe mod is turned off, and upload pictures to the gallery work`s fine too!!! I have same errors on my host, and my local server too. Permissions on "avatars" and "users" are set 777! Any ideas or desicions? :-)

Quote
Warning: move_uploaded_file(/templates/default/avatars/users/20.gif) [function.move-uploaded-file]: failed to open stream: No such file or directory in C:\Users\***\Desktop\Server\root\includes\upload.php on line 105

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\Windows\Temp\php78A2.tmp' to '/templates/default/avatars/users/20.gif' in C:\Users\***\Desktop\Server\root\includes\upload.php on line 105
« Last Edit: February 05, 2011, 04:57:20 PM by V@no »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Avatar v2.01
« Reply #464 on: February 05, 2011, 05:43:10 PM »
Looks like you've altered something related to template paths in your gallery. There shouldn't be any / infront of templates/default/

You could try play with this line in includes/upload.php
    $this->upload_path['avatar'] = TEMPLATE_DIR."/".$cat_id."/avatars/users";
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)