Kottu Cleanup

Latest version of Kottu


Kottu has been in dire need of an upgrade and I did something. It’s now cleaner, if anything. The functionality isn’t improved as much as I like, but hopefully the focus is on the core functions now. The noticeable changes are a new theme, visible stats, and a few new plugins. Underneath the admin interface is more powerful and there’s a feature that serves a light version to mobile phones and PDAs. There are a few additions I’d like to make that I’m stuck on, so I’ll post my problems here. All in all I think it looks better, or at least less messy, and that’s something. The main features I’d like to add are more robust Ratings and Tags, but those each have their own technical limitations. This is a sort of scattered changelog, but I’d be more interested in comments people have.

Content

I basically check Kottu and read the first few posts and that’s about it. That is its core business and I tried not to mess with it that much. The main value is that Kottu should load fast and process new posts cleanly, and I think it still does that. The Drunkey Love theme is clean (er) code cause I haven’t messed with it as much and the FeedWordpress plugin is still chugging along, polling sites and gathering new posts. I actually archived the old posts and then dumped them, so instead of a couple 1000 posts there should be more like 100. That may translate into some speed gains, but dunno.

Ratings

There is a lot of stuff on Kottu and it’d be cool to see what is most popular, but I’ve had some problems converting that function into code. More specifically, finding plugins to do it for me cause I can’t code for crap. The main sticking point is a human one, simply that people don’t vote. It’s hard to get web users to do the simplest thing and I’ve given up on it long ago. However, I have implemented a voting system per Civil Unrest’s suggestion to see how it goes.

What I’d prefer is a click counter. That would count the number of times people click an article and make that the defacto vote. There are a few WordPress plugins (One from Ozh) but I can’t get them to work properly and they’re very hacky.

Tags

When Kottu began it had tags and a tagmap, however, I was categorizing all the posts by hand. That worked for a while, but it got to be a pain in the ass. If I went on a holiday or something there was a huge backlog and it got unmanageable. I’d like to implement community tagging for this but, again, the plugins in this field are immature.

Statistics

I’ve tenatively included a bar graph showing the number of daily posts at top right. I’d also like to add a display of how many visitors there are, cause it interests me at least.

Documentation

This is a must, the about page is hacky and the policy needs to be fleshed out. Also might be interesting to post how Kottu is built in case anyone wants to replicate it.

News

Kottu can incorporate a feedreader to pull in news sources (papers, Google News, LBO, TamilNet), but I’m still not sure whether that’s a feature or bloat.

Events

It’d be cool to have a more general even calendar than echo.lk but again, I’m not sure the environment is ready. Kottu requires no content upkeep, and there is no staff to gather events or whatever. I don’t even know if this is a useful feature and the soup of phone calls and code to make it happen hasn’t congealed into anything coherent yet.

I’m still working on it as the plugin ecosystem evolves, but any suggestions or code help would be appreciated.

RSS feed | Trackback URI

22 Comments »

2006-10-30 13:29:03

i like muchly.

 
2006-10-30 13:56:14

I liked the new theme. It’s really cool. And, wish all the best in your planned changes. Sorry, I can’t help much on “coding” and all that suff! But, for sure there are lot of tech geeks hanging around in Kottu, to help you out.

BTW, the “refresh feed” feature is missing in new template. Did you dropped it purposely for some reason, or you frogot it?

The voting system you suggest is the ideal if implemented. //count the number of times people click an article and make that the defacto vote\\

Digg.com have something like this, (34 diggs, 100 diggs etc) but again I don’t know how they do it.

 
n#
2006-10-30 15:08:30

Cool! kottu looks nicer now.

Re: click counting:
You have configured kottu to lead directly to the author post, so for you to count clicks, you would need a redirector script (say something like http://www.kottu.org/out.php?http://site/posturl)

That script would count the click and redirect the visitor transparently to destination site.

Other than that method, you could use some form of ajax/javascript to capture the click? (not really an expert in this area, perhaps Dilantha can help?)

Security
I see that you allow kottu to pick up code blocks directly from the subscribed site (excerpt/content, whatever)

I suggest you consider filtering the content a little more. In particular, its best if you remove any code in the excerpt, also any scripts, for security reasons. (I think feedwordpress already removes JS but I’m not sure), if not (in theory) people could execute some code, and more singnificantly a single xhtml error in a blog post could break your whole site

Also, its best if you implement a length filter to chop off the excerpt after so many characters, as some blog sites (e.g. MSN blogs) tend to send the whole post instead of an excerpt.

To implement a length filter open up feedwordpress code and look at the point where it extracts the post and use something like:
$ excerpt = substr ( $ excerpt,0,500 ).’…’;
(remove spaces)

i.e. show only the first 500 chr’s of the post

to filter code you can use strip_tags($variable) – that should chop off any code in the post leaving simple text. You might have to strip off code the title also as some people attempt to format that ( tsk, tsk, manshark ;-) )

As for the vote/redirect script I can’t immediately think of one in wp but I will let you know if I find one, also Dilantha might be able to help.

I guess you’d get a URL redirector script, and put that code in feedwordpress or the main template
i.e. somewhere it says something like $ url you’d replace that with myre-directorscript?url= $ url

Hope this is helpful..

2006-10-30 16:40:56

All good points. Do contact me via email and I’ll give you a pass inside.

FeedWordpress does strip the posts and I’m using wordpress to trim the post down to an excerpt. However, some posts seem to get through in their entirety. Pain in the bum actually. I would like to manually strip some things (long URLs, wonky images).

As for xHTML, I admire standards but I don’t follow them. If you’d be interested in implementing them on Kottu that’d be cool.

 
 
2006-10-30 15:10:06

Awesome. Darn fuckin awesome.

 
n#
2006-10-30 15:15:00

Stripping tags would kill all custom formatting on the posts, and remove those image thumbnails some bloggers use, but on the positive side it would make kottu very secure, and ensure that it validates always.

I’m not sure whether this is what you’d want to do (the killing formats and thumbnails bit) but its worth considering, from a security standpoint.

AFAIK Feedwordpress already filters insecure content (I’m not sure on this, I see some filtering in the code.. ), so the main benefit you get would be cosmetic (no post can break a site)

In theory we might be able to save the thumbnail (and images) by some tweaking (say, convert every

 
n#
2006-10-30 15:25:47

Another suggestion for kottu would be to turn off subscription on dead blogs, i.e. leave them in syndication with link and old posts as is, but just turn off the subscription on them, that way when the cron job kicks in it will only check live blogs, reducing the stress on your server. If an author restarts their blog, they can always contact you to re-enable it.

And the obvious suggestion. Please ensure the site validates.

 
Niroshan
2006-10-30 16:24:32

It sure looks clean!
Don’t know much (anything ) about the technicalities though.

 
2006-10-30 17:42:30

I like the new theme…much neater

 
2006-10-30 18:08:01

Send me a pass I’ll see what I can do from here. The ultimate tag warrior is pretty good at tagging. Lets see if we can integrate it with FeedWordPress.

 
Yo
2006-10-30 19:17:12

It really is very cool, Indi. Good job!

How about a Kottu blog, for update news, and threads like this, where people can discuss new ideas? How about http://www.kottu.org/blog ? Just a thought.

I think your idea for an aggregator of SL news feeds is excellent. But not on the Kottu blog syndicator.

http://www.kottu.org/news would be ideal. Or even news.kottu.org would be good. So many people would check into that, to see the latest SL news from various sources. I check about seven SL news sites using RSS now, which is so damn easy. In web format it would be even better. All the latest SL news in one place.

 
2006-10-30 20:32:09

Hey i would love to help you out in the coding bits if your stuck.. let me know.. btw the theme looks awesome.

 
drac
2006-10-31 10:40:06

Click counter: Depends on how badly you want to track clicks. I do something rather similar with JavaScript only (grab onmousedown, send a click-request to the server via an asynchronous JavaScript request). This is the same technique used by Shaun Inman’s Mint, for example. Works well, but it can be circumvented. Ozh uses the go.php? redirect method which is a bit more intrusive. Perhaps hooking sanitize_title will let you append some tracking code? K2 includes the scriptaculous libraries by default – looking at their theme code and making a couple of small mods should give you click tracking without too much hassle.

@Dilantha:
Don’t use UTW for community tagging. It works wonderfully well for single person or small group blogs, but I’m pretty certain it’s not yet intended for community stuff.

@n#:
Use wp-kses to strip dodgy HTML you don’t want to let through (I use it for another project to kill off divs and spans inserted by spaces.msn). Also, you may want to look at str_word_count (PHP function) to create nicer summaries (Much nicer to excerpt based on complete words rather than chars, IMHO)

Don’t use strip_tags either… WordPress includes a nice version of kses which can do all of that and much much more (strip_tags can’t do multiple lines, nor single tags as permitted by xhtml)

My real email address is in this comment, drop me a line if you want me to send you some code samples (the tracking stuff in particular has already been written.. you just need to make the code WP specific by hooking the appropriate actions and you’re done). I’m also in CMB for a couple more days :)

Also, have you looked at using wp-cron/wp-db-backup to dump old old posts periodically?

Finally, could you please please upgrade your kottu version of WP to 2.0.5? I have a vested interest in this as 2.0.2 produces broken RSS feeds on occasion (known bug in 2.0.2 where feeds were not escaped properly). I’ve mentioned this to a kottu admin – but at any rate 2.0.3, 2.0.4 and 2.0.5 all had security fixes too, so it may be worth an upgrade in any case :) and it works for me because the feed bugs got fixed in 2.0.3. Thanks :)

 
2006-11-01 00:44:41

I figured out the click counter plugin and implemented that (scrapping the voting system). Now people can behave as usual and the plugin will quietly tag which posts the most people visit, displaying the most popular ones in the sidebar. Of course, this measures the appeal of excerpts and titles more than anything, but it’s at least a natural and seamless measure.

drac
2006-11-01 19:07:38

Pardon my presumption in asking, but didn’t you just kill everyone’s googlejuice by appending the funky go.php? URL scheme to each and every link that appears on Kottu? From what I understand about SEO (very little), it seems that each link now appears to originate and terminate in kottu.org

Maybe googlebot is smarter than that. I dunno.

(You’ve also told every crawler to follow stats and inflate the hit count on each and every link, but maybe you want that)

 
 
2006-11-01 21:23:33

shit, that may be true. I hope Google is smarter than that

 
D
2006-11-04 07:21:02

Indi , nice work…But i think the counter is kind of holding on to old post. Dont you think you should get rid of the old posts which are appearing on the counter. Have like a refreshing method every week to get rid of the post which are older than one week. Otherwise these link will tend to inflate and new popular posts would never show up in the “popular post column”

 
Java
2006-11-05 06:02:24

Hey Indi – I just have a problem with the font size! Is it as small as you can make it for reasons of space – so more stuff can be displayed? Readability as it is now is pretty crappy Any reason for not making the font larger?

D
2006-11-05 07:21:14

Ctrl++ to increase the font size

Java
2006-11-05 10:37:52

D – Thanks man. It’s just that I’m pretty illiterate when it comes to this. Cheers!

(Comments wont nest below this level)
 
 
 
Yo
2006-11-05 10:08:08

Indi, another idea. How about an aggregator of comment feeds from Kottu blogs? http://www.kottu.org/comments perhaps.

One place where you can see all the comment activity across all Kottu blogs. Most blogs have comment feeds, don’t they?

 
2006-11-05 10:37:48

tried the comments once (mainline) but it was a god awful cacaphony and nothing made sense out of context. Maybe that could work as a sidebar element

 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.

email indi AT indi.ca.


Recent Comments


Police Protection (5)

tastyjujubes: Apparently some Tamil protesters screaming against the Sri Lankan cricket team got slapped silly in London.

Jack Point: Kenya is trying to reform its police force. The document below lists some the steps needed to restore its independence. http://www.amne sty.org/en/libr ary/asset/AFR32 /001/2013/en/9c 3fb77e-16e2-49e 0-94ec-d3c9f0e9 f9e2/afr3200...

Jack Point: More detailed info here: http://www.ceyl ontoday.lk/59-3 5109-news-detai l-a-digs-fall-f rom-grace.html http://www.sril ankaguardian.or g/2013/06/disgr aced-dig-vass-i s-only-tip-of.h tml

Internet Explorers (6)

sharanga: Sure, but that is only if you show promise. Big corporations won’t buy you simply because you have a good idea if it’s not clear your idea has the potential to make money. And seriously, if you have the potential to make...

Editor: Good show indi! Please see the event coverage by techwire.lk: http://techwire .lk/internet-en trepreneurship- forum-rotaract- club-of-usjp/

abdussamad: The idea is to get taken over by a larger company. In the meantime you try to get venture capital funding to sustain you. I don’t know if this will work in Sri Lanka though.

The YAMU Android App (2)

abdussamad: “like 6,000 lines of code we’re not using” Two questions a) since when can you code? b) how many lines is the final app?

Dave: When is it going to be available on the Apple App store?

Pay Pal Soon (4)

Hash M: Mashallah, insha allah? did i miss something indi?

Japanese People Drinking Beer On Sigiriya (6)

Gungan: There are more Sinhalese vandalising and stealing off archaeological sites/museums/ temples today and causing more damage than any foreign adverts presently. Sri Lankans need to chill a bit more. Have a beer!

Police Protection

Not to quote Ice Cube, but the Sri Lankan police are hardly beloved. A DIG was recently arrested for conspiring to murder a businessman, ie be a hit man. On the low levels reports of police torture and abuse are widespread. Low-ranking policemen are usually the ones disciplined, if at all, but this fish is really rotting from the head. The Sunday Times has a good piece on how the people at the top don’t get punished and how the structure of the government leads to corruption and abuse on the streets.

Internet Explorers

I just gave a talk at the University Of Sri Jayawardenapura along with Reeza Zarook of Anything.lk and Rohan Jayaweera of Google. These are my notes: Devin Jayasundara asked me for a subject for this talk and I told him Internet property. But I talked to my fiancé Shru and she had a better idea. Startups aren’t about creating property at all, not really. They’re about creating territory, about creating land.

The YAMU Android App

I haven’t been blogging much, I know. It’s partly because we’ve been doing a lot of work on YAMU, especially shipping 1.0.1 of the Android app today. It’s on the Google Play Store now. Inosh Perera did the programming (learning Android in the process) and Janith helped out with some design. My main contribution was a bunch of dead-end designs and like 6,000 lines of code we’re not using. The app isn’t perfect but it’s more perfect than it was 10 iterations ago. We think it’s pretty good.

Japanese People Drinking Beer On Sigiriya

I met an old-timer who said they used to drop acid and sleep atop Sigiriya, but the place has taken on a more commercial and quasi-spiritual role now. It was built by a king as a sort of retreat and used as a monastery. Now it’s a prime tourist and cultural destination. Hence it’s a bit odd to see a Japanese beer commercial shot up there. There’s a bunch of people eating, um, deep fried cream filled coconuts and then drinking some bracing beer. I hear the whole thing cost Rs. 25,000 (I’m presuming they used stock images).