{"id":28101646,"url":"https://github.com/codelab7/ci-activity-logger-librery","last_synced_at":"2025-06-26T09:38:40.433Z","repository":{"id":190577505,"uuid":"142582226","full_name":"CodeLab7/ci-activity-logger-librery","owner":"CodeLab7","description":"Codeigniter based Activity Log Library.  Add Log, Retrieve Log etc","archived":false,"fork":false,"pushed_at":"2018-08-14T07:38:38.000Z","size":20,"stargazers_count":12,"open_issues_count":2,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2023-08-25T10:04:52.479Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://codelab7.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodeLab7.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,"governance":null}},"created_at":"2018-07-27T13:43:29.000Z","updated_at":"2023-08-25T10:05:05.313Z","dependencies_parsed_at":"2023-08-25T10:05:02.932Z","dependency_job_id":null,"html_url":"https://github.com/CodeLab7/ci-activity-logger-librery","commit_stats":null,"previous_names":["codelab7/ci-activity-logger-librery"],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeLab7%2Fci-activity-logger-librery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeLab7%2Fci-activity-logger-librery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeLab7%2Fci-activity-logger-librery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeLab7%2Fci-activity-logger-librery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeLab7","download_url":"https://codeload.github.com/CodeLab7/ci-activity-logger-librery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254010782,"owners_count":21998993,"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":[],"created_at":"2025-05-13T18:57:51.886Z","updated_at":"2025-05-13T18:57:57.292Z","avatar_url":"https://github.com/CodeLab7.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Codeigniter Activity Log Library\n\n[![N|CodeLab7](https://avatars0.githubusercontent.com/u/39191324?s=200\u0026v=4)](https://codelab7.com)\n\nActivity Log is a Codeigniter library used to record activity on a website and to fetch the results for reporting purposes. \n\n  - Is easy to Use\n  - Simple syntax for adding and fetching records\n  - Standalone library for use on any kind of website\n\n### Installation\n\nLogger requires [Codeigniter](https://codeigniter.com) version 3 to run.\n\n- Copy library (Logger.php) into your `/application/library` folder.\n- Import logger.sql into your database (or manually create the table).\n\nTo manually create the table run the following command in your MySql command prompt:\n\n```sql\nCREATE TABLE `logger` (  `id` bigint(20) NOT NULL AUTO_INCREMENT,  \n    `created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,  \n    `created_by`int(11) NOT NULL,  \n    `type` varchar(255) NOT NULL,  \n    `type_id` bigint(20) NOT NULL,  \n    `token` varchar(255) NOT NULL, \n    `comment` text NOT NULL );\n\nALTER TABLE `logger`  ADD PRIMARY KEY (`id`);\n```\n\nYou can change the field names in the library by altering the following lines in Logger.php\n\n```php\nprivate $table_fields = array(\n    'id'         =\u003e 'id', //Value will be Actual table field\n    'created_on' =\u003e 'created_on',\n    'created_by' =\u003e 'created_by',\n    'type'       =\u003e 'type',\n    'type_id'    =\u003e 'type_id',\n    'token'      =\u003e 'token',\n    'comment'    =\u003e 'comment',\n  );\n```\n\n### Loading\nTo load the logger library add the following\n\n```php\n$this-\u003eload-\u003elibrary('logger');\n```\n\n### Use \n**Log Activity**\n```php\n$this-\u003elogger\n     -\u003euser(1) //Set UserID, who created this  Action\n     -\u003etype('post') //Entry type like, Post, Page, Entry\n     -\u003eid(1) //Entry ID\n     -\u003etoken('delete') //Token identify Action\n     -\u003elog(); //Add Database Entry\n```\n\n**Get Entry**\n```php\n$this-\u003elogger\n     -\u003euser(1) //Add Only If you want user specific Entry\n     -\u003etype('post') //Add Only If you want type specific Entry\n     -\u003eid(1) //Add Only If you want typeID specific Entry\n     -\u003etoken('delete') //Add Only If you want token specific Entry\n     -\u003eget(); //Get All Entry\n```\n\n### Development\nWant to contribute? Great! Just fork, clone, and start working, submit a pull request when you are ready.\nOr You can join our team at [codelab7](https://codelab7.com)\n\n### Todo(s)\n\n - Advance testing\n - Add other important fields\n\nLicense\n----\nGPL 3.0\n\n**Free Software, Hell Yeah!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelab7%2Fci-activity-logger-librery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodelab7%2Fci-activity-logger-librery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelab7%2Fci-activity-logger-librery/lists"}