Topic
  • 3 replies
  • Latest Post - ‏2011-04-06T08:48:17Z by HermannSW
HermannSW
HermannSW
5 Posts

Pinned topic How to get the developerWorks Forum {code}...{code} section in my Blog?

‏2011-02-02T15:05:30Z |
I am a long time poster on DataPower developerWorks Forum.
 
And I really like to use {code}...{code} sections there.
 
I "hijacked" the code sections from developerWorks Forum:
  • see eg. my latest posting
  • I stored Forum's style.css
  • then edited it to have absolute paths for the background images (see A)
  • then UPLOADED it
  • then copy in {code} template (see B) in html mode
  • then create a dummy posting in Forum
  • enter a {code}...{code} section there
  • preview
  • mark the code section content and do "preview selection"
  • copy this into the blog posting.
 
This works for me -- but I would REALLY like to have {code}...{code} sections as a normal tool in blog editing toolbar!
Any chance that this might be available sometime?
Do I miss an existing blog functionality already available?
 
Thanks in advance.
 
(A)
1303c1303
<     background : url(../images/quote-background-1.gif);
---
>     background : url(/developerworks/forums/images/quote-background-1.gif);
 
(B)
<link href="https://www.ibm.com/developerworks/mydeveloperworks/blogs/HermannSW/resource/BLOGS_UPLOADED_IMAGES/style.css"
  rel="stylesheet" title="Forum Styles" type="text/css" />
<pre class="jive-pre"><code class="CODE.jive-xml">
 
</code></pre>
 
Hermann.
Updated on 2011-04-06T08:48:17Z at 2011-04-06T08:48:17Z by HermannSW
  • HermannSW
    HermannSW
    5 Posts

    Re: How to get the developerWorks Forum {code}...{code} section in my Blog?

    ‏2011-03-15T13:37:48Z  
    Hi,
     
    I now have used above described hack 23 times to get in {code}...{code} sections into my blog entries.
     
    Any chance that we get  {code}...{code} sections as feature (not needing above hack anymore)?
     
    Any feedback is welcome.
     
    Hermann.
  • JayAllen
    JayAllen
    23 Posts

    Re: How to get the developerWorks Forum {code}...{code} section in my Blog?

    ‏2011-04-05T20:27:27Z  
    • HermannSW
    • ‏2011-03-15T13:37:48Z
    Hi,
     
    I now have used above described hack 23 times to get in {code}...{code} sections into my blog entries.
     
    Any chance that we get  {code}...{code} sections as feature (not needing above hack anymore)?
     
    Any feedback is welcome.
     
    Hermann.
     Hey Hermann,
     
    That's a really clever use of the stylesheet to get code highlighting in a blog entry.  We're impressed.
     
    As far as enabling {code} blocks in the blogs there aren't any easy hooks in the editor or blog renderer to enable this.  We will pass it on to Lotus and get their take on it and get back to you.
     
    Thanks,
    Jay
  • HermannSW
    HermannSW
    5 Posts

    Re: How to get the developerWorks Forum {code}...{code} section in my Blog?

    ‏2011-04-06T08:48:17Z  
    • JayAllen
    • ‏2011-04-05T20:27:27Z
     Hey Hermann,
     
    That's a really clever use of the stylesheet to get code highlighting in a blog entry.  We're impressed.
     
    As far as enabling {code} blocks in the blogs there aren't any easy hooks in the editor or blog renderer to enable this.  We will pass it on to Lotus and get their take on it and get back to you.
     
    Thanks,
    Jay
     
    Thanks Jay,
     
    I  am waiting for the (hopefully positive) response.
     
    I tried the "Quote" mechanism available in this (message board) blog.
    (Why is it available here and not in developerWorks Blog?)
     
    But it looks not that nice because indentation is lost.
    See my latest posting in developerWorks Blog with code sections:
     
    And copare to this:
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    >
    <xsl:output omit-xml-declaration="yes" />
     
    <xsl:template match="/">
    <nodes>
    <xsl:value-of select="count(//node())"/>
    </nodes>
    </xsl:template>

    </xsl:stylesheet>
     
    Hermann.