Skip Navigation

Accommodation Tables

Travel Forums Wiki Travel Guide Accommodation Tables

Page

Last Post

1. Posted by Peter (Admin 5789 posts) 7y

Just launched a new feature in the guide today - accommodation tables. We've already had the ability to create tables since a month or so, but this is where it gets interesting. Just adding a flag to say it is a table with accommodation listings will change the way the table is rendered. Instead of a regular table, it will be sortable, filterable and paginated. Because some cities have hundreds of accommodation options, this makes it manageable to look at.

I've also added in a few special columns that will make it even more useful.

Firstly, if a property is listed in Travellerspoint's budget accommodation area, then there is a way to easily link that to the table. By adding a column with the header "TPID" and the numerical ID for each property, it will automatically be linked. Not only that, but we will automatically add another column called "Popularity", which will include the average user rating for that property. This makes it possible to sort the listed properties by popularity, overcoming one of the major challenges of a travel wiki. Normally, wikis rely on the last person who edited an article to decide what to list and how prominent each listing should be. By relying on user reviews and ratings, we are making it a more democratic listing which hopefully makes the guide articles *much* more useful. The more reviews, the better it will get.

Secondly, there are two more special columns: latitude and longitude. These won't be shown to the end user and currently aren't being used in any way. But I've decided to include them, because I want to also include the option to show the properties on a map - this shouldn't be too hard if we have the lat/long information for all the properties. It will be something that people can toggle on though - not shown by default.

Thirdly, the last special column is with the heading "Description". If you have one of these in the table, it will create a little information icon that you can hover over to see the description. Because descriptions have the potential to ruin the usability of a table, this tucks that information away nicely without making it inaccessible.

Because creating tables is actually a hugely cumbersome task using the wiki code, I've made a way for us to quickly add tables based on the properties already listed on Travellerspoint. When you are editing an article, you will find a link down the bottom to "Generate Accommodation Table". Look for it near the markup section - this is a power tool, so I didn't want to make it overly prominent. Once you click on it, there will be a popup where you can select a city or town that the article is about and generate the code for that city. Copy and paste that into the relevant location and you're done. You might want to do a bit of tweaking of some of the content, since the addresses are sometimes not consistently formatted. And you can add any missing properties to that list as well. Or if you like, you can even add extra columns with information like phone numbers, etc..

At the moment, the sortable, filterable, paginated table only works in Firefox, Safari and I assume any other browser other than Internet Explorer 7 (and probably 6). There's some horrible bug in that browser that drove me to temporarily remove it while we work on a solution. So, if you're on IE, you'll have to wait a bit (will try to fix tomorrow) or upgrade to a decent browser like Firefox ;)

If you are already using Firefox or another modern browser, have a look at the Sydney and Melbourne articles to see the beauty of it all :)

[ Edit: Clarification ]

2. Posted by Hien (Moderator 3906 posts) 7y

Nice feature! But one thing though... It seems like the information is hard coded/dated and not obtained from the live DB for accommodation. And the code is massively long for big cities with lots of accommodation property. I was actually hoping for a simpler way like how the photo tag works where you just add in the name of the country/city and it'll generate from there if the name matches the DB.

3. Posted by Peter (Admin 5789 posts) 7y

Quoting Hien

Nice feature! But one thing though... It seems like the information is hard coded/dated and not obtained from the live DB for accommodation. And the code is massively long for big cities with lots of accommodation property. I was actually hoping for a simpler way like how the photo tag works where you just add in the name of the country/city and it'll generate from there if the name matches the DB.

Well, that was a consideration originally, but the problem with that is it can't be edited or extended in the spirit of a wiki. Have a look at the Chicago article for instance. A very limited list that we have in our budget accommodation area, so it is likely more would need to be added manually. Already one extra one is on that list that wouldn't have been possible if it was purely automated.[1]

I do however want to have some sort of syncing mechanism - particularly for properties that have been added to the system, which could also semi-automatically be added to city pages. A bit tricky though. I just wanted to get this up first ;)

References

  1. 1 EDIT: I should point out - the extra one is the Drake Hotel. It is still linked up, but to the hotel section where we have a page on it. The automatic table generator only considers properties in our budget accommodation database, not the hotels database.

[ Edit: Edited on 19-May-2009, at 04:51 by Peter ]

4. Posted by Hien (Moderator 3906 posts) 7y

Given the possible huge size of the table code, there are bound to be errors, whether it's automatically generated or manually created. The Kuala Lumpur article is now broken from the addition of the table. I can try to look for the character(s) that might have broken the parsing, but I'm at work now and there are too many lines to check. I'll leave it as it is (broken) for you to check. Will revert it back in 30 mins if nothing is done to fix it, so that visitors can view the page.

5. Posted by Hien (Moderator 3906 posts) 7y

One more thing... will the addition of the accommodation tables skew the percentage of contribution? I think it should be excluded from the calculation, otherwise the contributor who added the table will get an unfair large percentage.

6. Posted by Peter (Admin 5789 posts) 7y

Fixed the KL bug now. Seemed to be due to the presence of two tables on the page, something I obviously missed in testing.

People who add tables will get full share credit at the moment. I don't think there's any way to avoid this to be honest. How could I decide whether someone is adding it through the automated system vs manually typing in new properties? Plus, the main places where there are a LOT of characters to be added are the big cities, ie.. London, Rome. Once those have been done, there is much less of a problem already. I also actually think it's ok to have some incentive to go around adding these tables, even if it is an easy job :)

7. Posted by Hien (Moderator 3906 posts) 7y

Quoting Peter

Well, that was a consideration originally, but the problem with that is it can't be edited or extended in the spirit of a wiki.

Hmm... What do you think of having the table added in the background, and from not some user added code? For example, if the Budget subheading is found, and must be located under a Sleep heading, and if the article name matches the Accommodation DB, then generate table.

8. Posted by Peter (Admin 5789 posts) 7y

Quoting Hien

Quoting Peter

Well, that was a consideration originally, but the problem with that is it can't be edited or extended in the spirit of a wiki.

Hmm... What do you think of having the table added in the background, and from not some user added code? For example, if the Budget subheading is found, and must be located under a Sleep heading, and if the article name matches the Accommodation DB, then generate table.

Well, that's just the same problem - it's not much in the spirit of a wiki. The property list would not be editable by the guide contributors.

9. Posted by Hien (Moderator 3906 posts) 7y

Quoting Peter

Quoting Hien

Quoting Peter

Well, that was a consideration originally, but the problem with that is it can't be edited or extended in the spirit of a wiki.

Hmm... What do you think of having the table added in the background, and from not some user added code? For example, if the Budget subheading is found, and must be located under a Sleep heading, and if the article name matches the Accommodation DB, then generate table.

Well, that's just the same problem - it's not much in the spirit of a wiki. The property list would not be editable by the guide contributors.

Ah, I am looking at that table as a site feature complimenting the guide and not something contributed by members. Perhaps if it was styled a different way (e.g. smaller/narrower table, aligned right with user contribution wrapped around it), it could be made to look like that. Members can still add their own recommendation on its own space.

Anyway, there's still a big concern on how to update the tens of property for each city if members can also add to the list. I'm sure it can be done, technically, but the hassle of determining that...

Then there's an issue of duplicates. Members wanting to suggest/add a property will have to check the entire list first to make sure that there's no duplicate -- that is, if they do check. This again may cause problem to the syncing part if it was to be done automatically by a script.

10. Posted by Peter (Admin 5789 posts) 7y

Quoting Hien

Ah, I am looking at that table as a site feature complimenting the guide and not something contributed by members. Perhaps if it was styled a different way (e.g. smaller/narrower table, aligned right with user contribution wrapped around it), it could be made to look like that. Members can still add their own recommendation on its own space.

Yeah, but that wouldn't really be something we would want. One major benefit of this is also that it should hopefully cut out some spam. Now, if you want to promote your hotel on the Melbourne page, you have to add it to the list - standard formatting, no way of pushing yourself up since we take care of sorting automatically. Adding properties outside of the table should be discouraged.

Anyway, there's still a big concern on how to update the tens of property for each city if members can also add to the list. I'm sure it can be done, technically, but the hassle of determining that...

Then there's an issue of duplicates. Members wanting to suggest/add a property will have to check the entire list first to make sure that there's no duplicate -- that is, if they do check. This again may cause problem to the syncing part if it was to be done automatically by a script.

Yeah, which is why I didn't do it yet. My rough plan would be to create a table where I store the current properties listed - not particularly problematic, I already have one of those for the facts entered into each wiki article. Then I just need to compare those tables and perhaps generate some sort of alert when there are new ones or differences.

Regarding users needing to check for duplicates - I'd hope the search box on that table would help the problem? Otherwise, I've just been using the browser's search functionality.

I've also been wondering if I need to create an easy table editor, so all the formatting is taken care of. That is really a big hurdle and will kind of limit this feature to power users. But an editor like that would also be a lot of work to integrate well of course.