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

Re: Doing Technorati queries from Manila templates

Expand Messages
  • Lawrence Lee
    I ll post a feature request to our bug tracking database to add a pseudo macro for an encoded permalink URL. This is done in: manilaSuite.news.formatNewsItem
    Message 1 of 9 , Apr 22, 2004
    • 0 Attachment
      I'll post a feature request to our bug tracking database to add a
      pseudo macro for an encoded permalink URL.

      This is done in: manilaSuite.news.formatNewsItem

      Lawrence
    • Marc Barrot
      ... Thanks Lawrence. Tim, until the next update of Manila becomes available, try this: Open the Frontier application, then the manila.root window. Expand
      Message 2 of 9 , Apr 23, 2004
      • 0 Attachment
        --- In manila-dev@yahoogroups.com, "Lawrence Lee" <tomalak@t...> wrote:
        > This is done in: manilaSuite.news.formatNewsItem

        Thanks Lawrence.

        Tim, until the next update of Manila becomes available, try this:

        Open the Frontier application, then the manila.root window.

        Expand manilaSuite.news and open the formatNewsItem script.

        Locate and expand the //fullItemUrl bundle.

        Add the following line at the end of the bundle's content:

        s = string.replaceAll (s, "{encodedPermalinkUrl}", string.urlEncode
        (fullItemUrl), false)

        Save the script and close the Frontier app window.

        Now modify your items template to insert this:

        <a
        href="http://www.technorati.com/cosmos/search.html?url={encodedPermalinkUrl}"
        title="technorati cosmos link" target="_blank">cosmos</a>

        Let me know how it turns out (and remember the modification to
        manilaSuite.news.formatNewsItem will be wiped out the next time
        Userland publish an update to this script. Hopefully Jake will
        use 'encodedPermalinkUrl' for the name of the new pseudo macro :-)

        HTH

        Marc
      • Jake Savin
        I ve done a pretty thorough review of this thread, and came to the conclusion that the correct thing to do is indeed to add a new macro for the news item
        Message 3 of 9 , Apr 27, 2004
        • 0 Attachment
          I've done a pretty thorough review of this thread, and came to the
          conclusion that the correct thing to do is indeed to add a new macro
          for the news item template, encodedPermalinkUrl. This will make it
          possible to do the BoingBoing-like cosmos links, as well as other kinds
          of links.

          Normally I'd want to avoid introducing more macros when possible, but
          in this case a quirk in the way Manila handles macro rendering with
          news items made it impossible to avoid.

          A slight correction, and a couple of additions to Marc's suggestions:

          We're going to base encodedPermalinkUrl on
          manilaSuite.news.formatNewsItem's permlinkUrl (a local variable),
          rather than fullItemUrl (also a local), which was added in preparation
          for a feature which hasn't yet been released. ;-)

          The first addition is to manilaSuite.themes.getLegalMacrosForObject.
          Basically you can't add the encodedPermalinkUrl macro to the news item
          template until Manila understands that this is a legal (safe) macro --
          at the moment it will be neutered. getLegalMacrosForObject is where the
          change will be made to allow encodedPermalinkUrl to be added to your
          news item templates.

          The second addition is a new macro for the news item template, msgNum,
          which is analogous to Radio's itemNum. This will get you the message
          number of the discussion group message which contains a given news
          item. This may make other kinds of links possible, especially within
          the same site that contains the news item.

          I've got these changes in testing here, and will send a set of parts to
          the list for folks to try out, probably tomorrow. I'll also let the
          Weblogger.com guys know when it's safe for them to install the changes.

          -Jake

          On Apr 23, 2004, at 11:10 AM, Marc Barrot wrote:

          > --- In manila-dev@yahoogroups.com, "Lawrence Lee" <tomalak@t...> wrote:
          >> This is done in: manilaSuite.news.formatNewsItem
          >
          > Thanks Lawrence.
          >
          > Tim, until the next update of Manila becomes available, try this:
          >
          > Open the Frontier application, then the manila.root window.
          >
          > Expand manilaSuite.news and open the formatNewsItem script.
          >
          > Locate and expand the //fullItemUrl bundle.
          >
          > Add the following line at the end of the bundle's content:
          >
          > s = string.replaceAll (s, "{encodedPermalinkUrl}", string.urlEncode
          > (fullItemUrl), false)
          >
          > Save the script and close the Frontier app window.
          >
          > Now modify your items template to insert this:
          >
          > <a
          > href="http://www.technorati.com/cosmos/search.html?
          > url={encodedPermalinkUrl}"
          > title="technorati cosmos link" target="_blank">cosmos</a>
          >
          > Let me know how it turns out (and remember the modification to
          > manilaSuite.news.formatNewsItem will be wiped out the next time
          > Userland publish an update to this script. Hopefully Jake will
          > use 'encodedPermalinkUrl' for the name of the new pseudo macro :-)
          >
          > HTH
          >
          > Marc
          >
          >
          >
          > ------------------------ Yahoo! Groups Sponsor
          > ---------------------~-->
          > Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
          > Printer at MyInks.com. Free s/h on orders $50 or more to the US &
          > Canada.
          > http://www.c1tracking.com/l.asp?cid=5511
          > http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/IHFolB/TM
          > ---------------------------------------------------------------------
          > ~->
          >
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
          >



          .
        • Jake Savin
          I ve done a pretty thorough review of this thread, and came to the conclusion that the correct thing to do is indeed to add a new macro for the news item
          Message 4 of 9 , Apr 27, 2004
          • 0 Attachment
            I've done a pretty thorough review of this thread, and came to the
            conclusion that the correct thing to do is indeed to add a new macro
            for the news item template, encodedPermalinkUrl. This will make it
            possible to do the BoingBoing-like cosmos links, as well as other kinds
            of links.

            Normally I'd want to avoid introducing more macros when possible, but
            in this case a quirk in the way Manila handles macro rendering with
            news items made it impossible to avoid.

            A slight correction, and a couple of additions to Marc's suggestions:

            We're going to base encodedPermalinkUrl on
            manilaSuite.news.formatNewsItem's permlinkUrl (a local variable),
            rather than fullItemUrl (also a local), which was added in preparation
            for a feature which hasn't yet been released. ;-)

            The first addition is to manilaSuite.themes.getLegalMacrosForObject.
            Basically you can't add the encodedPermalinkUrl macro to the news item
            template until Manila understands that this is a legal (safe) macro --
            at the moment it will be neutered. getLegalMacrosForObject is where the
            change will be made to allow encodedPermalinkUrl to be added to your
            news item templates.

            The second addition is a new macro for the news item template, msgNum,
            which is analogous to Radio's itemNum. This will get you the message
            number of the discussion group message which contains a given news
            item. This may make other kinds of links possible, especially within
            the same site that contains the news item.

            I've got these changes in testing here, and will send a set of parts to
            the list for folks to try out, probably tomorrow. I'll also let the
            Weblogger.com guys know when it's safe for them to install the changes.

            -Jake

            On Apr 23, 2004, at 11:10 AM, Marc Barrot wrote:

            > --- In manila-dev@yahoogroups.com, "Lawrence Lee" <tomalak@t...> wrote:
            >> This is done in: manilaSuite.news.formatNewsItem
            >
            > Thanks Lawrence.
            >
            > Tim, until the next update of Manila becomes available, try this:
            >
            > Open the Frontier application, then the manila.root window.
            >
            > Expand manilaSuite.news and open the formatNewsItem script.
            >
            > Locate and expand the //fullItemUrl bundle.
            >
            > Add the following line at the end of the bundle's content:
            >
            > s = string.replaceAll (s, "{encodedPermalinkUrl}", string.urlEncode
            > (fullItemUrl), false)
            >
            > Save the script and close the Frontier app window.
            >
            > Now modify your items template to insert this:
            >
            > <a
            > href="http://www.technorati.com/cosmos/search.html?
            > url={encodedPermalinkUrl}"
            > title="technorati cosmos link" target="_blank">cosmos</a>
            >
            > Let me know how it turns out (and remember the modification to
            > manilaSuite.news.formatNewsItem will be wiped out the next time
            > Userland publish an update to this script. Hopefully Jake will
            > use 'encodedPermalinkUrl' for the name of the new pseudo macro :-)
            >
            > HTH
            >
            > Marc
            >
            >
            >
            > ------------------------ Yahoo! Groups Sponsor
            > ---------------------~-->
            > Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
            > Printer at MyInks.com. Free s/h on orders $50 or more to the US &
            > Canada.
            > http://www.c1tracking.com/l.asp?cid=5511
            > http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/IHFolB/TM
            > ---------------------------------------------------------------------
            > ~->
            >
            >
            > Yahoo! Groups Links
            >
            >
            >
            >
            >



            .
          • Marc Barrot
            ... Great! Thanks Jake. Now, if I can get my own copy of Manila to work (its setup is a little unusual), I may be able to create an activeRenderer for Manila
            Message 5 of 9 , Apr 28, 2004
            • 0 Attachment
              --- In manila-dev@yahoogroups.com, Jake Savin <jake@u...> wrote:
              > I've done a pretty thorough review of this thread, and came to the
              > conclusion that the correct thing to do is indeed to add a new macro
              > for the news item template, encodedPermalinkUrl.

              Great! Thanks Jake.

              Now, if I can get my own copy of Manila to work (its setup is a little
              unusual), I may be able to create an activeRenderer for Manila
              edition, with Jack and Georg's help. But that's another thread... :-)

              Cheers

              Marc
            Your message has been successfully submitted and would be delivered to recipients shortly.