You are not logged in.
- Topics: Active | Unanswered
#1 2009-12-30 03:49:36
- xSDMx
- Member
- Registered: 2008-06-24
- Posts: 129
Certain admin elements can only be changed in the database
Hey all,
I'm having a bizarre problem. Most (90%) of buttons work correctly, but on some buttons, either nothing happens, or it reverts to it's original setting, i.e.:
Use Avatars Yes X No o
Clicking No, and then saving, results in it staying Yes.
I have to manually change the 1/0 settings in the database.
How do I fix this problem?
Offline
#2 2009-12-30 04:35:25
- Smartys
- Former Developer
- Registered: 2008-04-27
- Posts: 3,117
- Website
Re: Certain admin elements can only be changed in the database
Have you modified your forum at all?
Offline
#3 2009-12-30 04:41:55
- xSDMx
- Member
- Registered: 2008-06-24
- Posts: 129
Re: Certain admin elements can only be changed in the database
Months ago. I can't think of anything I've done since them. What could I check to repair this?
Offline
#4 2009-12-30 06:18:39
- Smartys
- Former Developer
- Registered: 2008-04-27
- Posts: 3,117
- Website
Re: Certain admin elements can only be changed in the database
Hmm. I'd suggest using an unmodified version of admin_options.php to see if that solves the issue. I'd also delete cache_config.php to force your forum to regenerate it (it should only be out of date when you manually modify values in the database).
Offline
#5 2010-01-03 07:21:52
- xSDMx
- Member
- Registered: 2008-06-24
- Posts: 129
Re: Certain admin elements can only be changed in the database
Replacing admin_options.php didn't do anything ![]()
Offline
#6 2010-01-03 07:26:17
- xSDMx
- Member
- Registered: 2008-06-24
- Posts: 129
Re: Certain admin elements can only be changed in the database
Changing the admin_groups.php back allows me to edit the page again. What could have gone wrong?
Offline
#7 2010-01-03 09:49:15
- xSDMx
- Member
- Registered: 2008-06-24
- Posts: 129
Re: Certain admin elements can only be changed in the database
I've been poking around the original files and change lines back and forth, but I can't narrow down exactly what I should be fixing in the admin_xx.php files.
Could you possibly take a quick look at them (groups only) for me and let me know what I should look for in the files?
o = current version (polls, colors, etc)
http://www.2shared.com/file/10420119/1d … sktop.html?
Thanks.
Offline
#8 2010-01-03 12:01:34
- Reines
- Lead developer

- From: Scotland
- Registered: 2008-05-11
- Posts: 3,140
- Website
Re: Certain admin elements can only be changed in the database
You have a bracket in the wrong place:
if ($group_color != '')
{
if (!preg_match('{^(#){1}([a-fA-F0-9]){6}$}', $group_color))
message('Your group color is invalid. Example: #000000.');
[...code to actually perform the changes...]
}The closing bracket there should be right after the message(...) line, otherwise you are only going to be actually committing the changes if the group_color is not empty.
Basically your bracket on line 282 should be on line 247.
Offline
#9 2010-01-04 02:50:48
- xSDMx
- Member
- Registered: 2008-06-24
- Posts: 129
Re: Certain admin elements can only be changed in the database
*facepalm*
Thanks for the help guys.
I'll poke around other files of mine whenever I have the problem, and make sure code is ended correctly.
Offline
