SearchMonkey > Start Overview > Discussion

Discussion - Show the number of comments and thread date for discussions

Example

Description

Display blog or forum information directly in Yahoo! Search. Add code to indicate to Yahoo! that a discussion exists on your page, and when we next crawl your site, we'll take care of the rest. From your markup, we’ll be able to extract structured data from your site and render it automatically in an enhanced result in search results.

Details

  • Types of content permitted: blog posts, forums, question and answer sessions, and other forms of discussion.
  • How soon after I add my markup will I see my enhanced result appear? Assuming your markup is correct, your enhanced result will appear after Yahoo! recrawls your page; this can take between a few days and a few weeks depending on your site.

Get Started

1. Add code / markup to your site

Copy this code and replace the example text with your data to see enhanced discussion information in Yahoo! Search.

  • Use RDFa markup to embed discussion metadata directly in your markup. You can provide a post date, the post content, the author, and more.
  • Use hatom markup for an alternative way to embed discussion metadata.
  • Use DataRSS XML to send your data to Yahoo! privately, using a feed. Once you have constructed your DataRSS feed, you must submit the feed to Yahoo!.

RDFa

Example 1

<div typeof="sioc:Forum"
  xmlns:sioc="http://rdfs.org/sioc/ns#"
  xmlns:dc="http://purl.org/dc/terms/"
>
    <div rel="sioc:container_of">
      <div typeof="sioc:Post">
      <h1 property="dc:title>">A Short Blog Post</h1>
        <div rel="sioc:has_container" />
          <p>This... is... your blog post song! It isn't very long!</p>
          <p>Published <span property="dc:created dc:date">2008-07-19</span></p>
      </div>
    </div>
</div>

This metadata will be available in SearchMonkey and Yahoo! Search BOSS for further use. For more information, refer to the RDFa specification or the RDFa wiki.

Example 2

    <div about="http://developer.yahoo.net/blog/" typeof="sioc:Forum"
  xmlns:sioc="http://rdfs.org/sioc/ns#"
  xmlns:dc="http://purl.org/dc/terms/"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  xmlns:vcard="http://www.w3.org/2006/vcard/ns#"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
  xmlns:media="http://search.yahoo.com/searchmonkey/media/"
  xmlns:foaf="http://xmlns.com/foaf/0.1/">
    <h1 property="dc:title">Yahoo! Developer Network blog</h1>
    <div rel="rdfs:seeAlso media:image"
        resource="http://us.i1.yimg.com/us.yimg.com/i/us/nt/ma/ma_devnet_1.gif"/>

    <div rel="sioc:container_of">
      <div typeof="sioc:Post">
        <span property="dc:title">New SearchMonkey Enhanced Result Template</span>
        <span property="dc:created dc:date" datatype="xsd:date">2008-07-19</span>
        <div rel="sioc:has_container" resource="http://developer.yahoo.net/blog/"/>

        <div rel="sioc:topic">
            <span property="rdfs:label">Entertainment &amp; Music > Music > Rap and Hip-Hop </span>
        </div>
        <div rel="sioc:topic" resource="http://dbpedia.org/resource/Semantic_Web"/>

        <span property="sioc:content">
          We are testing a new template design for Enhanced Result applications. This new template contains two key design improvements....
        </span>

        <div rel="sioc:has_creator dc:creator foaf:maker">
          <div typeof="sioc:User foaf:Person vcard:VCard">
            <span property="vcard:fn foaf:name">Jane Smith </span> Yahoo! SearchMonkey Team
            <div rel="vcard:photo foaf:depiction media:image"
                resource="http://www.example.org/image/janesmith.jpg"/>
          </div>
        </div>

        <div rel="sioc:has_reply" resource="http://www.example.org/reply/"/>
        <div rel="sioc:has_reply">
          <div typeof="sioc:Post">
              <span property="sioc:content"> Excellent new feature! </span>
          </div>
        </div>
        <span property="sioc:num_replies">2</span>
      </div>
    </div>
</div>

Microformats

Example 1

<div class="hfeed">
 <div class="hentry">
   <h1 class="entry-title">New SearchMonkey Enhanced Result Template</h1>
   <div class="entry-content">
       We are testing a new template design for Enhanced Result applications. This new template contains two key design improvements....
   </div>
   Tags: <a href="http://dbpedia.org/resource/Semantic_Web" rel="tag">semantic web</a>
   Author:  <span class="vcard author fn">Jane Smith</span> Yahoo! SearchMonkey Team
   Last updated <abbr class="updated" title="2008-07-19T04:26:18Z">4:26am, July 19, 2008</abbr>
 </div>
</div>

This markup not only displays the post date, but includes tags, the author name, and more.

DataRSS XML

Example 1

<y:adjunct xmlns:y="http://search.yahoo.com/datarss/" version="1.0" name="YOURID">
  <y:item rel="dc:subject">
    <y:type typeof="sioc:Forum">
      <y:meta property="dc:title">Yahoo! Developer Network blog</y:meta>
      <y:item rel="rdfs:seeAlso media:image"
          resource="http://us.i1.yimg.com/us.yimg.com/i/us/nt/ma/ma_devnet_1.gif"/>

      <y:item rel="sioc:container_of">
        <y:type typeof="sioc:Post">
          <y:meta property="dc:title">New SearchMonkey Enhanced Result Template</y:meta>
          <y:meta property="dc:created dc:date" datatype="xsd:date">2008-07-19</y:meta>
          <y:item rel="sioc:has_container" resource="http://developer.yahoo.net/blog/"/>

          <y:item rel="sioc:topic">
              <y:meta property="rdfs:label">Entertainment & Music > Music > Rap and Hip-Hop </y:meta>
          </y:item>
          <y:item rel="sioc:topic" resource="http://dbpedia.org/resource/Semantic_Web"/>

          <y:meta property="sioc:content">
            We are testing a new template design for Enhanced Result applications. This new template contains two key design improvements....
          </y:meta>

          <y:item rel="sioc:has_creator dc:creator foaf:maker">
            <y:type typeof="sioc:User foaf:Person vcard:VCard">
              <y:meta property="vcard:fn foaf:name">Jane Smith </y:meta>
              <y:item rel="vcard:photo foaf:depiction media:image"
                  resource="http://www.example.org/image/janesmith.jpg"/>
            </y:type>
          </y:item>

          <y:item rel="sioc:has_reply" resource="http://www.example.org/reply/"/>
          <y:item rel="sioc:has_reply">
            <y:type typeof="sioc:Post">
                <y:meta property="sioc:content"> Excellent new feature! </y:meta>
            </y:type>
          </y:item>
          <y:meta property="sioc:num_replies">2</y:meta>
        </y:type>
      </y:item>
    </y:type>
  </y:item>
</y:adjunct>

This markup would be included in a DataRSS feed.

2. Validate your markup

Test your markup to make sure your enhanced result will appear.

3. Wait until we recrawl your site for your enhanced result to appear on the search results page

This can take up to a few weeks depending on your site.

Copyright © 2009 Yahoo! Inc. All rights reserved. Copyright | Privacy Policy | Terms of Service

Help us continue to improve the Yahoo! Developer Network: Send Your Suggestions