SnipSnap Developing: DiggIt Macro, SearchMacro hack and more 
Continuing the idea already presented in my past post
Snipsnap Developing: Fresh Macros another macro for a web 2.0 widely used service is now available.
This time it's
digg macro.
To anyone interested in using this macro be warned that it's also using one of the SEO hacks I've made in this case the optimization in the getTitle method for the class SnipImpl. More about this optimization can be read in
Snipsnap SEO Hacking: Post title optimization.
The macro will work even if the hack described above isn't present, although the submitted title - which can always be changed by the user who's digging - will be the "1", "2", etc instead of the actual post subject.
The Digg Macro is pretty simple and as a single parameter, which is if image should be displayed (defaults to
no).
Here's an example:
{diggIt:showImage=true}
would render:

Much better than just waiting for a reader to submit the story, no?
Still using the title optimization hack I've developed another feature. It's mostly an user experience feature and it's in the search interface, which was returning a bunch of '1' and '2' as the post names that would match the search criteria are now also formatted to the correct title.
The hack is simple and below I present the modification:
Original SearchMacro:
// Code Snipped
for (
int i = start; i < end; i++) {
SnipLink.appendLink(buffer, hits.doc(i).get(
"title"));
if (i < end - 1) {
buffer.append(
", ");
}
}
//Code Snipped
My modification:
for (int i = start; i < end; i++) {
String snipName = hits.doc(i).get("title");
Snip snip = space.load(snipName);
if(snip!=null) {
SnipLink.appendLink(writer, snip);
}
else {
//No snip with the name, Indexes are broken
//Still we present the link. Will give a 404 Though
SnipLink.appendLink(writer, snipName);
}
if (i < end - 1) {
writer.write(", ");
}
}
Now results that once where '1', '1','2' now are presented 'Domain Driven Design", 'SnipSnap developing', 'Java programming'.
More useful in the context of search in my opinion.
Finally, since I'm writing about SnipSnap I'll finish informing that Stephan - one of the main snipsnap developers - as announced on his blog that he's leaving snipsnap (more can be read in
Leaving SnipSnap 
).
SnipSnap development from the main team has been almost none in the last months (not to actually say year) and now with one of the main developers abandoning the project things don't seem very bright. Well, maybe it's time to renew the development team...
I myself have been thinking in maintaining a fork of the project with many of my tweaks. Now with Stephan leaving, maybe if I implement some of the goodies I'm planning, I'll go forward with the fork idea.
Definitely something to think about…