• Resolved kokokarshakov

    (@kokokarshakov)


    I tried this code but nothing happens:

    [jsoncontentimporter url=https://services.swpc.noaa.gov/products/alerts.json basenode=array]
    {subloop-array:-1}
    {array.product_id}{array.issue_datetime}{array.message}
    {/subloop-array}
    [/jsoncontentimporter]

    Please help!

    • This topic was modified 3 years, 10 months ago by kokokarshakov.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author berkux

    (@berkux)

    Hi,

    try this:

    [jsoncontentimporter url=https://services.swpc.noaa.gov/products/alerts.json]
    {product_id}{issue_datetime}{message}<br>
    [/jsoncontentimporter]

    Bernhard

    Thread Starter kokokarshakov

    (@kokokarshakov)

    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=https://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

    Thread Starter kokokarshakov

    (@kokokarshakov)

    Wow, amazing! It works! God bless you!

    Plugin Author berkux

    (@berkux)

    You‘re welcome. You might vote for my plugin here…

    Thread Starter kokokarshakov

    (@kokokarshakov)

    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

    Thread Starter kokokarshakov

    (@kokokarshakov)

    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
    https://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=https://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

    Thread Starter kokokarshakov

    (@kokokarshakov)

    Are you some God of the programming or what?! Everything works just fine! <3

    instituteforawesomeness

    (@instituteforawesomeness)

    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]

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Hello, the text doesn’t display’ is closed to new replies.