3 Replies Latest reply on Nov 25, 2003 1:10 PM by Viet

    displaying blocks on other sites

    ryuuguu Newbie

      I would like to be able to display blocks on other sites. For example let other sites put my poll on their pages by using html like




      nuke would return the poll html code inside javascript writes like
      document.write("");
      ....

      My plan is to write a filter class that takes in the HTML wraps it in javascript which is then delivered to the browser. The filtering is activated a parameter in the URL.

      Does this sound feasible. Does any one have any pointers where in Nuke I should start looking as a place to insert a filter in the pipe or should it be done at another level in JBoss.

      Or are there any suggestions a better way to let external static HTML pages access blocks.

      Thanks,
      Grant

        • 1. Re: displaying blocks on other sites
          Viet Master

          I see, phpadsnew works a little bit the same way.
          Nukes would generate dynamicly some javascript executed on the client side that would write some data in the document ?

          julien

          • 2. Re: displaying blocks on other sites
            ryuuguu Newbie

            Yes that is the idea. I got it from PHPadsnew. Any suggestions where a good place for this filter would be? This is my first time working with EJBs, let alone JBoss. Or should I just be looking in the Nuke code?

            Grant

            • 3. Re: displaying blocks on other sites
              Viet Master

              you should look at how nukes send resources through modules.

              this is done in the method getResource(String id) on ComponentSupport.java and returns a ResourceObject.

              for instance if you call

              modules/mymodule/my/id

              it will call the mymodule module with the id my/id and you have to create a resource object and return it, then it will be streamed to the client. you can look at the MP3Module which does that for streaming.

              julien