gideon prewett Posted July 23, 2009 Posted July 23, 2009 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 Quote
PHP Scene Posted July 23, 2009 Posted July 23, 2009 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'. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.