{"id":15308101,"url":"https://github.com/ivantcholakov/codeigniter-user-agent-helper","last_synced_at":"2025-08-02T12:33:12.572Z","repository":{"id":11393985,"uuid":"13838166","full_name":"ivantcholakov/codeigniter-user-agent-helper","owner":"ivantcholakov","description":"User Agent Helper Functions","archived":false,"fork":false,"pushed_at":"2013-10-24T21:01:25.000Z","size":124,"stargazers_count":3,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-16T23:06:31.110Z","etag":null,"topics":["codeigniter","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivantcholakov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-24T16:46:33.000Z","updated_at":"2019-08-18T19:16:07.000Z","dependencies_parsed_at":"2022-08-25T19:02:46.749Z","dependency_job_id":null,"html_url":"https://github.com/ivantcholakov/codeigniter-user-agent-helper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivantcholakov%2Fcodeigniter-user-agent-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivantcholakov%2Fcodeigniter-user-agent-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivantcholakov%2Fcodeigniter-user-agent-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivantcholakov%2Fcodeigniter-user-agent-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivantcholakov","download_url":"https://codeload.github.com/ivantcholakov/codeigniter-user-agent-helper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228470322,"owners_count":17925204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codeigniter","php"],"created_at":"2024-10-01T08:13:54.522Z","updated_at":"2024-12-06T13:42:05.453Z","avatar_url":"https://github.com/ivantcholakov.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"User Agent Helper Functions\n===========================\n\nThis set of helper functions is aimed for convenience in use the CodeIgniter's\nUser_agent library. Tested on CodeIgniter 2.1.4 and CodeIgniter 3.0-dev (October, 2013).\n\nInstallation\n------------\n\nPlace the file user_agent_helper.php within your application/helpers folder.\n\nA Quick Test\n------------\n\n```php\n$this-\u003eload-\u003ehelper('user_agent');\nvar_dump(user_agent());\n```\n\nA Usage Example for Making an Adaptive HTML Boilerplate\n--------------------------------------------------------\n\n```php\nif (!function_exists('template_enable_oldie')) {\n\n    /**\n     * This function decides whether additional assets within a html template\n     * to be loaded for supporting older versions of Internet Explorer.\n     * Create within your system the following configuration options:\n     * $config['ie_min_supported_version'] = 6;         // 6, 7, 8, 9, 10, ...\n     * $config['load_assets_by_ua_detection'] = true;   // or false\n     * @autor Ivan Tcholakov, 2013.\n     * @license The MIT License, http://opensource.org/licenses/MIT\n     * @return boolean\n     */\n    function template_enable_oldie() {\n\n        $ie_min_supported = config_item('ie_min_supported_version');\n\n        if ($ie_min_supported \u003c 9) {\n\n            if (config_item('load_assets_by_ua_detection')) {\n\n                ci()-\u003eload-\u003ehelper('user_agent');\n\n                $browser = user_agent_ie();\n\n                if ($browser['is_ie']) {\n\n                    if ($browser['ie_version'] \u003c 9 \u0026\u0026\n                        $browser['ie_version'] \u003e= $ie_min_supported) {\n\n                        return true;\n                    }\n\n                    return false;\n                }\n\n                return false;\n            }\n\n            return true;\n        }\n\n        return false;\n    }\n\n}\n```\n\nAuthor: Ivan Tcholakov \u003civantcholakov@gmail.com\u003e, 2012-2013.  \nLicense: The MIT License (MIT), http://opensource.org/licenses/MIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivantcholakov%2Fcodeigniter-user-agent-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivantcholakov%2Fcodeigniter-user-agent-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivantcholakov%2Fcodeigniter-user-agent-helper/lists"}