code generator

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Jenny
    Staff Sergeant

    • Dec 2005
    • 45

    code generator

    Is it possible to have a form which 'generates code' from information from the form? e.g. if the form was....

    Article Title Field

    Article Authors Field

    The form would generate this code which woul dappear in some box beneath the form for the user to copy and paste:

    <title>Article Title</title>
    <meta name=”description” content=”
    Article Authors”>
  • kassi59
    Major General

    • Nov 2005
    • 2771

    #2
    Re: code generator

    Im not quite sure what exactly you are looking for. I can direct you to have a look at phpFormGenerator in your fantastico...you also might take a peek at Dew-NewPHPLinks, also in fantastico.
    Hope that will get you further along!

    Comment

    • navaldesign
      General & Forum Moderator

      • Oct 2005
      • 12080

      #3
      Re: code generator

      It is not the form that can generate the code, but a script that receives the info from the form and generates the code. Please explain excactly what you want to accomplish
      Navaldesign
      Logger Lite: Low Cost, Customizable, multifeatured Login script
      Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
      DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
      Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

      Comment

      • Andy128
        Major General

        • Dec 2005
        • 2317

        #4
        Re: code generator

        Like Navaldesign said- it is the coding that produces what you are trying to do. You could have a form with fields to fill in and the php script would out-put that data in what ever format you wish (generally speaking). This can eaisly be accomplished using the echo() or print() command in php.

        Post what you would like to do and explain how you would like it to appear -that way we can figure something out for you.

        Andy
        PHP- is a blast!

        Comment

        • Jenny
          Staff Sergeant

          • Dec 2005
          • 45

          #5
          Re: code generator

          Well, I want people to submit articles to my site.

          However, most of these articles tend to be PDFs and have (totally) useless title and meta descriptions.

          So, users submit text files with the title, author and publisher information substituted in as below:

          <title>ENTER THE ARTICLE TITLE HERE (ENTER CITATION HERE) - ENTER PUBLISHER HERE</title>
          <meta name=”description” content=”
          ENTER THE AUTHOR NAMES HERE”>

          Then, my search engine can read these text files and substitute in useful title and meta descriptions.

          BUT, many of my users would not be that computer literate and turn off as soon as they saw they had to manipulate the above code.

          So, if the form could 'generate' the code, all the user would have to do is enter the title, authors and publisher into the appropriate form fields.

          They would then copy and paste the generated code (which would magically appear in a box beneath the form) into a text file (without having to think about whether they got the code right) and just upload it.

          I hope I made some sense!

          Comment

          • navaldesign
            General & Forum Moderator

            • Oct 2005
            • 12080

            #6
            Re: code generator

            yes, it can be done easily. Contact Watdaflip Form Scripting Service and he will do it for you. If not, post back and i will.
            Navaldesign
            Logger Lite: Low Cost, Customizable, multifeatured Login script
            Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
            DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
            Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

            Comment

            • Andy128
              Major General

              • Dec 2005
              • 2317

              #7
              Re: code generator

              Don't understand the need to cut and paste? C & P into what file?

              What is done with this file and how is it merged or incorporated into the pdf file (as far as a title and meta description) that they are uploading?

              Are you uploading this to a database?


              Andy
              PHP- is a blast!

              Comment

              • navaldesign
                General & Forum Moderator

                • Oct 2005
                • 12080

                #8
                Re: code generator

                Andy, i beleive she will have a page for each author, and needs the meta tags for the page.
                Navaldesign
                Logger Lite: Low Cost, Customizable, multifeatured Login script
                Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                Comment

                • Andy128
                  Major General

                  • Dec 2005
                  • 2317

                  #9
                  Re: code generator

                  I am still confused as to the cut and paste? Wouldn't the form collect the info and e-mail it to her to encorporate into the page herself?

                  Andy
                  PHP- is a blast!

                  Comment

                  • Jenny
                    Staff Sergeant

                    • Dec 2005
                    • 45

                    #10
                    Re: code generator

                    The text files are desc files with the extension pdf.desc. The search engine identifies the desc file as being associated with a particular pdf, and then uses the title and meta information in the desc file instead of the (useless) data in the pdf. The search results then contains useful title/author/publisher information instead of "No Job Name" or something.

                    If anyone knows of an open-source script please let me know. Thanks for all your help.

                    Comment

                    • Andy128
                      Major General

                      • Dec 2005
                      • 2317

                      #11
                      Re: code generator

                      Jenny-
                      Thanks. I am intrigued about this and will look into it. Currently- how do you create such a file? With notepad? Modify the pdf itself?

                      Thanks again.

                      Andy
                      PHP- is a blast!

                      Comment

                      • Jenny
                        Staff Sergeant

                        • Dec 2005
                        • 45

                        #12
                        Re: code generator

                        To create a desc file (desc for description)

                        Open a Notepad file > File > Save As > All File types > "blah.pdf.desc"

                        No modification of the pdf is required, the search engine now gets the title and meta description from the pdf.desc file.

                        e.g. for a pdf called "cars.pdf", the search engine will look for a text file called "cars.pdf.desc".

                        Comment

                        • Andy128
                          Major General

                          • Dec 2005
                          • 2317

                          #13
                          Re: code generator

                          So the search engine searches the desc file and then you link the desc file to a particular pdf file? Correct?

                          Could you post a typical desc file so I may have a look at its composition?

                          Thanks again for your time in teaching me this.

                          Andy
                          PHP- is a blast!

                          Comment

                          • Jenny
                            Staff Sergeant

                            • Dec 2005
                            • 45

                            #14
                            Re: code generator

                            I tried to upload a pdf.desc file but the forum won't let me (sorry - just says 'invalid'). But I have uploaded these files to my webserver and they work fine.

                            The search engine indexes the pdf first. Then, the search engine can be programmed to look for a corresponding pdf.desc file on a particular website. If it finds one, it will use the title/meta information in the desc file for the pdf, but there is no "link" between the pdf and the pdf.desc file.

                            I don't know how the search engine knows to look for the desc files though. The Zoom search engine is the model I have and you can ask the people who developed it (www.wrensoft.com).

                            This is why I need the form to generate the code for novice websurfers so they can create these text files. Thanks for your help.

                            Comment

                            • Andy128
                              Major General

                              • Dec 2005
                              • 2317

                              #15
                              Re: code generator

                              Yes I understand now. The reason I asked is that you could create a form where they uplod their pdf file and then enter info you request to create the desc file. Then when them hit submit- it would upload the pdf file to your site and create a desc file automatically with the appropriate name and store that file on the site.

                              Thanks for the info. I am going to look into this. Navaldesign is correct- contact Watdaflip and he would be able to do all this for you. I have used his services and he is very reasonable and knowledgeable.

                              Contact him via this link;


                              Cheers,
                              Andy
                              PHP- is a blast!

                              Comment

                              Working...
                              X