MyBB Community Forums

Full Version: [B] seourls/attachthumbnails settings are yes/no
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
As thread topic...

The setting for seourls and attachthumbnails are set at yes/no instead of 0/1.
The setting type will still be "yes" or "no" but the actual value will be 0 or 1 in the settings.php file.
But it's not. My settings.php shows yes and no for both.

I looked on my beta site and 2 of my forums.
Are you sure that it's not a plugin or something?
I can confirm labrocca's side of the story, on both my forums. And it's not a plugin 'cause I don't have any.
seourls is one of yes no auto
attachthumbnails is one of yes no download

they are not yes/no settings but select boxes so I think it's intentional and not a bug.
(2009-03-22, 12:07 AM)frostschutz Wrote: [ -> ]they are not yes/no settings but select boxes so I think it's intentional and not a bug.

Then that's the problem and imho that a bug as these are yes/no settings. It creates confusion for plugin authors and breaks the Mybb standard. Hopefully will be fixed. I just created a plugin using one these settings (Canonical) and I just used a double if statement to make sure it's either a "yes" or "1" but would save some code if it was just if($setting) statement.

Anyways...seems bug is reported and confirmed. Now for the fix. Smile
This isn't a bug. It was programmed intentionally the way frostschutz describes. If you want it changed, you should create a suggestion thread
You shouldn't have to check for == 1 since it's supposed to be a string (depending on the setting). It doesn't break any standards, MyBB just has more than just plain yes/no settings. See MyBB core code to find out how MyBB checks it's own settings, and do it the same way in your plugin (although there shouldn't be much point in checking the seourls setting but that is another matter I guess).