Jump to content

How do i select articles that relate to the one i'm reading?


b_vassy

Recommended Posts

Hi

I'm building a site that, among others, deals with user submited articles. One of the things i want the site to do is show in a box related articles to the one the visitor reads. The first thing that i thought of was to organize the articles in categories and randomly choose 2 or 3 articles from that category to show as related. But, let's take for example PHP, since i'm here. If i create a category called "PHP Articles" and somebody reads an article about "Arrays in PHP" and i show as related article "Woking with files in PHP", it's not that good.  For this to work i'd have to create categories for all php topics. I'm sure there is a better way to do this, but i can't find it :(

One thing i thought of was to add tags to articles (like youtube or other video sites do). But i don't know how to build the query so to show the articles where most tags match. What i want to say: Let's suppose the article the user reads has 5 tags. How do i build a query that searches for all tags and returnes the articles where most tags match?

This is just an idea. If you can think of a more simple one, please...

Thank you

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.