Navigation

    CreatiCode Scratch Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode

    block suggestions

    Feedback
    suggestion widgets-blocks
    2
    7
    384
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jeffreyrb03-gmail
      JaecadeJnight Mod Helper last edited by

      convert tables to JSON

      so currently, using the tables as variables is useful for when you wanna convert the table to JSON
      a82f7cfc-03a8-4036-948d-8c18b04d3b55-image.png
      However, there’s no way to convert them back unless you develop an algorithim to interpret the JSON and add columns and rows to the table using that JSON data. Could there be like a reporter block that looks like this?:
      d6f80be9-3dab-4a85-a7b5-dfdf8712083b-image.png
      ( https://scratchblocks.github.io/#?style=scratch3&script=(convert table [search_table v] to JSON data%3A%3Aoperators) )

      YouTube subscribe to channel widgets button

      The article is here which shows how you can make a button on a website to https://developers.google.com/youtube/youtube_subscribe_button
      0dfe3b17-91e8-4f56-ac48-1f204a38b8c3-image.png
      I’m not sure though because although it wont be as interactive, an image with a link will also do, but I’m just throwing this suggestion out there because it would look good next to the other youtube blocks in the widgets section of the toolbox.

      #LLJW
      <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

      info-creaticode 1 Reply Last reply Reply Quote 0
      • info-creaticode
        CreatiCode @jeffreyrb03-gmail last edited by

        @jeffreyrb03-gmail

        For the new block for table, do you actually mean the opposite? “convert JSON [json data] to table [TABLENAME]”?

        For the Youtube button, I’m not sure what you are suggesting? A new block?

        jeffreyrb03-gmail 1 Reply Last reply Reply Quote 1
        • jeffreyrb03-gmail
          JaecadeJnight Mod Helper @info-creaticode last edited by jeffreyrb03-gmail

          @info-creaticode Oh yeah you’re right about the first, I made a mistake. And for the second one, yes, I’m suggesting a new block. Sorry for the late response.

          #LLJW
          <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

          info-creaticode 1 Reply Last reply Reply Quote 0
          • info-creaticode
            CreatiCode @jeffreyrb03-gmail last edited by info-creaticode

            @jeffreyrb03-gmail

            NP. For the youtube block, can you please specify what it says on the block and what it does?

            And for the table block, what would be a typical use case for it?

            jeffreyrb03-gmail 1 Reply Last reply Reply Quote 1
            • jeffreyrb03-gmail
              JaecadeJnight Mod Helper @info-creaticode last edited by

              @info-creaticode Ok! I’ll make a mockup in a bit for the first one but first I’m gonna respond to the second one:
              For the table block, i realized it should be a normal block, not a reporter, just what you said, and for it’s purpose, there’s many:

              • With CreatiCode, a lot of things are like infinitely easier to modify when they’re in a text form. For example, ChatGPT and stuff like regex help with this. I’ll use ChatGPT as an example: You can already feed an entire table to ChatGPT by just using "here’s a json table, can you change it to fit x criteria and be y rows long: ", a join block, and the table variable. ChatGPT would give you the modified table, but you can’t convert it back to a normal table. Or you could just have ChatGPT generate an entire table with just 1 message and very simply convert it to a CreatiCode table since JSON data isn’t very usable or helpful here.
              • Also, just backwards compatibility. If you do something it’s nice to be able to undo it. Also, like the first one, being able to edit it raw as well with any methods. Additionally, tables are already stored as JSON so all this block would have to do is just put in a table directly using the JSON code provided in the table.
              • Convienience. It’s just easier than importing I feel like

              #LLJW
              <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

              info-creaticode 1 Reply Last reply Reply Quote 0
              • info-creaticode
                CreatiCode @jeffreyrb03-gmail last edited by

                @jeffreyrb03-gmail

                Got it. That makes sense. We will add that block.

                jeffreyrb03-gmail 1 Reply Last reply Reply Quote 1
                • jeffreyrb03-gmail
                  JaecadeJnight Mod Helper @info-creaticode last edited by jeffreyrb03-gmail

                  @info-creaticode Just made a YouTube one:
                  fd5aa1e9-a320-421d-a125-e23fb71a8c6c-image.png
                  That will generate this:

                  
                  <script src="https://apis.google.com/js/platform.js"></script>
                  
                  <div class="g-ytsubscribe" data-channelid="UC_FXfu97VJLbGM8TRBpS90g" data-layout="full" data-count="default"></div>
                  

                  All the block needs to change is just the data-channelid and if “yes” is chose for dark theme, just add data-theme="dark" attribute to the div.

                  Edit: code result: 2e39c053-47f9-453c-90af-5dd3388d5b15-image.png

                  #LLJW
                  <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post