Inside Paulo Abrantes' head
[ start | index | login or register ]
start > 2007-03-06 > 1

SnipSnap Developing: Fresh Macros

Created by pabrantes. Last edited by pabrantes, one year and 258 days ago. Viewed 1,214 times. #6
[diff] [history] [edit] [rdf]
labels
attachments
TagometerMacro.jar (2564)
YoutubeMacro.jar (2460)

SnipSnap Developing: Fresh Macros

Most of the blogs - specially the widely adopted wordpress - are filled with macros that support nowadays common services, like del.icio.us, youtube, wikipedia, digg, etc.

I felt that snipsnap also deserved such macros, I felt that my blog deserved such macros. So I'm currently releasing two macros:

Youtube Macro

There's not much to say about the youtube macro, mostly it takes the ID of a youtube video and renderers the embedded object. To know how to get the ID let's examine an youtube URL. Here's how they look like:

>>http://www.youtube.com/watch?v=ID

So for example, if I wanted to show the Super Monk video - with the URL: >>http://www.youtube.com/watch?v=_U4oO76ml28. I would type the following command:

{youtube:id=_U4oO76ml28}

Result:

Tagometer

Examples of tagometer can already be seen in the Domain Driven Design posts, such as >>Software Developing: Domain Driven Design looking at Persistence.

There are also two ways of displaying tagometer, inline or block, that can be said to the macro via the parameter inline, which can be true or false (defaults to false).

So here is an example of tagometer:

{tagometer}

Result:

Any suggestions about these macros or new ideas for others are always welcomed.

Icon-Comment AdaHsu, one year and 235 days ago. Icon-Permalink

Hi,

I am Ada, and I see >>your comment at my blog.

Sorry for my poor english, but I'll try to translate that snip's key point into english.

That snip said I wrote 4 macros for snipsnap but you had already done that before. We do the same things, some different and some similar.

For Google Adsense macro, You make a complete and complex setting for it, but I just copy the google's code into macro because I do not change my blog theme frequently, so I have 3 macros for Google Adsense. And finally I give up the macro named "GoogleContentMacro" because I put the google's code into template file "snip.jsp" to sure every page show the adsense.

For YouTube macro, we also named the parameter with "id", I use this parameter name just because I don't want to type a longer name: "videoId". In this macro I have 2 extra parameters for video's width and height, but I don't know YouTube agree this or not.

At last, I find 2 important information in your blog: >>Integrating JCaptcha With SnipSnap and >>SearchMacro hack, especially the 1st snip can prevent spam bot, thank you.

Icon-Comment pabrantes, one year and 235 days ago. Icon-Permalink

Hello Ada, thank you for the reply!
Don't worry about your english, it's not poor I can understand you perfectly :)

Having the google's code in the snip.jsp is a solution, I've done something similar with the snap preview (the image preview on external links), but I've putted it on main.jsp as you can read in >>SnipSnap Developing: Improving User Experience.

I still have plenty of modifications I wish to make to snipsnap, maybe if you're interested we could discuss them.

It's good to "meet" someone else working on snipsnap!

Icon-Comment AdaHsu, one year and 235 days ago. Icon-Permalink

Maybe we or other snipsnap users can use Google Code Hosting for developing SnipSnap's macro project.

Yes, I extend radeox's filter for emotions/smiles, you are right !

Icon-Comment pabrantes, one year and 234 days ago. Icon-Permalink

Maybe we or other snipsnap users can use Google Code Hosting for developing SnipSnap's macro project.
AdaHsu

That sounds good to me, I've been thinking in forking the project. And this oportunity seems interesting!
Regarding the control version, what about if I first setup an SVN on my domain at, for example, svn.pabrantes.net (would of course give you access to it, along with another friend that is interested working in such fork) and then if we really are active move on to Google Code Hosting or sourceforge.

Please login to www.pabrantes.net.
Who am I?
paulo-roca2My name is Paulo Abrantes AKA pabrantes and I'm a software developer. I'm currently employed at >>CIIST working as a Java developer in >>FenixEDU.

This blog is mostly about Java programming, domain driven design and snipsnap bliki developing. Everything written in this blog is my personal opinion and it may not reflect the opinions of my employer and co-workers.


Blog subscription
subscribe by rss subscribe by email

Links
>> Home
>> Paulo's Profile
>> Post History
>> Add to Technorati Favorites
>> Paulo's Photo Gallery
>> WishList
>> Posting without Login

Search Blog
Fellow Bloggers

Recent Posts

Java Programming: Bytecode Injection
Intermission: Sorry For Downtime
Software Developing: Studying The Bliki Domain Model
SnipSnap Developing: Trying to settle a roadmap
System Administration: Load Balancing with Apache
Blogging: Two years have passed
Software Developing: The SnipSnap Saga
Java Programming: Getting your code spicy with Groovy
Software Developing: Fluent Interfaces
Software Developing: Implementing a ShoutBox on SnipsSnip
Software Developing: SnipSnap, SnipIt and SnipSnip
Java Programming: Proxies and Access Control
Java Programming: Proxies and References
Java Programming: References' Package
YALM: Yet Another Layout Modification

For older posts, please refer to post-history for a complete Post History

Logged in Users: (0)
… and 3 Guests.
This is a modified version of snipsnap.org created by >>Paulo Abrantes