-
Notifications
You must be signed in to change notification settings - Fork 5
Home
Norbert Kuemin edited this page Oct 23, 2017
·
24 revisions
This Joomla plugin enables to put up some dynamic JSON informations into your content.
Follow these steps:
- Download the current version as ZIP from here.
- Install the ZIP at your Joomla site (Administrator - Extension)
- Enable the plugin (Administrator - Extension - Plugins)
- Put the following text into a new or existing article:
{json url=[https://api.github.com/repos/momo10216/plg_json/releases] execute=[client] scope=[all] view=[table] fields=[tag_name,name,zipball_url] labels=[Version,Description,ZIP] sortField=[tag_name] sortDirection=[desc]}
- Add new module (Customized HTML)
- Set options "Prepare content" = Yes
- Now you can use any plugins installed
| Option | Optional | Default | Description | Example |
|---|---|---|---|---|
| caching | Y | no | How long should the json data be cached in seconds (only works for execute=server) | 3600 |
| execute | Y | client | Where should the data be inserted (client/server)? | client |
| fields | Y | Fields to be displayed (only used by table or record view) | tag_name,name,zipball_url | |
| labels | Y | Labels for lists to be displayed (only used by table or record view) | Version,Description,ZIP | |
| scope | Y | all | Define the scope of the data to be displayed. You can use: numbers, ranges, oldest, latest, all | 1-oldest, 1-, oldest-latest |
| sortDirection | Y | Define order (asc, desc) to be used for sorting. Empty for not sorting. | desc | |
| sortField | Y | Define field to be used for sorting. | tag_name | |
| url | N | URL of the JSON service. | http://ip.jsontest.com/ | |
| view | N | Define the type (table, records, fields) of display to be used. | table |
| Project | Description | Code |
|---|---|---|
| Github | Show all releases | {json url=[https://api.github.com/repos/momo10216/plg_json/releases] scope=[all] view=[table] fields=[tag_name,name,zipball_url] labels=[Version,Description,ZIP] sortField=[tag_name] sortDirection=[desc]} |
| Github | Show latest release | {json url=[https://api.github.com/repos/momo10216/clubmgnt/releases] scope=[latest] view=[table] fields=[tag_name,published_at,name,zipball_url] labels=[Version,Date,Description,ZIP] sortField=[tag_name] sortDirection=[desc]} |
| Github | Show all issues | {json url=[https://api.github.com/repos/momo10216/clubmgnt/issues] scope=[all] view=[table] fields=[number,title,body] sortField=[number] sortDirection=[asc]} |
| Github | Show user information | {json url=[https://api.github.com/users/momo10216] scope=[latest] view=[fields]}On Github I'm registred as {jsonfield name=[login]} as {jsonfield name=[name]} since {jsonfield name=[created_at]}. {jsonfield name=[html_url]} |
| JSON-Test | Display ip address | {json url=[http://ip.jsontest.com/] scope=[latest] view=[fields]}Your IP address is: {jsonfield name=[ip]} |