{"id":23709371,"url":"https://github.com/dragomano/forko","last_synced_at":"2026-02-20T20:01:54.924Z","repository":{"id":153441698,"uuid":"224811843","full_name":"dragomano/Forko","owner":"dragomano","description":"Classes to work with DB via SMF forks","archived":false,"fork":false,"pushed_at":"2024-12-26T05:51:04.000Z","size":40,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-03T15:44:47.569Z","etag":null,"topics":["elkarte","portamx","smf","storybb","wedge"],"latest_commit_sha":null,"homepage":"","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/dragomano.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-11-29T08:36:16.000Z","updated_at":"2024-12-26T05:51:07.000Z","dependencies_parsed_at":"2024-12-26T06:34:47.510Z","dependency_job_id":null,"html_url":"https://github.com/dragomano/Forko","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/dragomano/Forko","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragomano%2FForko","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragomano%2FForko/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragomano%2FForko/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragomano%2FForko/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dragomano","download_url":"https://codeload.github.com/dragomano/Forko/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragomano%2FForko/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29662567,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T19:49:36.704Z","status":"ssl_error","status_checked_at":"2026-02-20T19:44:05.372Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["elkarte","portamx","smf","storybb","wedge"],"created_at":"2024-12-30T18:07:18.806Z","updated_at":"2026-02-20T20:01:54.896Z","avatar_url":"https://github.com/dragomano.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wrappers for SMF and forks to work with Database\n\n![ElkArte 1.1.x](https://img.shields.io/badge/ElkArte-1.1.x-green.svg?style=flat)\n![SMF 2.1.x](https://img.shields.io/badge/SMF-2.1.x-ed6033.svg?style=flat)\n![PHP](https://img.shields.io/badge/PHP-^8.0-blue.svg?style=flat)\n[![Coverage Status](https://coveralls.io/repos/github/dragomano/Forko/badge.svg?branch=master)](https://coveralls.io/github/dragomano/Forko?branch=master)\n\n## Install\n\n`composer require bugo/forko`\n\n## Usage\n\n```php\n// At first, require SSI.php of your forum (or autoload.php of your engine)\nrequire_once(dirname(__FILE__) . '/SSI.php');\n\n// Then require autoload.php from this package\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Define SMF\n$name = 'smf';\n$obj = $smcFunc;\n\n// ... or Wedge\n$name = 'wedge';\n$obj = new wesql();\n\n// ... or ElkArte\n$name = 'elkarte';\n$obj = database();\n\n// ... or PortaMx\n$name = 'pmx';\n$obj = $pmxcFunc;\n\n// ... or StoryBB\n$name = 'sbb';\n$obj = $smcFunc['db'];\n\n// And now get the adapter\n$forko = new \\Bugo\\Forko\\Forko($name);\n$adapter = $forko-\u003egetAdapterName();\n$db = new $adapter($obj);\n\n// ... or you can call concrete adapter directly\n$db = new \\Bugo\\Forko\\Adapters\\SMFAdapter($obj);\n```\n\n```php\n// SELECT * FROM {db_prefix}topics\n$all_topics = $db-\u003efindAll('topics');\nvar_dump($all_topics);\n```\n\n```php\n// INSERT INTO {db_prefix}calendar_holidays (event_date, title) VALUES('2020-01-01', 'The Event Name')\n$result = $note_id = $db-\u003einsert('calendar_holidays', ['event_date' =\u003e 'string', 'title' =\u003e 'string'], ['2020-01-01', 'The Event Name'], ['id_holiday']);\nvar_dump($result);\n```\n\n```php\n// UPDATE FROM {db_prefix}topics SET title = \"New title\" WHERE id_topic = 1\n$result = $db-\u003eupdate('topics', ['is_sticky' =\u003e '{int:is_sticky}'], 'WHERE id_topic = 1', ['is_sticky' =\u003e 1]);\nvar_dump($result);\n```\n\n```php\n// DELETE FROM {db_prefix}calendar_holidays WHERE id_holiday = $note_id\n$result = $db-\u003edelete('calendar_holidays', 'WHERE id_holiday = {int:id}', ['id' =\u003e $note_id]);\nvar_dump($result);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdragomano%2Fforko","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdragomano%2Fforko","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdragomano%2Fforko/lists"}