{"id":19205498,"url":"https://github.com/zwacky/bbcodeparser","last_synced_at":"2025-05-12T17:15:34.331Z","repository":{"id":13572200,"uuid":"16264652","full_name":"zwacky/BBCodeParser","owner":"zwacky","description":"A Parser for BBCode","archived":false,"fork":false,"pushed_at":"2014-01-27T21:39:17.000Z","size":161,"stargazers_count":1,"open_issues_count":0,"forks_count":37,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-12T17:15:28.058Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zwacky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-26T23:46:28.000Z","updated_at":"2020-01-12T10:22:15.000Z","dependencies_parsed_at":"2022-09-09T08:11:56.197Z","dependency_job_id":null,"html_url":"https://github.com/zwacky/BBCodeParser","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zwacky%2FBBCodeParser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zwacky%2FBBCodeParser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zwacky%2FBBCodeParser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zwacky%2FBBCodeParser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zwacky","download_url":"https://codeload.github.com/zwacky/BBCodeParser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253785011,"owners_count":21963903,"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":"2024-11-09T13:13:00.894Z","updated_at":"2025-05-12T17:15:34.308Z","avatar_url":"https://github.com/zwacky.png","language":"PHP","readme":"[![Build Status](https://travis-ci.org/golonka/BBCodeParser.png?branch=master)](https://travis-ci.org/golonka/BBCodeParser)\n\n# BBCodeParser\nBBCodeParser is a standalone library that parses all(?) the common bbcode tags.\nThe easiest way to install is via composer and is equally as easy to integrate into Laravel 4\n\nThe available tags are:\n\n- [b][/b] Bold\n- [i][/i] Italic\n- [u][/u] Underline\n- [s][/s] Line through\n- [size=4][/size] Font size\n- [color=#eee][/color] Font color\n- [center][/center] Center\n- [quote][/quote] Quote\n- [quote=John Doe][/] Named quote\n- [url][/url] Link\n- [url=http://example.com]example.com[/url] Named link\n- [img]http://example.com]example.com/logo.png[/img] Image\n- [ol][/ol] Ordered list\n- [ul][/ul] Unordered list\n- [*] List item\n- [code][/code] Code\n- [youtube][/youtube] Youtube\n\n## Installation\n\nThe easiest way to install the BBCodeParser library is via composer.\nIf you don´t now what composer is or how you use it you can find more information about that at [their website](http://www.getcomposer.org/).\n\n### Composer\n\nYou can find the BBCodeParser class via [Packagist](https://packagist.org/packages/golonka/bbcodeparser).\nRequire the package in your `` composer.json `` file.\n\n    \"golonka/bbcodeparser\": \"1.0.*\"\n\nThen you run install or update to download your new requirement\n\n    php composer.phar install\n\nor\n\n    php composer.phar update\n\nNow you are able to require the vendor/autoload.php file to PSR-0 autoload the library.\n\n### Example\n \n    // include composer autoload\n    require 'vendor/autoload.php';\n    \n    // import the BBCodeParser Class\n    use Golonka\\BBCode\\BBCodeParser;\n\n    // Lets parse!\n    $bbcode = BBCodeParser::parse('[b]Bold[/b]');\nIf you´re a fan of Laravel 4 then the integration is made in a blink of an eye. \nWe will go through how that is done below. \n\n## Laravel 4 integration\n\nThe BBCodeParser Class has optional Laravel 4 support and comes with a Service Provider and Facades for easy integration. After you have done the installation correctly, just follow the instructions.\n\nOpen your Laravel config file config/app.php and add the following lines.\n\nIn the ``$providers `` array add the service providers for this package.\n\n    'Golonka\\BBCode\\BBCodeParserServiceProvider'\n\nAdd the facade of this package to the `` $aliases `` array.\n\n    'BBCode' =\u003e 'Golonka\\BBCode\\Facades\\BBCodeParser'\n\nNow the BBCodeParser Class will be auto-loaded by Laravel.\n\n### Example\n\nBy default all tags will be parsed\n\n    BBCode::parse('[b]bold[/b][i]italic[/i]');\n\nIf you would like to use only some tags when you parse you can do that by doing like this \n\n    // In this case the [i][/i] tag will not be parsed\n    BBCode::only('bold')-\u003eparse('[b]bold[/b][i]italic[/i]');\n\nor\n\n    // In this case all tags except [b][/b] will be parsed\n    BBCode::except('bold')-\u003eparse('[b]bold[/b][i]italic[/i]');\n\n## Custom Parsers\n\nYou can add new custom parsers or overwrite existing parsers.\n\n    // name, pattern, replace\n    BBCode::setParser('mailurl', '/\\[mailurl\\](.*)\\[\\/mailurl\\]/', '\u003ca href=\"mailto:$1\"\u003e$1\u003c/a\u003e');\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzwacky%2Fbbcodeparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzwacky%2Fbbcodeparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzwacky%2Fbbcodeparser/lists"}