« Return to Thread: MicroID: how to do it idiomatically?

MicroID: how to do it idiomatically?

by Adam Lindsay-2 :: Rate this Message:

Reply to Author | View in Thread

Hi,

The more I learn within Flux, the more I'm impressed, but the more I
confused I get as to the "right" way of doing things.

I'm trying to insert a MicroID into my CMS (oh look--you've written a
function already) and was wondering how to do it the "right" way.

For now, I've inserted it as a couple of lines within the <head> portion
of master.xsl:


<meta name="microid">
  <xsl:attribute name="content">
   <xsl:choose>
    <xsl:when test="contains($requestUri,'/index.html')">
<xsl:value-of select="php:functionString('bx_helpers_openid::microid',
          'me@...',
          concat(substring($webrootLang,0,string-length($webrootLang)),
            substring-before($requestUri,'/index.html')))"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="php:functionString('bx_helpers_openid::microid',
          'me@...',
          concat(substring($webrootLang,0,string-length($webrootLang)),
            $requestUri))"/>
</xsl:otherwise>
</xsl:choose>
  </xsl:attribute>
</meta>

(Pardon the tortured syntax to work around my failings in XPath. I'm out
of shape with it.)

The real question I have is: how do I programmatically get the email
address (of user #1 by default, I would presume)?

I guess the next question is, how does this get generalised for other
installations? Would it be worth a plugin? Should the computed path be
pre-charged (precomputed as a variable)? Is there an internal variable
that I'm not aware of that will give the appropriate URL for MicroID
purposes (no trailing slash or index.html)?

Thanks,
adam

--
bitflux-cms mailing list
bitflux-cms@...
http://lists.bitflux.ch/cgi-bin/listinfo/bitflux-cms

 « Return to Thread: MicroID: how to do it idiomatically?

LightInTheBox - Buy quality products at wholesale price!