Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
[ADDON] Upload Avtar
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

2013-04-06 16:28:18
Thank you! Everything works except animated. Perhaps it is because the images is adapted to 80x80px.
Unknown User
2013-05-12 17:16:30
It's not work for me, i have this error message : Direct access not allowed !!!
Unknown User
2013-06-05 08:46:45
hello Thib where put this code

Quote:
$action = $_REQUEST["action"];
i the same message

Direct access not allowed !!!

Go to: account
Unknown User
2013-06-05 08:50:44
i m crazy put this code on upavatar.php  :wacko:   sorry
Unknown User
2013-07-09 17:45:13
ROMANIAN

#----------[ BEFORE ADD ]---------------------------------------
#
/// START UPLOAD AVATAR ///
define("UP_AVATAR", "Incarca");
define("AVATAR_FILE", "Avatar Fila");
define("AVATAR_LINC", "Adresa de imagine");
define("NO_AVATAR", "<font color=red><b>Eroare</b></font><br><br> Nu ai ales nici un avatar! <br><br> Inapoi ");
define("AVATAR_OK", "Avatarul tau a fost incarcat cu succes! <br><br>Inapoi ");
define("AVATAR_TXT", "<b>Este interzisa postarea imaginilor neautorizate</b>.<br>Avatarul tau se va redimensiona automat<b>80x80</b>px.<br>Marimea maxima <b>500</b>kb.");
/// END UPLOAD AVATAR ///
Unknown User
2014-09-23 10:13:56
avatar 100*100

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=7090"]Upload_Avatar.zip[/url]
Upload_Avatar.zip
Download
Unknown User
2017-04-05 12:14:39
I'm adjusting this mod to 2.08.

  It's almost ready, I only have this error when uploading the image.
Avatar uploading, disabled bay site admin!

Any suggestion.

/// START UPLOAD AVATAR ///
if ($site_config['AVATAR_UPLOAD']){
$avatar = htmlspecialchars($CURUSER["avatar"]);
if (!$avatar)
$avatar = "".$site_config["SITEURL"]."/images/default_avatar.png";

print("<tr><td align=right class=table_col3> <b>"  . AVATAR . ":</b></td><td align=left class=table_col3><table border=1><tr><td rowspan=2 width=90><img src= $avatar></td><td>
     
<input type='file' name=avatar size=50 value=\"" . htmlspecialchars($CURUSER["avatar"]) . "\"><br />\n " . AVATAR_LINC. ": 564x564px</i></td></tr><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href=upavatar.php? action=upload> <b>" . AVATAR . "</b></a> </td></tr></table></td></tr>");
}else{
print("<tr><td align=right class=table_col3><b>" . AVATAR_URL . ":</b> </td><td align=left class=table_col3><input name=avatar size=50 value=\"" . htmlspecialchars($CURUSER["avatar"]) . "\"><br />\n<i>" . AVATAR_LINC . ": 80x80px</i></td></tr>");
}
/// END UPLOAD AVATAR ///
}






original code in 2.08.

/*print("<tr><td align='right' class='alt3'><b>" . T_("AVATAR_UPLOAD") . ":</b> </td><td align='left' class='alt3'><input type='text' name='avatar' size='50' value=\"" . htmlspecialchars($CURUSER["avatar"]) .
 "\" /><br />\n<i>".T_("AVATAR_LINK")."</i><br /></td></tr>");*/



[ATTACH]2466._xfImport[/ATTACH]

[ATTACH]2467._xfImport[/ATTACH]
Capture.png
Capture.png
Capture1.PNG
Capture1.PNG
Unknown User
2017-04-05 12:45:13
I solved the error now I have this error

Direct access not allowed !!!

Quote:


$action = $_REQUEST["action"];




I do not work for me
2017-04-05 21:54:03
Have you chmod 777 avatars/ ?
Unknown User
2017-04-05 23:39:50
"UFFENO1, post: 94040":
Have you chmod 777 avatars/ ?


I think I'm localhost

Preparing the engine and then uploading it
2017-04-06 12:46:48
Just a guess, but maybe by being localhost is what is causing the "direct access not allowed" error. I run the tracker on a different machine than the one I am on, so I have never seen that error. You could also remove that line of code in upavatar.php and see if that helps you at least trouble shoot the problem.

if (!$action == "post" OR !$action == "upload") {
   write_log("<b>HACKING ATTEMPT !!! </b>- User <b>" . $CURUSER["username"] . "</b> tries to direct access to upavatar.php");
   print ("<br><p><center><b>Direct access not allowed !!!</b></p><p>Go to: <a href=account.php?action=edit_settings&do=edit><b>" . T_("ACCOUNT") . "</b></a></center></p><br>");
}


not sure if it helps anyone, but below is all the code I have.

in config.php

/// START UPLOAD AVATAR ///
$site_config['AVATARUPLOAD'] = true;      // Enable / Disable upload avatar
$site_config['avatar_dir'] = '/avatars';   // Dir where will be stored avatars


also in config.php

// Image upload settings
$site_config['image_max_filesize'] = 20971520;
$site_config['avatar_max_filesize'] = 11010000; // Max uploaded image size in bytes (Default: 512 kB)
$site_config['allowed_image_types'] = array(
// "mimetype" => ".ext",
"image/gif" => ".gif",
"image/pjpeg" => ".jpg",
"image/jpeg" => ".jpg",
"image/jpg" => ".jpg",
"image/png" => ".png"
);


in account.php

/// START UPLOAD AVATAR ///
if ($site_config['AVATARUPLOAD']){
  $avatar = htmlspecialchars($CURUSER["avatar"]);
if (!$avatar)
  $avatar = "".$site_config["SITEURL"]."/images/default_avatar.png";
  print("<tr><td align='right' class='table_col1'><b>" . T_("AVATAR") . ":</b></td><td align='left' ><table class='table_col1' border='0'><tr><td class=table_col1><img src=$avatar hight='40' width='40'></td><td ><input name='avatar' size='50' value=\"" . htmlspecialchars($CURUSER["avatar"]) . "\"><br /><i>" . T_("AVATAR_LINK") . ": 80x80px</i>&nbsp;OR [ <a href=upavatar.php?action=upload><b>" . T_("UP_AVATAR") . "</b></a> ]</td></tr></table></td></tr>");
  }
  else {
  print("<tr><td align='right' class='table_col1'><b>" . T_("AVATAR_UPLOAD") . ":</b> </td><td align='left' class='table_col1'><input type='text' name='avatar' size='50' value=\"" . htmlspecialchars($CURUSER["avatar"]) .
    "\" /><br />\n<i>".T_("AVATAR_LINK")."</i><br /></td></tr>");
}
///END UPLOAD AVATAR ///


attached is my upavatar.php

[ATTACH]2470._xfImport[/ATTACH]
upavatar.php
Download

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Unknown User
2017-04-06 13:26:20
"MicroMonkey, post: 94047":
Just a guess, but maybe by being localhost is what is causing the "direct access not allowed" error. I run the tracker on a different machine than the one I am on, so I have never seen that error. You could also remove that line of code in upavatar.php and see if that helps you at least trouble shoot the problem.

if (!$action == "post" OR !$action == "upload") {
   write_log("<b>HACKING ATTEMPT !!! </b>- User <b>" . $CURUSER["username"] . "</b> tries to direct access to upavatar.php");
   print ("<br><p><center><b>Direct access not allowed !!!</b></p><p>Go to: <a href=account.php?action=edit_settings&do=edit><b>" . T_("ACCOUNT") . "</b></a></center></p><br>");
}


not sure if it helps anyone, but below is all the code I have.

in config.php

/// START UPLOAD AVATAR ///
$site_config['AVATARUPLOAD'] = true;      // Enable / Disable upload avatar
$site_config['avatar_dir'] = '/avatars';   // Dir where will be stored avatars


also in config.php

// Image upload settings
$site_config['image_max_filesize'] = 20971520;
$site_config['avatar_max_filesize'] = 11010000; // Max uploaded image size in bytes (Default: 512 kB)
$site_config['allowed_image_types'] = array(
// "mimetype" => ".ext",
"image/gif" => ".gif",
"image/pjpeg" => ".jpg",
"image/jpeg" => ".jpg",
"image/jpg" => ".jpg",
"image/png" => ".png"
);


in account.php

/// START UPLOAD AVATAR ///
if ($site_config['AVATARUPLOAD']){
  $avatar = htmlspecialchars($CURUSER["avatar"]);
if (!$avatar)
  $avatar = "".$site_config["SITEURL"]."/images/default_avatar.png";
  print("<tr><td align='right' class='table_col1'><b>" . T_("AVATAR") . ":</b></td><td align='left' ><table class='table_col1' border='0'><tr><td class=table_col1><img src=$avatar hight='40' width='40'></td><td ><input name='avatar' size='50' value=\"" . htmlspecialchars($CURUSER["avatar"]) . "\"><br /><i>" . T_("AVATAR_LINK") . ": 80x80px</i>&nbsp;OR [ <a href=upavatar.php?action=upload><b>" . T_("UP_AVATAR") . "</b></a> ]</td></tr></table></td></tr>");
  }
  else {
  print("<tr><td align='right' class='table_col1'><b>" . T_("AVATAR_UPLOAD") . ":</b> </td><td align='left' class='table_col1'><input type='text' name='avatar' size='50' value=\"" . htmlspecialchars($CURUSER["avatar"]) .
    "\" /><br />\n<i>".T_("AVATAR_LINK")."</i><br /></td></tr>");
}
///END UPLOAD AVATAR ///


attached is my upavatar.php

[ATTACH]7289.IPB[/ATTACH]


Hello,
  Thanks for your help I just need to add this little code. But everything works fine now.

$site_config['avatar_max_filesize'] = 11010000; // Max uploaded image size in bytes (Default: 512 kB)


Just remove this error when uploading the image, but it works, I'll look for it wrong.

[ATTACH]2471._xfImport[/ATTACH]
Capture.PNG
Capture.PNG
2017-04-06 21:11:25
Check line 30 and 31 (or whatever number it is, but it looks like this) in upavatar.php. I didnt test this, but I will later, but it seems logical to me. The VAR $type had multiple references, and that dont work in flash, so I assume it wouldnt work here. I used shit in case tmp was used somewhere else. I didnt feel like looking for it lol


       $shit = explode('.', $_FILES[avatar]['name']);
       $type = strtolower(end($shit));

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Unknown User
2017-04-07 03:39:56
2017-04-07 22:52:37
did that fix your problem?
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728