Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Turrican3 on October 28, 2009, 11:01:29 AM

Title: [SMF 1.x] Help: implementing tagging per post, not per thread?
Post by: Turrican3 on October 28, 2009, 11:01:29 AM
Hi,

I'm currently using SMF 1.1.10 and I'm looking for a way to "mark" (or "unmark", if needed) posts as I write them. I want to do this to be able to quickly locate and display them as news items. The idea would be to keep a separate table in the database which would basically keep track of all the "marked" posts, adding or deleting elements as needed. This to avoid messing too much with SMF's DB "standard" structure and leave current messages table as it is.

First of all: is this the right way to do it?

And if so, is it too much of a load for the MySQL server?

I was thinking about using this mod (http://custom.simplemachines.org/mods/index.php?mod=579) as a starting point for writing my code/queries, is that correct?

Thanks in advance to anybody who will be able to give hints. :)
Title: Re: [SMF 1.x] Help: implementing tagging per post, not per thread?
Post by: Arantor on October 28, 2009, 03:14:34 PM
Indeed a separate table is the way to go.

In fact, there's a mod that's about 75% of what you want - http://custom.simplemachines.org/mods/index.php?mod=864 - which does it at topic level rather than per post level. But it's not a huge change to the mod to make it work how you want.

As for load, that's only dependent on how many users have the ability to mark things and how many entries you mark.
Title: Re: [SMF 1.x] Help: implementing tagging per post, not per thread?
Post by: Turrican3 on October 29, 2009, 05:29:31 AM
Quote from: Arantor on October 28, 2009, 03:14:34 PMIn fact, there's a mod that's about 75% of what you want - http://custom.simplemachines.org/mods/index.php?mod=864 - which does it at topic level rather than per post level. But it's not a huge change to the mod to make it work how you want.

Hmm, very interesting, I didn't notice that mod because I was looking/searching for "tag(s)", honestly by the name alone I think I'd overlooked it anyway. I'll try to study its code then and see what I can do. :-)

QuoteAs for load, that's only dependent on how many users have the ability to mark things and how many entries you mark.

At the moment I believe we're going for no more than 10-15 entries per day (most of the time there will be a lot less) on average, with 4-5 users at best having permission to mark posts. At this rate do you think it could cause slowdowns?
Title: Re: [SMF 1.x] Help: implementing tagging per post, not per thread?
Post by: Arantor on October 29, 2009, 05:30:49 AM
I don't imagine that would cause a slowdown actually, on a properly setup server.
Title: Re: [SMF 1.x] Help: implementing tagging per post, not per thread?
Post by: Turrican3 on October 29, 2009, 05:51:39 AM
Thanks.

I'll let you know of my progresses with this modification. :)
Title: Re: [SMF 1.x] Help: implementing tagging per post, not per thread?
Post by: Marcus Forsberg on November 20, 2009, 09:06:29 AM
Turrican3, is this issue resolved or do you still require assistance?
Title: Re: [SMF 1.x] Help: implementing tagging per post, not per thread?
Post by: Turrican3 on November 23, 2009, 06:30:04 AM
Quote from: Nas on November 20, 2009, 09:06:29 AMTurrican3, is this issue resolved or do you still require assistance?

Thanks for your interest in this matter.

Unfortunately, due to various reasons, I haven't been able to start work on this modification yet, so "technically" the issue has to be qualified as unresolved.

Regards. :)