Posts for December 2010

Seth contacted me a few days ago about a problem he was having with the SyntaxHighlighter shipped with the standard FlatPress installation.

He had noticed the code fragments on this site were being correctly decorated, but could not get those on his site to appear correctly.

After several emails it transpired he was marking his code blocks with [code language=php] instead of [code=php]

A complete list of languages supported by SyntaxHighlighter follows...

  • c
  • cpp
  • c++
  • css
  • c#
  • c-sharp
  • csharp
  • vb
  • delphi
  • pascal
  • js
  • jscript
  • javascript
  • php
  • py
  • python
  • ruby
  • sql
  • xml
  • xhtml
  • xslt
  • html
  • xhtml

    Thanks to Detlef for picking up an error in the JavaScript generated by the GoogleSearchBox plugin.

    The plugin uses JavaScript to modify the data posted by the search form into a format acceptable to Google. To try and be a little more DOM compliant the code has been updated to access the "searchForm" using document.getElementsByName

    function googleize()
        if (document.getElementsByName("searchForm")[0].action == \'';
        $content .= $destn;             
        $content .= '\')
                var arr = new Array(); 

      When attempting to connect to OpenLDAP running on Ubuntu 10.4 (Lucid Lynx) it is necessary to explicitly set the ProtocolVersion of the SessionOptions used by the System.DirectoryServices.Protocols.LdapConnection to 3 otherwise a binding error is generated.

      Another little wrinkle involves the use of SSL connections over port 636. It is not enough to just set the port number in the LdapDirectoryIdentifier parameter, it is also necessary to to set the SecureSocketLayer property to true within the SessionOptions.

      An example follows...

      AuthType authType = AuthType.Basic;
      if (!string.IsNullOrEmpty((AuthenticationType)))
          authType = (AuthType)Enum.Parse(typeof(AuthType), AuthenticationType, true);
      LdapConnection connection = new LdapConnection(new LdapDirectoryIdentifier(LdapServer), new NetworkCredential(UserName, Password), authType);
      connection.SessionOptions.ProtocolVersion = 3;
      connection.SessionOptions.SecureSocketLayer = UseSSL;