Alan’s blog

July 26, 2009

fix for Wordpress shortcode bug

Filed under: academic, web development — alan @ 3:56 pm

I’m starting to use shortcodes heavily in WordPress1 as we are using it internally on the DEPtH project to coordinate our new TouchIT book.  There was minor bug which meant that HTML tags came out unbalanced (e.g. “<p></div></p”).

I’ve just been fixing it and posting a patch2, interestingly the bug was partly due to the fact that back-references in regular expressions count from the beginning of the regular expression, making it impossible to use them if the expression may be ‘glued’ into a larger one … lack of referential transparency!

For anyone having similar problems, full details and patch below (all WP and PHP techie stuff).

(more…)


  1. see section “using dynamic binding” in What’s wrong with dynamic binding? [back]
  2. TRAC ticket #10490 [back]

July 20, 2009

What’s wrong with dynamic binding?

Filed under: academic, web development — alan @ 8:14 pm

Dynamic scoping/binding of variables has a bad name, rather like GOTO and other remnants of the Bad Old Days before Structured Programming saved us all1.  But there are times when dynamic binding is useful and looking around it is very common in web scripting languages, event propagation, meta-level programming, and document styles.

So is it really so bad?

(more…)


  1. Strangely also the days when major advances in substance seemed to be more important than minor advances in nomenclature [back]

June 24, 2009

going SIOC (Semantically-Interlinked Online Communities)

Filed under: academic, web development — alan @ 2:31 pm

I’ve just SIOC enabled this blog using the SIOC Exporter for WordPress by Uldis Bojars.  Quoting from the SIOC project web site:

The SIOC initiative (Semantically-Interlinked Online Communities) aims to enable the integration of online community information. SIOC provides a Semantic Web ontology for representing rich data from the Social Web in RDF.

This means you can explore the blog as an RDF Graph including this post.

<sioc:Post rdf:about="http://www.alandix.com/blog/?p=176">
    <sioc:link rdf:resource="http://www.alandix.com/blog/?p=176"/>
    <sioc:has_container rdf:resource="http://www.alandix.com/blog/index.php?sioc_type=site#weblog"/>
    <dc:title>going SIOC (Semantically-Interlinked Online Communities)</dc:title>
    <sioc:has_creator>
        <sioc:User rdf:about="http://www.alandix.com/blog/author/admin/" rdfs:label="alan">
            <rdfs:seeAlso rdf:resource="http://www.alandix.com/blog/index.php?sioc_type=user&amp;sioc_id=1"/>
        </sioc:User>
    </sioc:has_creator>
...

May 13, 2007

tagging … I am not alone … or am I?

Filed under: academic, web development — alan @ 7:50 pm

I’ve noticed that I reuse very few tags … and thought I was just a poor tag-user. However, I read the other day a reference to a paper at the CSCW confernce last year; it reported that the average number of re-uses of a tag was just 1.311 . I thought this meant that most tags are never reused … I am not alone :-)

Having downloaded and read the paper it turns out that this is the average number of users who use a tag – that is most tags are used by only one person, in fact individuals reuse their own tags a lot more … so I am no-good tagger after all :-(

Incidentally, I use ultimate tag warrior plugin for wordpress and it seems OK. Only drawback is that if you want tags displayed with your post, they really get inserted into the post itself. This is not a problem for tags at the end, but would mess up an RSS feed if you like your tags above the post. I guess this is because wordpress does not have a handle for plugins to add things to display loops, so the only way to ensure the tags are displayed are to make them part of the post.

Also Nad sent me a link to a neat tag visualisation by Moritz Stefaner.


  1. Sen, S., Lam, S. K., Rashid, A., Cosley, D., Frankowski, D., Osterhouse, J., Harper, F. M., and Riedl, J. 2006. tagging, communities, vocabulary, evolution. In Proceedings of the 2006 20th Anniversary Conference on Computer Supported Cooperative Work {Banff, Alberta, Canada, November 04 – 08, 2006}. CSCW ‘06. ACM Press, New York, NY, 181-190. DOI= http://doi.acm.org/10.1145/1180875.1180904 [back]

January 1, 2007

footnotes

Filed under: web development — alan @ 8:08 pm

I’ve just installed the footnotes plugin in my Wordpress1 . It seems to work a dream.

I’ve used the following CSS:

ol.footnotes{
font-size:.9em;
color:#666666;
margin-top:0px;
}

ol.footnotes li{
list-style-type:decimal;
}


  1. makes footnotes like this [back]

Powered by WordPress