MyBB Community Forums
Mybb GID consistency - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Development (https://community.mybb.com/forum-68.html)
+---- Thread: Mybb GID consistency (/thread-38123.html)



Mybb GID consistency - User 2877 - 2008-09-22

I found out today that your GID's are different for 1.4x than 1.2x. If you have a forum that's an upgrade from 1.2x however it's not corrected. This creates an inconsistency and a small problem for plugin authors that create settings inside existing GID's.

Can anything be done about this? I realize it's probably very low priority but still consider something.


RE: Mybb GID consistency - Matt - 2008-09-22

Which ones are different?? I didn't notice this myself.


RE: Mybb GID consistency - User 2877 - 2008-09-22

All of them.

I have added this to the top of my plugin activations which should take care of the problem.

Quote: $query = $db->simple_select("settinggroups", "gid", "name='SETTINGNAME");
$gid = $db->fetch_field($query, "gid");

Then when creating the settings array use $gid for the gid.

Exampe:

Quote: "gid" => $gid,

So other authors feel free to use that.


RE: Mybb GID consistency - Ryan Gordon - 2008-09-23

You should always call a setting / setting group by it's code name - that's why we have it there for.