Jump to content
MakeWebGames

Recommended Posts

Posted

tried the user display pic mod

function pic_change()
{
global $db,$ir,$c,$userid,$h;
print "<h3>Pic Change</h3>
Please note that this must be externally hosted, [url='http://imageshack.us']ImageShack[/url] is our recommendation.

Any images that are not 150x150 will be automatically resized <form action='preferences.php?action=picchange2' method='post'>
New Pic: <input type='text' name='newpic' value='{$ir['display_pic']}' />

<input type='submit' value='Change Name' /></form>";
}
function do_pic_change()
{
global $db,$ir,$c,$userid,$h;
if($_POST['newpic'] == "")
{
print "You did not enter a new pic.

[url='preferences.php?action=picchange']> Back[/url]";
}
else
{
 $_POST['forums_avatar']=$_POST['newpic'];
 $_POST['forums_avatar']=str_replace(array("<", ">",addslashes("'"),addslashes('"')), array("<", ">","'","""), $_POST['forums_avatar']);
if(strpos($_POST['forums_avatar'],".php") !== false || strpos($_POST['forums_avatar'],".asp") !== false || strpos($_POST['forums_avatar'],".aspx") !== false || strpos($_POST['forums_avatar'],".htm") !== false)
{
print("Invalid characters

[url='preferences.php?action=picchange']> Back[/url]");
$h->endpage();
exit;
}
if(strpos($_POST['forums_avatar'],".gif") === false && strpos($_POST['forums_avatar'],".jpg") === false && strpos($_POST['forums_avatar'],".png") === false && strpos($_POST['forums_avatar'],".jpeg") === false)
{
print("Invalid extension, please use a gif, jpg or png image

[url='preferences.php?action=picchange']> Back[/url]");
$h->endpage();
exit;
}
$db->query("UPDATE users SET display_pic='{$_POST['forums_avatar']}' WHERE userid=$userid");
print "Pic changed!";
}
}

 

and I keep getting this error when I try to add this to the preferences:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/damagedc/public_html/preferences.php on line 215
Posted

also this is wat i have atm:

function pic_change()
{
global $db,$ir,$c,$userid,$h;
print "<h3>Pic Change</h3>
Please note that this must be externally hosted, [url='http://imageshack.us']ImageShack[/url] is our recommendation.

Any images that are not 150x150 will be automatically resized <form action='preferences.php?action=picchange2' method='post'>
New Pic: <input type='text' name='newpic' value='{$ir['display_pic']}' />

<input type='submit' value='Change Name' /></form>";
}
function do_pic_change()
{
global $db,$ir,$c,$userid,$h;
if($_POST['newpic'] == "")
{
print "You did not enter a new pic.

[url='preferences.php?action=picchange']> Back[/url]";
}
else
{
 $_POST['forums_avatar']=$_POST['newpic'];
 $_POST['forums_avatar']=str_replace(array("<", ">",addslashes("'"),addslashes('"')), array("<", ">","'","""), $_POST['forums_avatar']);
if(strpos($_POST['forums_avatar'],".php") !== false || strpos($_POST['forums_avatar'],".asp") !== false || strpos($_POST['forums_avatar'],".aspx") !== false || strpos($_POST['forums_avatar'],".htm") !== false)
{
print("Invalid characters

[url='preferences.php?action=picchange']> Back[/url]");
$h->endpage();
exit;
}
if(strpos($_POST['forums_avatar'],".gif") === false && strpos($_POST['forums_avatar'],".jpg") === false && strpos($_POST['forums_avatar'],".png") === false && strpos($_POST['forums_avatar'],".jpeg") === false)
{
print("Invalid extension, please use a gif, jpg or png image

[url='preferences.php?action=picchange']> Back[/url]");
$h->endpage();
exit;
}
$db->query("UPDATE users SET display_pic='{$_POST['forums_avatar']}' WHERE userid=$userid");
print "Pic changed!";
}
}

 

I would really appreciate it if someone could make it so forum avatars are still in use and sort of merge these two codes Thanks

Posted
Yeah i give quite afew hacks ago on the new engine (MCv2.0.3) spent a good few hours attempting hacks, give it a go let me know if you got anything http://v203.mccodes.com/

I can make it hang ^.^

@OP: Why not just use the display pic as the forum avatar?

Edit: Nevermind mis- read the second post.

Posted

ok i will stick with the previous one then but if someone does make a secure version for this please pm me cause i think its a great mod if it could also have the forum avatar included with multiple images

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...