Excerpts from leon breedt's mail of  5 Aug 2005 (EDT):
> Folks, you may want to add a line to the start of your
> +entry_trackback+ template containing the control URL for average
> users to figure out where to send trackbacks to as well...I doubt
> people are going to view source on the page to check if there's an RDF
> comment and then copy & paste into their desktop clients..

Good point. I think this should be in by default, so I might just apply
the following to CVS:

diff -u -r1.1 trackbacks.rb
--- trackbacks.rb       3 Aug 2005 00:18:14 -0000       1.1
+++ trackbacks.rb       9 Aug 2005 19:38:49 -0000
@@ -31,12 +31,17 @@
     -->
   } end
 
+  def trackback_link_erb; %{
+    <%= trackback_link_for( weblog, entry ) %>
+  } end
+
   append_def :entry_erb, %{
     <% if entry and not defined? entries %><+ entry_trackback +><% end %>
   }
 
   def entry_trackback_erb; %{
     <a name="trackbacks"></a>
+    <p>You can also leave a <a href="<+ trackback_link +>">trackback</a>.</p>
     <div id="trackbacks">
     <% entry_id = entry.id %>
     <% trackbacks = weblog.storage.load_attached( entry_id, "trackbacks") 
rescue [] %>
@@ -56,8 +61,11 @@
   } end
 
   private
+  def trackback_link_for( weblog, entry )
+    '%s/control/trackback/%s' % [weblog.link, entry.id]
+  end
+
   def trackback_rdf_for( weblog, entry )
-    trackback_link = '%s/control/trackback/%s' % [weblog.link, entry.id]
+    trackback_link = trackback_link_for( weblog, entry )
     doc = REXML::Document.new
     rdf = doc.add_element( "rdf:RDF" )
     rdf.add_namespace( "rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; )

-- 
William <[EMAIL PROTECTED]>
_______________________________________________
Hobix-is-the-way mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/hobix-is-the-way

Reply via email to