Hello all, I've been busy all day again revamping my journal with new features. And, believe it or not, I have more fixes and more problems.
1) Somehow, somewhere, something fell over the Linklist object not
having the each method. So I performed this fix:
Index: lib/hobix/linklist.rb
===================================================================
--- lib/hobix/linklist.rb (revision 138)
+++ lib/hobix/linklist.rb (working copy)
@@ -59,6 +59,11 @@
)
end
+ # Adds support for enumeration.
+ def each
+ @links.each { |title, url| yield title, url }
+ end
+
# LinkLists currently output as YAML type family
# !hobix.com,2004/linklist.
yaml_type "tag:hobix.com,2004:linklist"
2) The recent comments plugin displays nothing if there are no comments.
This looks odd. A possible fix:
Index: lib/hobix/plugin/recent_comments.rb
===================================================================
--- lib/hobix/plugin/recent_comments.rb (revision 138)
+++ lib/hobix/plugin/recent_comments.rb (working copy)
@@ -60,9 +60,11 @@
<div class="sidebarBox">
<h2 class="sidebarTitle">Recent Comments</h2>
<ul>
- <% recent_comments( weblog, weblog.storage.find, RecentCommentsPlugin.num
).each do |link, title, auth, created| %>
+ <% reccomm = recent_comments( weblog, weblog.storage.find,
RecentCommentsPlugin.num) %>
+ <% reccomm.each do |link, title, auth, created| %>
<li><a href="<%= link %>"><%= title %></a> by <%= auth %> on <nobr><%=
created.strftime "%m/%d at %I:%M %P" %></nobr></li>
<% end %>
+ <%= "No comments!" if reccomm.empty? %>
</ul>
</div>
}
3) As I argued before.. the Quick formatter makes links to entries
through entry.link. However, it's the only template doing this! All
other templates (sections, tags, entry footers) use
weblog.expand_path to create nice and relative links. A patch:
Index: lib/hobix/out/quick.rb
===================================================================
--- lib/hobix/out/quick.rb (revision 138)
+++ lib/hobix/out/quick.rb (working copy)
@@ -228,7 +228,8 @@
%{ <div class="entryContent"><%= entry.content.to_html %></div> }
end
def entry_footer_erb
- %{ posted by <%= weblog.authors[entry.author]['name'] %> | <a href="<%=
entry.link %>"><%= entry.created.strftime( "%I:%M %p" ) %></a> }
+ %{ posted by <%= weblog.authors[entry.author]['name'] %> |
+ <a href="<%= weblog.expand_path entry.id %>"><%=
entry.created.strftime( "%I:%M %p" ) %></a> } end
def head_tags_erb; end
def css_erb; %{ @import "<%= weblog.expand_path "site.css" %>"; }; end
@@ -276,7 +277,7 @@
%{ <div class="entryContent">
<% if entry.respond_to? :summary and entry.summary %>
<%= entry.summary.to_html %>
- <p><a href="<%= entry.link %>">Continue to full post.</a></p>
+ <p><a href="<%= weblog.expand_path entry.id %>">Continue to full
post.</a></p>
<% else %>
<%= entry.content.to_html %>
<% end %>
@@ -289,7 +290,7 @@
"quick-archive"
end
def entry_erb
- %{ <h3 class="entryTitle"><a href="<%= entry.link %>"><%= entry.title
%></a></h3> }
+ %{ <h3 class="entryTitle"><a href="<%= weblog.expand_path entry.id
%>"><%= entry.title %></a></h3> }
end
def entries_erb
%{ <div id="archives">
4) It seems that hobix.cgi is created without the executable
permissions. For apache this will mean it can not run it, ever.
And it produces strange errors as well ;)
5) When using the publisher (/control/publisher) I get errors when trying to
access: /control/publisher/images, /control/publisher/skel and
/control/publisher/help. Does this just mean it isn't implemented yet?
6) I've overriden head_tags in the params of the require of
hobix/out/quick to include the following:
head_tags: |
<link rel="alternate" type="application/x.atom+xml" title="Atom 0.3
feed" href="/journal/index.atom"/>
<link rel="alternate" type="application/rss+xml" title="RSS 2.0 feed"
href="/journal/index.xml"/>
This way, feedreaders and browsers know there are feeds available.
However, this seems to clash with the use of comments. This plugin
also fiddles with head_tags and I either have my head tags or the
java script include stuff that the comments plugin adds, but not both
despite the fact that comments uses append_def. (?)
7) I have several posts in nested section since there were no tags at
the time of writing. So entries are located in foo/bar/SomePost and
bar/baz/OtherPost. But I can't find how I can either turn
implicit_tags off or split_implicit_tags on?
Regards,
Paul
--
Student @ Eindhoven | email: [EMAIL PROTECTED]
University of Technology, The Netherlands | JID: [EMAIL PROTECTED]
>>> Using the Power of Debian GNU/Linux <<< | GnuPG key ID: 0x50064181
signature.asc
Description: Digital signature
_______________________________________________ Hobix-is-the-way mailing list [email protected] http://rubyforge.org/mailman/listinfo/hobix-is-the-way
