Board index Plugins Enhancing the Freetag Plugin Look

Creating and modifying plugins.
User avatar
RobA
Regular
 
Posts: 317
Joined: Wed Apr 27, 2005 5:11 pm

Postby RobA » Wed Oct 08, 2008 7:36 pm

I have just started tagging my blog entries (ok, so I'm late to the game). I discovered this flash based movie to display tag clouds.

It was developed for WP initially, but has been ported to a number of other blog engines. The link I provides explains how to use it.

Would there be interest in (possibly me) enhancing the existing freetag plugin to support this as a display mechanism?

It looks quite simple... I think the only code changes would be in the serendipity_event_freetag::displayTags function to create the appropriate tag XML structure for the flash movie, and emit the framework code around it.

An additional option in each of the event and sidebar plugins ("Use flash cloud movie") would also be necessary...

It looks pretty straight forward.

-Rob A>
* My s9y blog:
* Rob A's (Im)Personal Blog
* http://www.silent9.com/blog

User avatar
Don Chambers
Regular
 
Posts: 3574
Joined: Mon Feb 13, 2006 3:40 am
Location: Chicago, IL, USA

Postby Don Chambers » Wed Oct 08, 2008 9:19 pm

Interesting... but a little too much for my personal tastes. I also wonder how it measures in SEO, accessibility, mobility, etc. Looks cool though!

User avatar
RobA
Regular
 
Posts: 317
Joined: Wed Apr 27, 2005 5:11 pm

Postby RobA » Wed Oct 08, 2008 10:04 pm

Digging a bit more, this implementation uses the SWFObject javascript which
is a small Javascript file used for embedding Adobe Flash content. The script can detect the Flash plug-in in all major web browsers (on Mac and PC) and is designed to make embedding Flash movies as easy as possible. It is also very search engine friendly, degrades gracefully, can be used in valid HTML and XHTML 1.0 documents*, and is forward compatible, so it should work for years to come.


the usage (in general) is:

Code: Select all
<script type="text/javascript" src="swfobject.js"></script>

<div id="tagcloudflash">
  This text is replaced by the Flash movie.
</div>

<script type="text/javascript">
        var so = new SWFObject("tagcloud.swf", "tagcloudflash", "365", "365", "7", "#292929");
        so.addVariable("tcolor", "0xEBAF00");
        so.addVariable("tagcloud", tags);
        so.write("tagcloudflash");
</script>


So the existing tag code would sit in the flashcontent div, and replace it if the browser supports java and flash, otherwise will leave the text...still looking at it...

-Rob A>
* My s9y blog:
* Rob A's (Im)Personal Blog
* http://www.silent9.com/blog

User avatar
RobA
Regular
 
Posts: 317
Joined: Wed Apr 27, 2005 5:11 pm

Postby RobA » Thu Oct 09, 2008 4:12 am

OK-

So I have hacked it in to by s9y distribution. If you visit the site without javascript or flash you should see the normal tag cloud in the sidebar, otherwise you will get the flash cloud.

http://ffaat.pointclark.net/blog

I just installed the freetag plugin and converted categories to tags, so it is not yet complete.

Also, I have hardcoded the size to fit my sidebar. The intent is to add the sizes for sidebar and plugin views, as well as a "use flash" option to the configuration. This means that right now if you click on a tag you get the tag cloud the same size in the main page....

P.S. where does that blue background box come from?

Comments appreciated...

-Rob A>
* My s9y blog:
* Rob A's (Im)Personal Blog
* http://www.silent9.com/blog

d_cee
Regular
 
Posts: 603
Joined: Wed Jan 18, 2006 7:32 pm
Location: UK

Postby d_cee » Thu Oct 09, 2008 10:45 am

Hi Rob

that looks really neat!

I noticed there's another flash based tag cloud on the authors site 'Tagnetic Poetry' any chance you could convert that one too? :-)

cheers

Dave

User avatar
garvinhicking
Core Developer
 
Posts: 29970
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany

Postby garvinhicking » Thu Oct 09, 2008 11:32 am

Hi!

Yay, that looks nice! I'd love to commit this to the spartacus repository once you're done :)

Many thanks,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
RobA
Regular
 
Posts: 317
Joined: Wed Apr 27, 2005 5:11 pm

Postby RobA » Thu Oct 09, 2008 1:47 pm

That's the plan, Garvin!

I'll probably just post up a diff here.

One thing, the SWFObject javascript is released under the MIT license. Is that acceptable to bundle?

-Rob A>
* My s9y blog:
* Rob A's (Im)Personal Blog
* http://www.silent9.com/blog

User avatar
RobA
Regular
 
Posts: 317
Joined: Wed Apr 27, 2005 5:11 pm

Postby RobA » Thu Oct 09, 2008 4:33 pm

It has been a while since I've written/modified a plugin....

Is there a colour picker widget available for the backend now?

-Rob A>
* My s9y blog:
* Rob A's (Im)Personal Blog
* http://www.silent9.com/blog

User avatar
blog.brockha.us
Regular
 
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany

Postby blog.brockha.us » Thu Oct 09, 2008 5:12 pm

Hmm.. Should I see it inside of the "(Im)Personal Tags" Area? There is a flash object but it displays just white here.. Firefox 3, Linux
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/

User avatar
judebert
Regular
 
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL

Postby judebert » Thu Oct 09, 2008 5:21 pm

There's no color-picker widget in the backend yet. I've considered it, but I want to be able to update a preview at the same time, which is more difficult. It's stupid, too; you'd think I wouldn't let the pursuit of perfection prevent me from implementing SOMETHING.

I'm also having problems with the tag cloud. Firefox 2, Linux. It seems blank.
Judebert
---
Website | Wishlist | PayPal

User avatar
RobA
Regular
 
Posts: 317
Joined: Wed Apr 27, 2005 5:11 pm

Postby RobA » Thu Oct 09, 2008 6:27 pm

My mistake. - I was playing with tag scaling and messed it up... Should be visible now, and should error out gracefully if flash < 7 is installed.

-Rob A>
* My s9y blog:
* Rob A's (Im)Personal Blog
* http://www.silent9.com/blog

User avatar
blog.brockha.us
Regular
 
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany

Postby blog.brockha.us » Thu Oct 09, 2008 7:19 pm

Ah! Nice! No it is visible with FF/Linux, too.
But if I click on a tag on the next page it vanishes leaving the normale text base cloud.
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/

User avatar
RobA
Regular
 
Posts: 317
Joined: Wed Apr 27, 2005 5:11 pm

Postby RobA » Thu Oct 23, 2008 7:59 pm

OK - take a look now-

I have added configuration parameters to both the sidebar plugin and the event plugin:

Code: Select all
Use Flash to display the tag cloug?      Yes No
Flash tag color (rrggbb)
Make flash tag cloud background transparent?    Yes No
Flash tag cloud background color (rrggbb)
Flash tag cloud width     
Flash tag cloud motion speed


So the width and colours can be set seperately for the sidebar and the "big" cloud.

I also hooked the bg colour and tag colour parameters into the css emit, rather than the hard coded values (though they can still be overridden with entries in the main css file.)

My main blog page (see sig) has the sidebar.

An example of the related tags is here: http://ffaat.pointclark.net/blog/plugin/tag/gimp

or the main tag cloud is just here:
http://ffaat.pointclark.net/blog/plugin/tag

The only oddness is that of the related tags has none, an empty box gets generated... I think this is a bug as the the code is checking for any empty array but not seeing it...

I'm working on a diff right now...

-Rob A>
* My s9y blog:
* Rob A's (Im)Personal Blog
* http://www.silent9.com/blog

User avatar
judebert
Regular
 
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL

Postby judebert » Fri Oct 24, 2008 2:57 pm

Wow. That's impressive. :shock:
Judebert
---
Website | Wishlist | PayPal

User avatar
RobA
Regular
 
Posts: 317
Joined: Wed Apr 27, 2005 5:11 pm

Postby RobA » Fri Oct 24, 2008 3:10 pm

Thanks!

Most of the work is not mine... just the bundling it into the s9y freetag plugin.

-Rob A>
* My s9y blog:
* Rob A's (Im)Personal Blog
* http://www.silent9.com/blog

Next


Return to Plugins

Who is online

Users browsing this forum: No registered users and 3 guests

cron