Elgg Not Showing Latest Activity in 1.6

Update: It turns out this problem was caused by plugins. The Wire plugin is causing it on both sites, and the bookmarks plugin is causing it on one site. If you have this problem, I recommend turning off your plugins and enabling them one by one to see which one is causing the problem.

I complain about Elgg a lot, as you can see here. I want to like it, but it does have a lot of problems. I know it is Open Source, but it is also being actively worked on every day. So in my opinion, if there is a known bug in a prominent feature of the site, it should be fixed.

There is currently a major bug in the Latest Activity feature of the Elgg software. I have 2 sites running Elgg, and neither of them display the latest activity on the latest activity page or on the home page. Latest activity is blank on both sites. They were both upgraded and not fresh installs, which seems to be a common factor. Also, I was running the custom index plugin on both sites, so I didn’t notice the problem until I disabled the plugin.

This is a known bug that has not been fixed yet. As far as I can tell, it was reported at least a year ago here. There is a thread on Google Groups here. Here is the bug ticket for this in Elgg’s bug tracking system that was reported 3 months ago.

How does Elgg handle bug fixes? There is a major bug in Elgg’s latest activity display, which is a major feature of the site. They know about it, and it has not been fixed yet despite 2 discussion threads and a support ticket. Hopefully, they will fix it in the next release whenever that is.

Elgg Default Theme Should be a Plugin

I finally upgraded to Elgg 1.5 the other day. I was frustrated that custom themes were broken in this version, but I got over it. It is worth the upgrade with all the improvements. There are still no custom blog title tags, but that is easy enough to fix yourself.

Now, that custom themes no longer work, I decided to modify the default theme. It is not that hard to modify default views in Elgg, if you know what you are doing, but in doing this, I realized a fundamental problem with the default theme. The default theme should be a plugin rather than part of the core files. Because it is not, if you want to modify the default theme at all, you have to create a plugin.

Let’s say that you want to add Google analytics to your template. Unless you want to modify the core files, which you shouldn’t, you have to create a plugin. This should be much easier. Compare with WordPress. WordPress comes with a default theme. To make changes, it is easy to modify, add a new one or make your own. It is not easy to do this in Elgg.

Another problem is that a custom theme is the same as a plugin, so when you are looking at your list of plugins, it is hard to tell which ones are themes. Also there is no preview for themes, not even a thumbnail.

So for the next version of Elgg, I would break out the default theme as a plugin. Then I would separate the themes from the plugins in the backend. This will make it much easier to customize your themes in Elgg.

How to Fix Tags in Elgg

Update: My changes have been rolled into the current development version of Elgg, so they should be in the next release. So if you don’t want to implement these changes yourself, you should be ok waiting for the upgrade.

Tags are a really good way to organize content in Elgg. You can add tags to any piece of content you create, and the tags help you organize that content by grouping it together, however you see fit. But when I looked at the underlying code for the tags, I noticed that it wasn’t following the specification for the tag microformat. Not that big a problem, but not a hard problem to solve either.

To explain, here is an example of how Elgg currently formats tags.

<a href="http://www.example.com/search/?tag=elgg">Elgg</a>

According to the microformat specification, here is how tags should be formatted.

<a href="http://www.example.com/tag/elgg" rel="tag">Elgg</a>

So how do we correctly format tags in Elgg? Well, we can use an .htaccess rewrite rule to correctly format the url to the specification. Edit your .htaccess file in Elgg and insert this code at line #120.

RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9\+-]+)/?$ search/?$1=$2

That handles the url, but we need to rewrite the code in Elgg that displays the tags, so when you click on the tag, it goes to that url. To do this, open views/default/output/tags.php and edit line #49 to read like this.

$tagstr .= "<a rel=\"tag\" href=\"{$vars['url']}tag/".urlencode($tag) . "{$type}{$subtype}{$object}\">{$tag}</a>";

That should be it. It’s pretty simple actually. Now your tags should be correctly formatted to the tag microformat specification.

One important thing to note is that I have again modified core Elgg files, which means if I upgrade my install these changes will be overwritten. So if you follow these instructions, you should realize that. Yes, this is a no no, so I have again submitted a change to the Elgg core files in the bug tracker here. Hopefully, the developers will incorporate my code, or something like it so modifying the core files will no longer be needed. Or, if someone would write a plugin or create some decent plugin documentation on how to create something like this, it would also be appreciated.

I hate continually modifying the core Elgg files, but these are problems more mature software packages, like WordPress, have already solved. Yes, I believe Elgg is still in it’s infancy, but it’s fixes like this that will make people notice that this is serious software.

Elgg SEO: How to Fix Your Title Tags

Update #1: My changes have been rolled into the current development version of Elgg, so they should be in the next release. So if you don’t want to implement these changes yourself, you should be ok waiting for the upgrade.

Update #2: The title tag for pages and files did make it into Elgg 1.5, but the blog title tag change got regressed somehow. If it was not an accident, then they did it on purpose. Either way, it is very amateurish in my opinion, which continues to be one of my complaints about Elgg. Anyway, you can still apply the fix below exactly as described, and it will work.

I’ve been writing about recently, and more importantly, how to improve it. I have said that Elgg needs some attention to SEO to be a serious solution. Even though Elgg developers have taken my suggestions recently, I couldn’t wait any longer and took it upon myself to dig into the Elgg source code.

My goal was to improve Elgg SEO by creating unique title tags within the content. I was able to create unique title tags for blog posts, pages and files, by adding the post title to title tag in the header, so that each title tag is formatted like this, “Site Name : Title.”

Here’s how you can do the same thing step by step.

To give your blog posts a unique title tag, go to mod/blog/read.php and uncomment line 38. Here’s how it should read.

$title = sprintf(elgg_echo("blog:posttitle"),$page_owner->name,$blogpost->title);

Now your blog post title tags should read, “Site Name: username’s blog: Post title.”

Next up is pages. To give your pages a unique title tag, go to mod/pages/view.php and insert this code on line 40.

$title = $pages->title;

Now your page title tags should read, “Site Name: Page title.”

Changing the file title tags was a lot harder, because there is not really a file view. You have to change it in the entity view. Up to this point, we have been modifying plugins files, which is fine because we are not modifying the core Elgg files. This means those changes won’t get erased by upgrading your Elgg installation.

But modifying the entity view requires modifying core Elgg files, so proceed at your own risk. To make the change, open up entities\index.php. Insert this code on line 40.

$title = $entity->title;

Modify line 57 to look like this.

page_draw($title, $body);

Then on line 60 insert this code.

echo $title;

Now your file title tags should read, “Site Name: File title.”

These were small improvements, but hopefully it will pay off in more search engine traffic to your Elgg site. I’ve submitted these changes to the Elgg code base here, here and here. Hopefully, the developers will consider integrating these improvements into the actual code.

I’ve tested this code, and it works. But I am not a developer, so if I’ve made any mistakes, I welcome suggestions for improvement. If this would be better done as plugin, I would love to have someone come up with an Elgg SEO plugin, as well.

Elgg and SEO

Update: I’ve posted a solution for fixing your title tags in Elgg.

So as I’ve written, I’ve been using a social networking software package called Elgg. So far I’m really pleased with how it works. In addition, it is open source with the ability to develop plugins for it.

However, Elgg is not without its problems. In fact, I recently posted a development wishlist for Elgg. Besides releasing an upgrade path to upgrade your 0.x Elgg installation to 1.x (a glaring error), at the top of my list is lack of SEO.

In my opinion, Elgg seriously needs SEO to be considered a useful product. I’m really not asking all that much here. The main thing it needs is unique title tags. This is a basic SEO requirement, and continues to be overlooked in Elgg.

For example, any item you create in Elgg, blog post, page, file, etc., lacks a unique title tag. In fact, they all have the same title tag, which is only the site name. This is bad for SEO because when your items show up in a search engine, there will be no descriptive text for that item. In addition, if your page shows up with other pages from your site, there is no way to tell them apart because the title tags are all the same.

The interesting thing is that this feature was present in Elgg 0.x but not in the new version of Elgg 1.x. All you would have to do to give each item a unique title tag would be to have the name of the site followed by the title of the item, i.e. the blog post title. This would make items posted in Elgg much easier to find in search engines, and as a result, bring more search engine traffic to each site. It seems like a simple thing, and, being that this feature actually exists in the groups and forums, it doesn’t seem that hard to add to the rest of the site.

The second thing that would be useful is search engine friendly url’s for pages. Search engine friendly urls are being used for blog posts and files but not for pages. This was something that was not present in Elgg 0.x but was added in 1.x.

I recently wrote a post about how to make the Elgg plugin directory more useful, and the developers followed every one of my suggestions. So I am writing this hoping that someone over there is still paying attention. At the least, it would be simple to write a plugin to solve this problem, or incorporate it into themes.

For you Elgg users and developers out there, what are some other ways SEO can be improved in Elgg?

Elgg Plugins Need Better Organization and Navigation

Update: See the comments. Not too long after I wrote this, we noticed big changes in the Elgg Plugin site. What changed? Every one of my five suggestions was incorporated making huge improvements in the Elgg Plugin site. Thanks guys.

A few days ago, I wrote a post on how to improve Elgg. Something else that is needed to help make it better is improved plugin organization.

The way that Elgg plugins are organized leaves much to be desired. You can see what I am talking about here. Plugins are listed in order of most recently added to the site, and you can browse them 20 at a time. So to find a plugin, you have to go through page after page, and there’s no way to tell whether or not the plugin might be useful.

So here is what needs to be added to improve plugin organization on Elgg.

1. A way to rate plugins. Plugin ratings would be useful to help developers determine whether the plugin works well or not. Then you could organize plugins by popularity.

2. How many times a plugin has been downloaded. This would also help you to know if a plugin is useful, and you could sort plugins by this option.

3. Plugin search. There is no way to search plugins on the site. What?

4. A plugin description displaying in the listing. The only thing you can view in the listings is the plugin title. These are not very descriptive sometimes, so it is hard to tell what the plugins are for based on the titles alone.

5. Better versioning. Old versions of plugins stay in the listings, which is fine. But plugin organization by version would be helpful.

Basically, Elgg plugin organization is almost useless in that you have to page through the list of most recent plugins and without descriptions you have to click through to find out what they do. Adding things from the list of above would greatly improve the organization and help developers better find plugins to improve their sites. This would also help improve the usefulness of Elgg itself. All of these suggestions are obvious, so it’s a mystery why the developers haven’t implemented anything like this yet.

Elgg Development Wishlist

Elgg is an open source software package that allows you to create and host your own social network. I discovered it last year while looking for this type of software. It is free and because it is open source there is a community of developers that can create plugins to help improve the software.

First, let me say how pleased I am with Elgg. It is the best open source social network software out there that I have been able to find. In fact, I would say there is nothing else like it. I also like the fact that it is open source and extendible with plugins and themes. There is a community site where users can upload plugins and themes.

However, there are several drawbacks to Elgg. First, I would say it is in its infancy now. In fact, in 2008, a new 1.0 version was built from scratch. While the 1.0 version is a great improvement, several features were left out of the new version that existed in the old version that software like this should have in my opinion.

The good thing is that development is continuing on Elgg with 2 major releases planned per year. I am afraid though that the features that are most needed are not on the radar of the developers. Here is my list of features that I feel Elgg needs in the next version or two to be much more useful.

1. SEO – Elgg needs basic SEO. Currently, blog posts, pages and files do not even have unique title tags. This is a basic rule of SEO the developers have ignored. The funny thing is that this was not a problem in the earlier version.

Update: I’ve posted a solution for fixing your title tags in Elgg.

2. An Upgrade Path – When version 1.0 was launched, there was no way to upgrade your installation without losing your data. This is a serious mistake that has not been corrected yet. If you were already using it, you can’t use the new version unless you want to start over from scratch. Why was this even considered and why hasn’t it been corrected yet?

3. The Wall – The classic version had a wall feature just like Facebook. In the new version, they got rid of it. Please bring back the wall.

4. RSS Import – Classic Elgg had a built in feature that could import RSS feeds and even create blog posts from the RSS feed. I’m not sure why they got rid of it, as that is a pretty cool feature that simlar blog platforms need a plugin for. Please bring this back as well.

These are my main concerns, but the list doesn’t stop there. It seems like the developers are using WordPress as a model. While this is a good thing, the developers should pay closer attention to the development of WordPress. I can think of a few things WordPress has that Elgg should have.

WordPress has better documentation. WordPress also has better access to support. Another cool feature would be ratings on plugins and stats on how many times plugins have been downloaded. If you haven’t noticed a pattern yet, WordPress also has this.

Hopefully, this post will start the Elgg developers thinking about these things. If not or in the mean time, maybe some sharp plugin developer will take it upon himself to find a solution to these problems. In any case, I am patiently waiting for Elgg to get better over time. It’s not there yet.