{"id":20319559,"url":"https://github.com/nfourtythree/craft3-vcard","last_synced_at":"2025-04-11T18:13:09.128Z","repository":{"id":45866710,"uuid":"164496475","full_name":"nfourtythree/craft3-vcard","owner":"nfourtythree","description":"vCard generator plugin for Craft","archived":false,"fork":false,"pushed_at":"2024-07-25T17:59:07.000Z","size":311,"stargazers_count":4,"open_issues_count":3,"forks_count":4,"subscribers_count":2,"default_branch":"3.x","last_synced_at":"2025-04-11T18:13:01.932Z","etag":null,"topics":["craft-plugin","craft3","craftcms","craftcms-plugin","craftcms3","vcard"],"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/nfourtythree.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2019-01-07T21:11:22.000Z","updated_at":"2024-08-15T14:04:43.000Z","dependencies_parsed_at":"2024-06-07T15:17:40.606Z","dependency_job_id":"d093b2b1-7c3e-4b50-bafa-fc8499a1baf7","html_url":"https://github.com/nfourtythree/craft3-vcard","commit_stats":{"total_commits":25,"total_committers":3,"mean_commits":8.333333333333334,"dds":"0.16000000000000003","last_synced_commit":"187805fedd9aad62d8cc5979b1d00bc0724c923c"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfourtythree%2Fcraft3-vcard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfourtythree%2Fcraft3-vcard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfourtythree%2Fcraft3-vcard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfourtythree%2Fcraft3-vcard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nfourtythree","download_url":"https://codeload.github.com/nfourtythree/craft3-vcard/tar.gz/refs/heads/3.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248456373,"owners_count":21106604,"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":["craft-plugin","craft3","craftcms","craftcms-plugin","craftcms3","vcard"],"created_at":"2024-11-14T18:47:20.696Z","updated_at":"2025-04-11T18:13:09.094Z","avatar_url":"https://github.com/nfourtythree.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Plugin Icon](resources/img/icon.png)\n\n# vCard plugin for Craft CMS 5.x\n\nvCard generator plugin for Craft CMS 5\n\n## Requirements\n\nThis plugin requires Craft CMS 5.0.0 or later.\n\n## Installation\n\nTo install the plugin, follow these instructions.\n\n1. Open your terminal and go to your Craft project:\n\n        cd /path/to/project\n\n2. Then tell Composer to load the plugin:\n\n        composer require nfourtythree/vcard\n\n3. In the Control Panel, go to Settings → Plugins and click the “Install” button for vCard.\n\n## vCard Overview\n\nThis plugin generates a link to download a vCard from data you specify\n\n## Configuring vCard\n\nThere is only one setting for this plugin which is `salt` this is a `string` used for salting the encoded data when generating the vCard link.\n\nThis can be set by creating a `vcard.php` config file in the `config/` directory. Below is an example of the config file:\n\n```php\n\u003c?php\n\nreturn [\n    'salt' =\u003e 'your-salt-here'\n];\n```\n\n## Using vCard\n\nThe only thing that is really `required` is first name. Everything else is optional\n\n### Usage\n\nThere is a link variable available for usage in templates `craft.vCard.link(options)`\n\n```twig\n{% set options = {\n  firstName: \"Johnny\",\n  lastName: \"Appleseed\",\n  additional: \"Jim\",\n  prefix: \"Mr\",\n  suffix: \"Esq\",\n  company: \"Apple Inc.\",\n  jobTitle: \"Data Demo\",\n  email: [{ address: \"johnny@apple.com\", type: \"WORK\" }, \"johnny@gmail.com\"],\n  url: \"http://apple.com\",\n  phoneNumber: [\"+1 234 567 89\", { number: \"+9 876 543 21\"}],\n  photo: \"http://exmaple.com/images/avatar.jpg\",\n  address: [{\n      name: \"Apple\",\n      extended: \"Suite 1\",\n      street: \"1 Infinte Loop\",\n      city: \"Cupertino\",\n      region: \"CA\",\n      zip: \"95014\",\n      country: \"USA\",\n      type: \"WORK;PARCEL;POSTAL\"\n    },\n    {\n      street: \"1 Yemen Road\",\n      zip: \"1234\",\n      country: \"Yemen\",\n      type: \"HOME;POSTAL\"\n    }],\n  note: \"Hi there\",\n  role: \"Web Developer\",\n} %}\n\n\u003ca href=\"{{ craft.vCard.link(options) }}\"\u003eDownload my vCard\u003c/a\u003e\n```\n\n\n### Options\n\n| Name        | Type         | Example                                               |\n|-------------|--------------|-------------------------------------------------------|\n| firstName   | String       | Johnny                                                |\n| lastName    | String       | Appleseed                                             |\n| additional  | String       | Jim (*commonly a middle name*)                        |\n| prefix      | String       | Mr                                                    |\n| suffix      | String       | Esq                                                   |\n| company     | String       | Apple Inc                                             |\n| jobTitle    | String       | Demo Data Guru                                        |\n| email       | String/Array | [See email docs](#email)                              |\n| url         | String/Array | [See url docs](#url)                                  |\n| address     | String/Array | [See address docs](#address)                          |\n| phoneNumber | String/Array | [See phoneNumber docs](#phonenumber)                  |\n| birthday    | String       | 1985-10-26 (*YYYY-MM-DD format*)                      |\n| note        | String       | Johnny is amazing                                     |\n| photo       | String       | http://example.com/images/avatar.jpg (*Url to image*) |\n\n---\n\n##### email\n\nThis can be specified as either a string `johnny@apple.com` or an array (or even a mix!)\n\n| Name    | Type   | Example                                                                                          |\n|---------|--------|--------------------------------------------------------------------------------------------------|\n| address | String | johnny@apple.com                                                                                 |\n| type    | String | type may be PREF, WORK, HOME or any combination of these: e.g. \"PREF;WORK\". This is not required |\n\n```\n  email: {\n    address: \"johnny@apple.com\",\n    type: \"WORK\"\n  }\n\n  // For multiple email addresses\n  email: [{\n      address: \"johnny@apple.com\",\n      type: \"WORK\"\n    },\n    {\n      address: \"johnny@gmail.com\",\n      type: \"PREF;HOME\"\n    }]\n\n  // Mix and match example\n  email: [\"johnny@apple.com\", {\n      address: \"johnny@gmail.com\",\n      type: \"PREF;HOME\"\n    }]\n\n```\n\n##### url\n\nThis can be specified as either a string `http://apple.com` or an array (or even a mix!)\n\n| Name    | Type   | Example                                     |\n|---------|--------|---------------------------------------------|\n| address | String | http://apple.com                            |\n| type    | String | type may be WORK, HOME This is not required |\n\n```\n  url: {\n    address: \"http://apple.com\",\n    type: \"WORK\"\n  }\n\n  // For multiple urls\n  url: [{\n      address: \"http://apple.com\",\n      type: \"WORK\"\n    },\n    {\n      address: \"http://google.com\",\n      type: \"HOME\"\n    }]\n\n  // Mix and match example\n  url: [\"http://apple.com\", {\n      address: \"http://google.com\",\n      type: \"HOME\"\n    }]\n\n\n```\n\n##### phoneNumber\n\nThis can be specified as either a string `+1 234 567 89` or an array (or even a mix!)\n\n| Name   | Type   | Example                                                                                                                                      |\n|--------|--------|----------------------------------------------------------------------------------------------------------------------------------------------|\n| number | String | +1 234 567 89                                                                                                                                |\n| type   | String | Type may be PREF, WORK, HOME, VOICE, FAX, MSG, CELL, PAGER, BBS, CAR, MODEM, ISDN, VIDEO or any sensible combination, e.g. \"PREF;WORK;VOICE\" |\n\n```\n  phoneNumber: {\n    number: \"+1 234 567 89\",\n    type: \"PREF;WORK;VOICE\"\n  }\n\n  // For multiple phoneNumbers\n  phoneNumber: [{\n      number: \"+1 234 567 89\",\n      type: \"WORK\"\n    },\n    {\n      number: \"+9 876 543 21\",\n      type: \"PREF;HOME\"\n    }]\n\n  // Mix and match example\n  phoneNumber: [\"+1 234 567 89\", {\n      number: \"+9 876 543 21\",\n      type: \"HOME\"\n    }]\n\n\n```\n\n##### address\n\nThis can be either a single or multi array\n\n| Name     | Type   | Example                                                                                                  |\n|----------|--------|----------------------------------------------------------------------------------------------------------|\n| name     | String | Apple                                                                                                    |\n| extended | String | Suite 1                                                                                                  |\n| street   | String | 1 Infinite Loop                                                                                          |\n| city     | String | Cupertino                                                                                                |\n| region   | String | CA                                                                                                       |\n| zip      | String | 95014                                                                                                    |\n| country  | String | USA                                                                                                      |\n| type     | String | type may be DOM, INTL, POSTAL, PARCEL, HOME, WORK or any combination of these: e.g. \"WORK;PARCEL;POSTAL\" |\n\n```\n  address: {\n    name: \"Apple\",\n    extended: \"Suite 1\",\n    street: \"1 Infinte Loop\",\n    city: \"Cupertino\",\n    region: \"CA\",\n    zip: \"95014\",\n    country: \"USA\",\n    type: \"WORK;PARCEL;POSTAL\"\n  }\n\n  // For multiple addresses\n  address: [{\n      name: \"Apple\",\n      extended: \"Suite 1\",\n      street: \"1 Infinte Loop\",\n      city: \"Cupertino\",\n      region: \"CA\",\n      zip: \"95014\",\n      country: \"USA\",\n      type: \"WORK;PARCEL;POSTAL\"\n    },\n    {\n      street: \"1 Yemen Road\",\n      zip: \"1234\",\n      country: \"Yemen\",\n      type: \"HOME;POSTAL\"\n    }]\n\n```\n\n## ToDo\n\n* Clean up / refactor code to tidy code that was done quickly\n\nBrought to you by [Nathaniel Hammond (nfourtythree)](https://n43.me)\n\n###### Thanks to\n\n- Jeroen Desloovere - https://github.com/jeroendesloovere/vcard\n- nystudio107 - https://github.com/nystudio107/generator-craftplugin (for just making life easier / quicker)\n- Chris Rowe - http://chrisrowe.net for the idea to make this plugin\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfourtythree%2Fcraft3-vcard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnfourtythree%2Fcraft3-vcard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfourtythree%2Fcraft3-vcard/lists"}