View Full Version : A little problem with the Avatar hack
Shimsee
02-06-2001, 12:08 PM
Hello,
I installed the Avatar hack and all works fine(great hack btw, Awesome).
But I got 1 little problem:
When anybody tries to register I get this message:
Warning: Supplied argument is not a valid Directory resource in /www/htdocs/gamer/forums/member.php on line 211
Anybody knows what this means?
I red a post by Freddie about an update(register Netscape users), is this the same problem?
Thanks,
Shims
I found 1 error:
I forgot to add the value to the second set of braces. So I did that.
People can now register again(:D) but the error is still diplayed on the screen.
Warning: Supplied argument is not a valid Directory resource in /www/htdocs/gamer/forums/member.php on line 211
Everything else seems to work fine, anyone got an idea?
Shims
I had to go back and read and make the changes to all the bugs in the ziped 2.0 version.i noticed the download didnt have all of the fixes
heres the thread where all the fixes are
http://www.vbulletin.com/forum/showthread.php?threadid=2127&highlight=avatar
This part of the hack in on line 211:
// Avatar Hack Code *********************************
$iconsperline = $aviconsperline;
$startpage = 1;
$userpost = 0;
$linecount = 0;
$checkcount = 0;
$avatardir = "images/avatars";
$dirhandle = opendir($avatardir);
chdir($avatardir);
// We have to chdir to the directory that our directory is in
// because is_dir() doesn't work properly if we don't
while (($dir = readdir($dirhandle)) != "")
{
if (is_dir($dir) && $dir != ".." && $dir != ".")
{
$dir_int = intval($dir);
$dir_str = strval($dir_int);
if (($userpost >= $dir_int)&&($dir_str == $dir))
{
$filehandle = opendir($dir);
while (($file = readdir($filehandle)) != "")
{
$filelen = strlen($file);
$fileext = "bad";
if ($filelen >= 5)
{
$fileext = substr($file,$filelen-4,$filelen-1);
$fileext = strtolower($fileext);
if ($fileext==".gif"||$fileext==".bmp"||$fileext==".jpg"||$fileext=="jpeg")
{
$fileext = "ok";
}
else
{
$fileext = "bad";
}
}
if ($fileext == "ok")
{
if ($checkcount == 0)
{
$checked = "checked";
}
else
{
unset($checked);
}
$checkcount++;
$iconpath = "images/avatars/" . $dir . "/" . $file;
$iconid = $iconpath;
if ($linecount == $iconsperline)
{
$avatarbits.="<br>\n";
$linecount = 0;
}
$linecount++;
eval("\$avatarbits.= \"".gettemplate("avatarbit")."\";");
}
}
}
}
}
closedir($filehandle);
closedir($dirhandle);
if ($avUserNoImage == "" || (isset($avUserNoImage))==0)
{
$avUserNoImage = "0";
echo ("Please set <b>avUserNoImage</b> in the options<br>");
}
if ($avUserImage == "" || (isset($avUserImage))==0)
{
$avUserImage = "0";
echo ("Please set <b>avUserImage</b> in the options<br>");
}
else
{
if ($avUserImageSize == "" || (isset($avUserImageSize))==0)
{
$avUserImageSize = 40;
echo ("Please set <b>avUserImageSize</b> in the options<br>");
}
if ($avUserImagePosts == "" || (isset($avUserImagePosts))==0)
{
$avUserImagePosts = 200;
echo ("Please set <b>avUserImagePosts</b> in the options<br>");
}
}
if ($avUserNoImage == "1")
{
eval ("\$avatarbits .=\"".gettemplate("avatar_noimage")."\";");
}
if ($avUserImage == "1") // Allow Custom Avatar
{
if ($avUserImagePosts == 0)
{
eval ("\$avatarbits .=\"".gettemplate("avatar_custom")."\";");
}
}
eval("\$avatar_profile.= \"".gettemplate("avatar_profile")."\";");
// End Avatar
Is there something that triggers this error?
The hack and my board seems to work fine, but that (error)line is still there :(
Shims
I had to go back and read and make the changes to all the bugs in the ziped 2.0 version.i noticed the download didnt have all of the fixes
heres the thread where all the fixes are
http://www.vbulletin.com/forum/showthread.php?threadid=2127&highlight=avatar
Originally posted by upperking
I had to go back and read and make the changes to all the bugs in the ziped 2.0 version.i noticed the download didnt have all of the fixes
heres the thread where all the fixes are
http://www.vbulletin.com/forum/show...ighlight=avatar
There are no "bugs" in v2.0 .. If you are able to follow instructions then it will work properly for you. Did you create a directory labeled images/avatars/0 and place at least one image in it?
Does it say it was created for v1.1.5? No so if you are trying to use it with 1.1.5 than perhaps you need to make the changes that are listed in that thread.
i did find when i read some of the of posts that there wasnt the same changes in the zip for the fixes
i read every post in that thread..and edited the changes
example
if (($avcuston=="")&&($iconpath=="custom_avatar"))
"$avcustom==" shouldbe
Stay at the same Two Lines. Add this before them
~~~~~~~~~~
//Begin Avatar
if (($avcustom != "")&&($iconpath=="custom_avatar"))
{
if ($avUserImage == "1") // Allow Custom Avatar
{
if ($avUserImagePosts == 0)
{
$iconpath = $avcustom;
$avPos = strtolower($iconpath);
$avPos = substr($avPos,0,7);
if ($avPos != "http://")
{
$iconpath = "http://" . $iconpath;
}
}
}
}
if (($avcuston=="")&&($iconpath=="custom_avatar"))
{
$iconpath = "";
}
if ($iconpath == "0")
{
$iconpath = "";
}
// End Avatar
~~~~~~~~~~
THAT'S IT, THAT'S IT
Did you create a directory labeled images/avatars/0 and place at least one image in it?
Thanks A lot Freddie and Upperking :D
Shims
Hello i have vbulletin 1.1.5 and i want a avatar hack but i don't know a site where i can download him.
Could somebody help my with my problem?
greetz
MrMaster
Read the forum rules (that sticky thread by WLuke).
Honor a Hack Author's wishes. If they remove a hack from distribution, it was most likely done for a reason and should not be put back into circulation.
vB 2.0 Beta 2 has Avatars by default.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.