sandra

About

Username
sandra
Joined
Visits
2,198
Last Active
Roles
Administrator
Points
277
Preferred Name
Sandra
  • Export Custom Field Data

    Hello & welcome to the community :smiley:

    This one can be a bit tricky because the data is serialized, but if you only need to pull out a few fields at a time there is a way:

    SELECT (CASE WHEN (@find := LOCATE('s:3:"001";s', gibbonPerson.fields)) > 0 THEN REPLACE(LEFT( @var := SUBSTRING(gibbonPerson.fields, @find + 15), LOCATE('";', @var)-1), '"', '') ELSE '' END) AS `Your Custom Field` FROM gibbonPerson

    What this will do is extract a single value by locating the start and end of the string (with a couple variables to help). You can add this statement as part of any query on the gibbonPerson table to get custom field values.

    The important part of the above statements is s:3:"001", where the 001 is the ID of the custom field. When you're editing the custom field in Gibbon you can see the ID number in the url bar as gibbonPersonFieldID=001. If you need a different custom field you can replace the 001 with the ID of the field you need. You can repeat this statement if you need to pull out a few different custom fields, just change the ID value for each one (and the `Your Custom Field` part).

    Hope this helps! I think it would certainly be great if Query Builder had a way to pull out this data built-in, it's possibly something we can look into.
    adminkclearylcmcFelipon
  • Fatal erro/Uncaught Error: Call to undefined function Gibbon\gettext()

    Hi Gary,

    Hopefully your hosting provider can enable this extension for you. Until then, if you don't need language translation you could edit the src/Gibbon/Locale.php file and update lines 248-250 in the translate method to the following:
            if (function_exists('gettext')) {
                $text = empty($domain) ?
                    gettext($text) :
                    dgettext($domain, $text);
            }
    The translateN method likely needs updated with a similar conditional.

    These changes would be overwritten the next time you update, but they should allow you to proceed for now with using the system without gettext installed.
    admingaryc
  • SMS with login details

    Hi Roman,

    The permissions system is pretty granular, you can give users access to a single action in the User Admin module without giving them access to the rest of the module.

    I think it sounds like a user-related feature, so putting it in this module could possibly make sense for the wider number of schools using Gibbon. You could potentially tweak an action manually in your database to relocate it if needed for your particular school.
    meierrom