Plugin Author
berkux
(@berkux)
Hi,
try this:
[jsoncontentimporter url=http://services.swpc.noaa.gov/products/alerts.json]
{product_id}{issue_datetime}{message}<br>
[/jsoncontentimporter]
Bernhard
Thanks a lot! But how to reduce the number of the displayed items? And how to separate product_id, issue_datetime and massage on different rows? Is it possible?
Plugin Author
berkux
(@berkux)
Hi,
what about this:
<table border=1>
[jsoncontentimporter url=http://services.swpc.noaa.gov/products/alerts.json numberofdisplayeditems=3]
<tr><td>{product_id}</td><td>{issue_datetime}</td><td>{message}</td></tr>
[/jsoncontentimporter]
</table>
Bernhard
Wow, amazing! It works! God bless you!
Plugin Author
berkux
(@berkux)
You‘re welcome. You might vote for my plugin here…
I’m trying to ask Google the right question to find the solution for my quest but I didn’t succeed. So please help me again!
From json url:
message : Space Weather Message Code: ALTTP4\r\nSerial Number: 548\r\nIssue Time: 2021 May 07 1927 UTC\r\n\r\nALERT: Type IV Radio Emission\r\nBegin Time: 2021 May 07 1907 UTC\r\n\r\nNOAA Space Weather Scale descriptions can be found at\r\nwww.swpc.noaa.gov/noaa-scales-explanation\r\n\r\nDescription: Type IV emissions occur in association with major eruptions on the sun and are typically associated with strong coronal mass ejections and solar radiation storms.
I want make this text from this json url to appear on my web page in different lines, every line must start after \r\n or \r\n\r codes. How to do that?
This is the same json url: https://services.swpc.noaa.gov/products/alerts.json
I want alerts to look structured like this:
Space Weather Message Code: ALTTP4
Serial Number: 548
Issue Time: 2021 May 07 1927 UTC
ALERT: Type IV Radio Emission
Begin Time: 2021 May 07 1907 UTC
NOAA Space Weather Scale descriptions can be found at
http://www.swpc.noaa.gov/noaa-scales-explanation
Description: Type IV emissions occur in association with major eruptions on the sun and are typically associated with strong coronal mass ejections and solar radiation storms.
Please help!
Plugin Author
berkux
(@berkux)
Hi,
try
<table border=1>
[jsoncontentimporter url=http://services.swpc.noaa.gov/products/alerts.json numberofdisplayeditems=3]
<tr><td>{product_id}</td><td>{issue_datetime}</td><td>{message:htmlAndLinefeed2htmlLinefeed}</td></tr>
[/jsoncontentimporter]
</table>
Bernhard
Are you some God of the programming or what?! Everything works just fine! <3
Hey, got the same Problem, but couldn’t solve it with the solution in this post. Could you please have a look? Thanks!
[jsoncontentimporter url=https://secure.einfachmachenplattform.de/api/v1/pages/15/events numberofdisplayeditems=-1 urlgettimeout=5 debugmode=10 ]start: {start}<br>{subloop-array:level2:-1}level2: {level2.key}<br>{subloop:level2.data:-1}id: {level2.data.id}, type: {level2.data.type}<br>{/subloop:level2.data}{/subloop-array:level2}[/jsoncontentimporter]