Jump to content
MakeWebGames

Recommended Posts

Posted

i tryed to edit a free mod i got here on ce

i was trying to make a free mod for custom font color but it does not sceme to work :?

---------------------------------------------------------------------------------------------------------

1. Open preferences.php and Find:

 

case 'picchange2':
do_pic_change();
break;

case 'picchange':
pic_change();
break;

 

ADD Below:

 

case 'colorchange2':
do_color_change();
break;

case 'colorchange':
conf_color_change();
break;

----------------------------------------------------------------------------------------------------------

2. Next Find:

 

[url='preferences.php?action=picchange']Display Pic Change[/url]

ADD Below:

 

[url='preferences.php?action=colorchange']color Change[/url]

----------------------------------------------------------------------------------------------------------

3.Next Find:

 

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['newpic']=str_replace('\\\'',''', $_POST['newpic']);
$db->query("UPDATE users SET display_pic='{$_POST['newpic']}' WHERE userid=$userid");
print "Pic changed!";
}
}

 

ADD Below:

 

function conf_color_change()
{
global $ir,$c,$userid,$h;
print "<center><hr width='20%'>color Change<hr width='20%'>

<form action='preferences.php?action=colorchange2' method='post'>
<select class=textbox name='color'>
<option value='lime'>lime</option>
<option value='red'>red</option>
<option value='blue'>blue</option>
<option value='yellow'>yellow</option>
<option value='pink'>pink</option>
</Select>
<input class='textbox' type='submit' value='Change color' />
</form>";
}
function do_color_change()
{
global $db,$ir,$c,$userid,$h;
$db->query("UPDATE users SET color='{$_POST['color']}' WHERE userid=$userid");
print "You Have Changed your color Type!

[url='preferences.php']Back[/url]";
}

----------------------------------------------------------------------------------------------------------

SAVE preferences.php

----------------------------------------------------------------------------------------------------------

4. Open header.php and where u put ur font color add;

 

{$r['color']}

----------------------------------------------------------------------------------------------------------

SAVE header.php

----------------------------------------------------------------------------------------------------------

5. Run This SQL in Phpmyadmin

 

ALTER TABLE `users` ADD `color` enum('lime','red','blue','yellow','pink') NOT NULL default 'lime'

----------------------------------------------------------------------------------------------------------

can anybody tell me whats wrong

Posted

Re: text color mod problem

 

{$r['color']} 

should be:

{$ir['color']}

 

Remember, the $ir array variable contains the fetched information from users table (of the user) in this case, 'color'.

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...