Loading ...
Sorry, an error occurred while loading the content.

Dynamic shortcuts

Expand Messages
  • Matt Mower
    Hi folks, Is there any way to make Radio shortcuts dynamic? What I need to do is modify the shortcut depending upon which category is being rendered. Can this
    Message 1 of 20 , Nov 25, 2002
    • 0 Attachment
      Hi folks,

      Is there any way to make Radio shortcuts dynamic? What I need to do is
      modify the shortcut depending upon which category is being rendered.
      Can this be done?

      Regards,

      matt
    • Dave Winer
      Probably, but why not use a macro? ... From: Matt Mower To: Sent: Monday, November 25, 2002 3:46 PM
      Message 2 of 20 , Nov 25, 2002
      • 0 Attachment
        Probably, but why not use a macro?


        ----- Original Message -----
        From: "Matt Mower" <mmower@...>
        To: <radio-dev@yahoogroups.com>
        Sent: Monday, November 25, 2002 3:46 PM
        Subject: [radio-dev] Dynamic shortcuts


        > Hi folks,
        >
        > Is there any way to make Radio shortcuts dynamic? What I need to do is
        > modify the shortcut depending upon which category is being rendered.
        > Can this be done?
        >
        > Regards,
        >
        > matt
        >
        >
        > To unsubscribe from this group, send an email to:
        > radio-dev-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
        >
        >
      • Matt Mower
        Hi Dave, The reason I don t want to use a macro is that I want to leverage the ease of use of shortcuts, i.e. it is much easier for a user to remember to
        Message 3 of 20 , Nov 26, 2002
        • 0 Attachment
          Hi Dave,

          The reason I don't want to use a macro is that I want to leverage the
          ease of use of shortcuts, i.e. it is much easier for a user to remember
          to write:

          "^my topic" ( since they will be auto generated I chose "^" as
          a way of differentiating topic shortcuts )

          than:

          { liveTopicsTopicLink( "my topic" ) }

          Based on your comment I tried creating a shortcut with a macro in it
          using both "{ macro }" and "<% macro %>" syntaxes but they don't get
          interpolated. Am I doing that wrong?

          Is there some other way to do this?

          Thanks,

          matt

          -----Original Message-----
          From: Dave Winer [mailto:dave@...]
          Sent: 26 November 2002 00:16
          To: radio-dev@yahoogroups.com
          Subject: Re: [radio-dev] Dynamic shortcuts


          Probably, but why not use a macro?
        • Dave Winer
          Read the code for html.refGlossary. It s ancient, but it provides for macros. I wouldn t touch it with a ten foot pole. Dave ... From: Matt Mower
          Message 4 of 20 , Nov 26, 2002
          • 0 Attachment
            Read the code for html.refGlossary.

            It's ancient, but it provides for macros.

            I wouldn't touch it with a ten foot pole.

            Dave


            ----- Original Message -----
            From: "Matt Mower" <mmower@...>
            To: <radio-dev@yahoogroups.com>
            Sent: Tuesday, November 26, 2002 2:58 AM
            Subject: RE: [radio-dev] Dynamic shortcuts


            > Hi Dave,
            >
            > The reason I don't want to use a macro is that I want to leverage the
            > ease of use of shortcuts, i.e. it is much easier for a user to remember
            > to write:
            >
            > "^my topic" ( since they will be auto generated I chose "^" as
            > a way of differentiating topic shortcuts )
            >
            > than:
            >
            > { liveTopicsTopicLink( "my topic" ) }
            >
            > Based on your comment I tried creating a shortcut with a macro in it
            > using both "{ macro }" and "<% macro %>" syntaxes but they don't get
            > interpolated. Am I doing that wrong?
            >
            > Is there some other way to do this?
            >
            > Thanks,
            >
            > matt
            >
            > -----Original Message-----
            > From: Dave Winer [mailto:dave@...]
            > Sent: 26 November 2002 00:16
            > To: radio-dev@yahoogroups.com
            > Subject: Re: [radio-dev] Dynamic shortcuts
            >
            >
            > Probably, but why not use a macro?
            >
            >
            >
            >
            >
            > To unsubscribe from this group, send an email to:
            > radio-dev-unsubscribe@yahoogroups.com
            >
            >
            >
            > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
            >
            >
          • Matt Mower
            Hi Dave, Thanks for the reference to html.refGlossary(), I ve also been searching Google and come across Glossaries & Filters
            Message 5 of 20 , Nov 26, 2002
            • 0 Attachment
              Hi Dave,

              Thanks for the reference to html.refGlossary(), I've also been searching
              Google and come across "Glossaries & Filters"
              (http://frontier.userland.com/stories/storyReader$1152).

              (1)

              The G&F page suggests that I should be able to put a macro call like "{
              myMacro() }" into a glossary entry and I can. However, as I mentioned
              in my last message, the rendered text is "{ myMacro() }" and not the
              return value of the myMacro() call.

              This leads me to conclude that whatever code used to do this is now
              broken, or, I've misunderstood how it was supposed to work.

              (2)

              Reading html.refGlossary() it implies that a glossary entry can be a
              script which it can, except when the entry is in user.html.glossary in
              which case instead of executing:

              return ( adr^() )

              it does:

              return ( string( user.html.glossary[name] ) )

              So that the source (not the return value) of the script appears in the
              rendered text.

              The solution is to modify html.refGlossary so that:

              return (string (user.html.glossary [name]))

              becomes

              if( typeOf( user.html.glossary[name] ) == scriptType ) {
              return ( user.html.glossary[name]() )
              } else {
              return ( string( user.html.glossary[name] ) )
              }

              This latter seems to be a pretty simple, stable change. Would it be
              possible to fix it?

              Thanks,

              Matt

              -----Original Message-----
              From: Dave Winer [mailto:dave@...]
              Sent: 26 November 2002 13:02
              To: radio-dev@yahoogroups.com
              Subject: Re: [radio-dev] Dynamic shortcuts


              Read the code for html.refGlossary.

              It's ancient, but it provides for macros.

              I wouldn't touch it with a ten foot pole.

              Dave
            • Seth Dillingham
              ... I think this is what Dave meant when he said he wouldn t touch it with a ten foot pole. We ve been using this code in this way in Frontier and Radio for a
              Message 6 of 20 , Nov 26, 2002
              • 0 Attachment
                Matt Mower wrote:

                >The solution is to modify html.refGlossary so that:
                >
                > return (string (user.html.glossary [name]))
                >
                >becomes
                >
                > if( typeOf( user.html.glossary[name] ) == scriptType ) {
                > return ( user.html.glossary[name]() )
                > } else {
                > return ( string( user.html.glossary[name] ) )
                > }
                >
                >This latter seems to be a pretty simple, stable change. Would it be
                >possible to fix it?
                >
                >
                I think this is what Dave meant when he said he wouldn't touch it with a
                ten foot pole. We've been using this code in this way in Frontier and
                Radio for a long, long time (since long before Radio). UserLand has no
                way of knowing what this would break in existing apps.

                Seth
              • Matt Mower
                ... be ... with a ... and ... no ... Hi Seth, I m a little puzzled; For any code to break due to the change I am suggesting it would need to depend upon
                Message 7 of 20 , Nov 26, 2002
                • 0 Attachment
                  --- In radio-dev@y..., Seth Dillingham <seth@m...> wrote:
                  > >This latter seems to be a pretty simple, stable change. Would it
                  be
                  > >possible to fix it?
                  > >
                  > >
                  > I think this is what Dave meant when he said he wouldn't touch it
                  with a
                  > ten foot pole. We've been using this code in this way in Frontier
                  and
                  > Radio for a long, long time (since long before Radio). UserLand has
                  no
                  > way of knowing what this would break in existing apps.
                  >

                  Hi Seth,

                  I'm a little puzzled; For any code to break due to the change I am
                  suggesting it would need to depend upon script objects in glossary
                  entries being evaluated not as scripts but as strings.

                  I can't think of any reason why someone would do this and unless they
                  are I don't understand what could be broken by the change.

                  Regards,

                  Matt
                • sdevore@mac.com
                  Matt, One thing that I did was to use the postItem callback at user.radio.callbacks and made my own version of the glossary item to do something else, mine
                  Message 8 of 20 , Nov 26, 2002
                  • 0 Attachment
                    Matt,
                    One thing that I did was to use the postItem callback at
                    user.radio.callbacks and made my own version of the glossary item to do
                    something else, mine uses a wrapper that looks for [[item]] rather then
                    "item" you could try a similar approach.

                    HTH

                    Sam D
                    On Tuesday, November 26, 2002, at 03:58 AM, Matt Mower wrote:

                    > Hi Dave,
                    >
                    > The reason I don't want to use a macro is that I want to leverage the
                    > ease of use of shortcuts, i.e. it is much easier for a user to remember
                    > to write:
                    >
                    > "^my topic" ( since they will be auto generated I chose "^" as
                    > a way of differentiating topic shortcuts )
                    >
                    > than:
                    >
                    > { liveTopicsTopicLink( "my topic" ) }
                    >
                    > Based on your comment I tried creating a shortcut with a macro in it
                    > using both "{ macro }" and "<% macro %>" syntaxes but they don't get
                    > interpolated. Am I doing that wrong?
                    >
                    > Is there some other way to do this?
                    >
                    > Thanks,
                    >
                    > matt
                    >
                    > -----Original Message-----
                    > From: Dave Winer [mailto:dave@...]
                    > Sent: 26 November 2002 00:16
                    > To: radio-dev@yahoogroups.com
                    > Subject: Re: [radio-dev] Dynamic shortcuts
                    >
                    >
                    > Probably, but why not use a macro?
                    >
                    >
                    >
                    >
                    > ------------------------ Yahoo! Groups Sponsor
                    > ---------------------~-->
                    > Get 128 Bit SSL Encryption!
                    > http://us.click.yahoo.com/CBxunD/vN2EAA/xGHJAA/nhFolB/TM
                    > ---------------------------------------------------------------------
                    > ~->
                    >
                    > To unsubscribe from this group, send an email to:
                    > radio-dev-unsubscribe@yahoogroups.com
                    >
                    >
                    >
                    > Your use of Yahoo! Groups is subject to
                    > http://docs.yahoo.com/info/terms/
                    >
                    >
                  • Dave Winer
                    Seth guessed wrong. I meant I d use a macro, not try to use some ancient arcane feature of glossaries from 1996. ... From: Matt Mower
                    Message 9 of 20 , Nov 26, 2002
                    • 0 Attachment
                      Seth guessed wrong. I meant I'd use a macro, not try to use some ancient
                      arcane feature of glossaries from 1996.


                      ----- Original Message -----
                      From: "Matt Mower" <mmower@...>
                      To: <radio-dev@yahoogroups.com>
                      Sent: Tuesday, November 26, 2002 8:13 AM
                      Subject: [radio-dev] Re: Dynamic shortcuts


                      > --- In radio-dev@y..., Seth Dillingham <seth@m...> wrote:
                      > > >This latter seems to be a pretty simple, stable change. Would it
                      > be
                      > > >possible to fix it?
                      > > >
                      > > >
                      > > I think this is what Dave meant when he said he wouldn't touch it
                      > with a
                      > > ten foot pole. We've been using this code in this way in Frontier
                      > and
                      > > Radio for a long, long time (since long before Radio). UserLand has
                      > no
                      > > way of knowing what this would break in existing apps.
                      > >
                      >
                      > Hi Seth,
                      >
                      > I'm a little puzzled; For any code to break due to the change I am
                      > suggesting it would need to depend upon script objects in glossary
                      > entries being evaluated not as scripts but as strings.
                      >
                      > I can't think of any reason why someone would do this and unless they
                      > are I don't understand what could be broken by the change.
                      >
                      > Regards,
                      >
                      > Matt
                      >
                      >
                      >
                      >
                      > To unsubscribe from this group, send an email to:
                      > radio-dev-unsubscribe@yahoogroups.com
                      >
                      >
                      >
                      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                      >
                      >
                    • Matt Mower
                      ... ancient ... Hi Dave, I just want to check what you mean when you say use a macro. Are you saying: (1) I tell my users to insert
                      Message 10 of 20 , Nov 26, 2002
                      • 0 Attachment
                        --- In radio-dev@y..., "Dave Winer" <dave@u...> wrote:
                        > Seth guessed wrong. I meant I'd use a macro, not try to use some
                        ancient
                        > arcane feature of glossaries from 1996.
                        >

                        Hi Dave,

                        I just want to check what you mean when you say use a macro.

                        Are you saying:

                        (1) I tell my users to insert <% someMacro( topicName ) %> into the
                        text of their weblog posts?

                        (2) Use a macro within a glossary entry (which doesn't seem to be
                        working)

                        (3) Something else.

                        If (2) or (3) can you give me another hint since I am struggling to
                        figure this out.

                        Thanks,

                        Matt
                      • Matt Mower
                        Hi Sam, ... to do ... then ... That s an interesting possibility. Did you do that because the glossary isn t working? Or were there other advantages (as
                        Message 11 of 20 , Nov 26, 2002
                        • 0 Attachment
                          Hi Sam,

                          --- In radio-dev@y..., sdevore@m... wrote:
                          > Matt,
                          > One thing that I did was to use the postItem callback at
                          > user.radio.callbacks and made my own version of the glossary item
                          to do
                          > something else, mine uses a wrapper that looks for [[item]] rather
                          then
                          > "item" you could try a similar approach.
                          >

                          That's an interesting possibility. Did you do that because the
                          glossary isn't working? Or were there other advantages (as well)?

                          Many thanks.

                          Matt
                        • sdevore@mac.com
                          Actually I did it before the shortcuts were introduced, because I wanted similar functionality to what I was used to with manila Sam D
                          Message 12 of 20 , Nov 26, 2002
                          • 0 Attachment
                            Actually I did it before the shortcuts were introduced, because I
                            wanted similar functionality to what I was used to with manila


                            Sam D
                            On Tuesday, November 26, 2002, at 10:41 AM, Matt Mower wrote:

                            > Hi Sam,
                            >
                            > --- In radio-dev@y..., sdevore@m... wrote:
                            >> Matt,
                            >> One thing that I did was to use the postItem callback at
                            >> user.radio.callbacks and made my own version of the glossary item
                            > to do
                            >> something else, mine uses a wrapper that looks for [[item]] rather
                            > then
                            >> "item" you could try a similar approach.
                            >>
                            >
                            > That's an interesting possibility. Did you do that because the
                            > glossary isn't working? Or were there other advantages (as well)?
                            >
                            > Many thanks.
                            >
                            > Matt
                            >
                            >
                            >
                            > ------------------------ Yahoo! Groups Sponsor
                            > ---------------------~-->
                            > Share the magic of Harry Potter with Yahoo! Messenger
                            > http://us.click.yahoo.com/4Q_cgB/JmBFAA/46VHAA/nhFolB/TM
                            > ---------------------------------------------------------------------
                            > ~->
                            >
                            > To unsubscribe from this group, send an email to:
                            > radio-dev-unsubscribe@yahoogroups.com
                            >
                            >
                            >
                            > Your use of Yahoo! Groups is subject to
                            > http://docs.yahoo.com/info/terms/
                            >
                            >
                          • Steven V.
                            ... I think I d be happy if static ones worked all the time :-) http://radio.userland.com/discuss/msgReader$20732 -S
                            Message 13 of 20 , Nov 27, 2002
                            • 0 Attachment
                              > Is there any way to make Radio shortcuts dynamic?

                              I think I'd be happy if static ones worked all the time :-)

                              http://radio.userland.com/discuss/msgReader$20732


                              -S
                            • Matt Mower
                              Hi Sam, Your approach is sounding better and better. Would you mind sharing the technique you use to make it work though? I ve been looking at the
                              Message 14 of 20 , Nov 27, 2002
                              • 0 Attachment
                                Hi Sam,

                                Your approach is sounding better and better. Would you mind sharing the
                                technique you use to make it work though? I've been looking at the
                                postItem/publishItem callbacks and I don't see how you modify the text
                                used during the rendering process...

                                Thanks,

                                matt

                                -----Original Message-----
                                From: sdevore@... [mailto:sdevore@...]
                                Sent: 26 November 2002 17:48
                                To: radio-dev@yahoogroups.com
                                Subject: Re: [radio-dev] Re: Dynamic shortcuts


                                Actually I did it before the shortcuts were introduced, because I
                                wanted similar functionality to what I was used to with manila
                              • Dave Winer
                                Matt, what s the method that Sam proposed? ... From: Matt Mower To: Sent: Wednesday, November 27, 2002
                                Message 15 of 20 , Nov 27, 2002
                                • 0 Attachment
                                  Matt, what's the method that Sam proposed?


                                  ----- Original Message -----
                                  From: "Matt Mower" <mmower@...>
                                  To: <radio-dev@yahoogroups.com>
                                  Sent: Wednesday, November 27, 2002 11:24 AM
                                  Subject: RE: [radio-dev] Re: Dynamic shortcuts


                                  > Hi Sam,
                                  >
                                  > Your approach is sounding better and better. Would you mind sharing the
                                  > technique you use to make it work though? I've been looking at the
                                  > postItem/publishItem callbacks and I don't see how you modify the text
                                  > used during the rendering process...
                                  >
                                  > Thanks,
                                  >
                                  > matt
                                  >
                                  > -----Original Message-----
                                  > From: sdevore@... [mailto:sdevore@...]
                                  > Sent: 26 November 2002 17:48
                                  > To: radio-dev@yahoogroups.com
                                  > Subject: Re: [radio-dev] Re: Dynamic shortcuts
                                  >
                                  >
                                  > Actually I did it before the shortcuts were introduced, because I
                                  > wanted similar functionality to what I was used to with manila
                                  >
                                  >
                                  >
                                  >
                                  > To unsubscribe from this group, send an email to:
                                  > radio-dev-unsubscribe@yahoogroups.com
                                  >
                                  >
                                  >
                                  > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                                  >
                                  >
                                • sdevore@mac.com
                                  Alright here is a bare bones callback, so in user.radio.callbacks.postItem I have a script called myFix like below on myfix (adrTable) { local (oldTarget =
                                  Message 16 of 20 , Nov 27, 2002
                                  • 0 Attachment
                                    Alright here is a bare bones callback, so in
                                    user.radio.callbacks.postItem I have a script called myFix like below

                                    on myfix (adrTable) {
                                    local (oldTarget = target.get());
                                    target.set (@adrTable^.text);
                                    local (s = wp.getText());
                                    s = string.replaceAll (s, "[[","<%c(\"");
                                    s = string.replaceAll (s, "]]","\")%>");
                                    wp.setText(s);
                                    target.set (oldTarget)}

                                    now once you have a string with the text of the posting you could do
                                    all sorts of things with it, you could use string.multipleReplaceAll
                                    (s, adrTable, flCaseSensitive, "[[", "]]")
                                    (http://docserver.userland.com/string/multipleReplaceAll ) to use a
                                    build table of possible replacements in the text, you could send the
                                    text through your own version of the glossary system (that has your
                                    fix) you could use the regex verbs like regex.split or regex.extract to
                                    get out things. So much, also if you add a line like
                                    temp.thisTable = adrTable^ you can see what other things you have
                                    access to. Callbacks are a really powerful feature if you can use them,

                                    Sam D
                                    On Wednesday, November 27, 2002, at 12:24 PM, Matt Mower wrote:

                                    > Hi Sam,
                                    >
                                    > Your approach is sounding better and better. Would you mind sharing
                                    > the
                                    > technique you use to make it work though? I've been looking at the
                                    > postItem/publishItem callbacks and I don't see how you modify the text
                                    > used during the rendering process...
                                    >
                                    > Thanks,
                                    >
                                    > matt
                                    >
                                    > -----Original Message-----
                                    > From: sdevore@... [mailto:sdevore@...]
                                    > Sent: 26 November 2002 17:48
                                    > To: radio-dev@yahoogroups.com
                                    > Subject: Re: [radio-dev] Re: Dynamic shortcuts
                                    >
                                    >
                                    > Actually I did it before the shortcuts were introduced, because I
                                    > wanted similar functionality to what I was used to with manila
                                    >
                                    >
                                    >
                                    > ------------------------ Yahoo! Groups Sponsor
                                    > ---------------------~-->
                                    > Get 128 Bit SSL Encryption!
                                    > http://us.click.yahoo.com/CBxunD/vN2EAA/xGHJAA/nhFolB/TM
                                    > ---------------------------------------------------------------------
                                    > ~->
                                    >
                                    > To unsubscribe from this group, send an email to:
                                    > radio-dev-unsubscribe@yahoogroups.com
                                    >
                                    >
                                    >
                                    > Your use of Yahoo! Groups is subject to
                                    > http://docs.yahoo.com/info/terms/
                                    >
                                    >
                                  • Matt Mower
                                    ... below ... Hi Sam, Ah, I misunderstood you. I was hoping that you had a way of affecting the text being used to render the post rather than modifying the
                                    Message 17 of 20 , Nov 27, 2002
                                    • 0 Attachment
                                      --- In radio-dev@y..., sdevore@m... wrote:
                                      > Alright here is a bare bones callback, so in
                                      > user.radio.callbacks.postItem I have a script called myFix like
                                      below
                                      >

                                      Hi Sam,

                                      Ah, I misunderstood you. I was hoping that you had a way of
                                      affecting the text being used to render the post rather than
                                      modifying the post itself.

                                      This won't work for me as the replacement text is (a) different for
                                      each category and (b) open to change.

                                      Thanks anyway.

                                      Regards,

                                      Matt
                                    • Emmanuel. M. Decarie
                                      [Sorry for the previous post ( Re: [radio-dev] Digest Number 571 ), I forgot to add the proper subject] ... Hello Matt, There is BIG shortcoming in Radio for
                                      Message 18 of 20 , Nov 29, 2002
                                      • 0 Attachment
                                        [Sorry for the previous post (" Re: [radio-dev] Digest Number 571"),
                                        I forgot to add the proper subject]

                                        >Date: Wed, 27 Nov 2002 22:34:54 -0000
                                        > From: "Matt Mower" <mmower@...>
                                        >Subject: Re: Dynamic shortcuts
                                        >
                                        >This won't work for me as the replacement text is (a) different for
                                        >each category and (b) open to change.

                                        Hello Matt,

                                        There is BIG shortcoming in Radio for filtering text and I don't see
                                        any fixes coming. I wrote about it at great length on the dev list.

                                        Essentially, user.radio.callbacks.upstreamGetUpstreamText is broken,
                                        so you are in a catch 22 situation, you can get the text before it
                                        get transformed by radio.upstream.getUpstreamText from this callback,
                                        but you won't be able after getting the text to transform it with
                                        radio.upstream.getUpstreamText.

                                        http://groups.yahoo.com/group/radio-dev/message/7034

                                        Anyway, for your particular problem, what I'll do is to write a
                                        customdriver at user.radio.drivers. From there its easy to filter
                                        text before anything get upstreamed, and its easy also to use
                                        radio.upstream.getUpstreamText to transform the text once you had
                                        made your mods on it.

                                        HTH

                                        Cheers
                                        -Emmanuel
                                        --
                                        ______________________________________________________________________
                                        Emmanuel Décarie / Programmation pour le Web - Programming for the Web
                                        Frontier - Perl - PHP - Javascript - XML <http://scriptdigital.com/>
                                      • Matt Mower
                                        Hi Emmanuel, Thanks for the message. I wasn t aware of the getUpstreamText call-back but you say that doesn t work either? It looks like this whole aspect of
                                        Message 19 of 20 , Nov 30, 2002
                                        • 0 Attachment
                                          Hi Emmanuel,

                                          Thanks for the message. I wasn't aware of the getUpstreamText call-back
                                          but you say that doesn't work either? It looks like this whole aspect
                                          of Radio is in need of some TLC.

                                          Writing an upstream driver is a possibility but, as I understand it, I
                                          would have to write a customised driver for each built-in driver? I'm
                                          also not sure what happens if another user already has a customised
                                          driver. This seems problematic.

                                          All things considered my inclination is to just be done with it and fix
                                          the html.refGlossary() script.

                                          Regards,

                                          matt

                                          -----Original Message-----
                                          From: Emmanuel. M. Decarie [mailto:emm@...]
                                          Sent: 29 November 2002 14:08
                                          To: radio-dev@yahoogroups.com
                                          Subject: [radio-dev] Re: Dynamic shortcuts


                                          There is BIG shortcoming in Radio for filtering text and I don't see
                                          any fixes coming. I wrote about it at great length on the dev list.

                                          Essentially, user.radio.callbacks.upstreamGetUpstreamText is broken,
                                          so you are in a catch 22 situation, you can get the text before it
                                          get transformed by radio.upstream.getUpstreamText from this callback,
                                          but you won't be able after getting the text to transform it with
                                          radio.upstream.getUpstreamText.

                                          http://groups.yahoo.com/group/radio-dev/message/7034

                                          Anyway, for your particular problem, what I'll do is to write a
                                          customdriver at user.radio.drivers. From there its easy to filter
                                          text before anything get upstreamed, and its easy also to use
                                          radio.upstream.getUpstreamText to transform the text once you had
                                          made your mods on it.
                                        • Emmanuel. M. Decarie
                                          Hello Matt, ... Not exactly. You could still use this callback with a simple workaround (as I said here
                                          Message 20 of 20 , Nov 30, 2002
                                          • 0 Attachment
                                            Hello Matt,

                                            >From: "Matt Mower" <mmower@...>
                                            >
                                            >Hi Emmanuel,
                                            >
                                            >Thanks for the message. I wasn't aware of the getUpstreamText call-back
                                            >but you say that doesn't work either?

                                            Not exactly. You could still use this callback with a simple
                                            workaround (as I said here
                                            <http://groups.yahoo.com/group/radio-dev/message/7034>). Basically,
                                            you use user.radio.callbacks.upstreamGetUpstreamText to get the text
                                            before it get processed, do your things on it, and then use a copy of
                                            radio.upstream.getUpstreamText that it hacked in such a way that it
                                            don't call itself.

                                            > It looks like this whole aspect
                                            >of Radio is in need of some TLC.

                                            TLC = tender loving care? Who doesn't need TLC? :) But fundamentally,
                                            I agree with you.

                                            >Writing an upstream driver is a possibility but, as I understand it, I
                                            >would have to write a customised driver for each built-in driver? I'm
                                            >also not sure what happens if another user already has a customised
                                            >driver. This seems problematic.

                                            This I'm not sure. I'll have to check the code again. Maybe UserLand
                                            will chime in. The whole process (what was called "the walk" in
                                            mainResponder in Frontier) that upstream a file is not documented as
                                            far as I know.

                                            From the UserLand doc:

                                            > When looking for a driver, we start in user.radio.drivers.upstream,
                                            >allowing the user to override or extend any UserLand-supplied
                                            >driver. Then we look in radio.upstream.builtinDrivers.
                                            >
                                            >The driver table name must correspond to the type attribute value in
                                            >#upstream.xml. For example, in this screen shot, the driver that's
                                            >called would either be at
                                            >user.radio.drivers.upstream.xmlStorageSystem or
                                            >radio.upstream.builtinDrivers.xmlStorageSystem. They type attribute
                                            >is the key that determines which driver gets control when a file
                                            >under its control is upstreamed.
                                            <http://radio.userland.com/upstreamingDriverArchitecture>


                                            Looking at the code, it seems that Radio will pick up the first
                                            driver of type 'type' that it found at user.radio.drivers.upstream
                                            and will use it.

                                            From my understanding, I think the main routine for upstreaming is at
                                            radio.upstream.uploadChangedFiles. This routine use
                                            radio.upstream.findDriver to set the address of the driver.
                                            radio.upstream.findDriver is a little bit tricky and it took me a
                                            couple of minutes to understand that it return two values, true if
                                            it find a driver and the address of the driver.

                                            Now, I must say that I'm really not sure of this, but I think that
                                            currently, you can have only one driver of type 'type' at
                                            user.radio.drivers.upstream (i.e. can have 2 drivers of type 'ftp'
                                            for example).

                                            >All things considered my inclination is to just be done with it and fix
                                            >the html.refGlossary() script.

                                            Agreed, but I'm sure that you'll have to revisit this whole issue
                                            inevitably for future projects.

                                            Cheers
                                            -Emmanuel


                                            --
                                            ______________________________________________________________________
                                            Emmanuel Décarie / Programmation pour le Web - Programming for the Web
                                            Frontier - Perl - PHP - Javascript - XML <http://scriptdigital.com/>
                                          Your message has been successfully submitted and would be delivered to recipients shortly.