sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Sketchup / ruby WebDiablog / php

    Scheduled Pinned Locked Moved Developers' Forum
    11 Posts 3 Posters 640 Views 3 Watching
    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.
    • P Offline
      Pauline01
      last edited by

      Hello,

      I run with Ruby console on sketchup a ruby script whitch contains a new webdialog. I want to do Html, php and JavaScript with mysql (olol) but the webdialog can't treate php. Is it possible? I have wamp server ect ect.

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        You could set the source of your webdialog to your PHP enabled localhost.
        But that would be something you'd only be able to run on your machine. Noone else would be able to use it unless they installed WAMP and set up a local server - something which I doubt anyone would do.

        Thomas Thomassen — SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        1 Reply Last reply Reply Quote 0
        • P Offline
          Pauline01
          last edited by

          OK!

          But to put localhost in my functon webdialog, how i can do this?

          What is the parameters syntax of webdialog? I don't find in the API.

          My PC will be the server and the program will run only on my machine.

          thx for all!

          1 Reply Last reply Reply Quote 0
          • thomthomT Offline
            thomthom
            last edited by

            If a URL with the .set_file doesn't work, you might have to use frames to embed your local host.

            What are you using the PHP+MySQL for?

            Thomas Thomassen — SketchUp Monkey & Coding addict
            List of my plugins and link to the CookieWare fund

            1 Reply Last reply Reply Quote 0
            • N Offline
              NewOne
              last edited by

              Are you sure that you need php? You can make transactions with mysql just using ruby. Everything you need to manage a database.
              http://www.kitebird.com/articles/ruby-mysql.html or http://www.tmtm.org/en/ruby/mysql/

              1 Reply Last reply Reply Quote 0
              • P Offline
                Pauline01
                last edited by

                I test set.file with url and path php, else i want when i click on a dynamique object, to run a ruby script witch run a webdialog with a php form.

                With this form i configure some parameters object and i put this in a MysSQL base.

                My object is a motor for exemple, in sketchup it has an adress.When i click on this, I take the adress motor to do in my php file somes query in mysql. I can configure speed motor for example in my form. Sketchup is just a graphic interface witch can use google earth to do a geolocation (building and item on this).

                1 Reply Last reply Reply Quote 0
                • P Offline
                  Pauline01
                  last edited by

                  Y i can create just a form in html and to give in script ruby the values of my form and i do my queries in ruby.

                  But it's possble to return form values with only html and javascript (unless php) in a ruby script?

                  If yes, i will see on the net how to do this.

                  1 Reply Last reply Reply Quote 0
                  • P Offline
                    Pauline01
                    last edited by

                    And in html, this is an equal of include("file.php"); because else it's not flexible, i can use frame but i don't care.

                    1 Reply Last reply Reply Quote 0
                    • thomthomT Offline
                      thomthom
                      last edited by

                      @pauline01 said:

                      Y i can create just a form in html and to give in script ruby the values of my form and i do my queries in ruby.

                      But it's possble to return form values with only html and javascript (unless php) in a ruby script?

                      If yes, i will see on the net how to do this.

                      Error 404 (Not Found)!!1

                      favicon

                      (code.google.com)

                      Thomas Thomassen — SketchUp Monkey & Coding addict
                      List of my plugins and link to the CookieWare fund

                      1 Reply Last reply Reply Quote 0
                      • N Offline
                        NewOne
                        last edited by

                        @pauline01 said:

                        Y i can create just a form in html and to give in script ruby the values of my form and i do my queries in ruby.

                        But it's possble to return form values with only html and javascript (unless php) in a ruby script?

                        If yes, i will see on the net how to do this.

                        Yes it is! You make all mysql operations with ruby! I tried to make a project using Ruby Mysql, but I abandoned for more simpler approach, because data wasn't much and there was not a point to use databases. BUT, i was able to make my database working under sketchup and I was able also to transfer data between webdialog and mysql database using just callbacks and ruby code. Please read what i sent you here http://forums.sketchucation.com/viewtopic.php?f=180&t=22743#p192068, you have syntax too, and examples. Believe me, you don't need php. That was my fear, because i don't know php, but in the end I've been able to make it work with ruby. In the end what is the point of using lots of programming languages, if one can do all you need? 😄

                        1 Reply Last reply Reply Quote 0
                        • P Offline
                          Pauline01
                          last edited by

                          Nice so finally:

                          the form will be in html and javascript, and the dialog between the html file and the ruby script will allow to do all queries. nice! and thx... 😄

                          1 Reply Last reply Reply Quote 0
                          • 1 / 1
                          • First post
                            Last post
                          Buy SketchPlus
                          Buy SUbD
                          Buy WrapR
                          Buy eBook
                          Buy Modelur
                          Buy Vertex Tools
                          Buy SketchCuisine
                          Buy FormFonts

                          Advertisement