Skip to main content
Topic: [ADDON] Topic Tags (Read 8730 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[ADDON] Topic Tags

This one is a bit more complex, and it took a bit of time to code (and some changes to the core! :P).

Repo: https://github.com/emanuele45/topic_tags

Simple: tags.
Attached to topics, so the first message of the topic.
Some permissions, some layers, some "api" (ajax to add/remove tags from the tag cloud).
Funny thing I reused MessageIndex.template to present the list of tags associated to a certain topic.
What else?
It's not yet finished, I'd like to use the smf_AutoSuggest to suggest existing tags, but I have to think about it a bit because at the moment it doesn't work the way I want it to.

I'm posting it here because I have to work on something else and I know that publish something is a good way to lose interest in it. :P

I have a couple of pictures, but are a bit outdated.
I'll take some in the next days.

ETA: oh well, the images are outdated, but not so much, so here they are. O:-)

ETA2: added some more recent screens.

Re: [ADDON] Topic Tags

Reply #1

I'm glad to see tags, as I think they are more useful than categories, but also work even better in conjunction with categories. However, I would they were part of the core...

Re: [ADDON] Topic Tags

Reply #2

 emanuele thinks tags are mostly useless... :P

Seriously: tags rely on people entering them and we know people are unreliable, so tags are unreliable.
It's very unlikely people will fill meaningful tags, even if they are forced to choose from a predefined list.
Yes, it may be an option to "replace" categories, that's true, but then I have some unanswered doubts about performances impact.
Bugs creator.
Features destroyer.
Template killer.

Re: [ADDON] Topic Tags

Reply #3

Often people will use tags to send up posts/posters they don't like. Or to make jokes, or whatever. Plus what Ema said, so all told I'm not all that thrilled about them.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: [ADDON] Topic Tags

Reply #4

I'm now adding the alternative a-la twitter...
Just for fun (and because at least that doesn't require to fill another box).
Bugs creator.
Features destroyer.
Template killer.

Re: [ADDON] Topic Tags

Reply #5

 emanuele hates that attachments and other options always open...
Can we make it an user option pretty please? :-*

Posting a screenshot of tags how they appear "inline".

That is actually nice to see I think... O:-)
Bugs creator.
Features destroyer.
Template killer.

Re: [ADDON] Topic Tags

Reply #6

I thought this was tags for topics, not posts, so that user's can find related content. Kinda like Stack Overflow.

Re: [ADDON] Topic Tags

Reply #7

Ohh...it's all mixed up... lol

The first implementation is a field where people can add a comma separated list of words that will be considered tags and attached to the topic (this is possible only for the first message of the topic and only by members that have the permission.

The second one (that is in fact just a setting switch...that I still have to add!) is something similar to the twitter hashtag: it uses the same "infrastructure" (so tags associated to topics, clouds if/where you want them (still have to add settings, though) and it shows the tagged words into the message. Each of those words is a link to a list of topics with the same tag. The difference is that anyone can post a message with a tag and the tag will be associated to the topic... And now I'm working on the maintenance that is a PITA...
Bugs creator.
Features destroyer.
Template killer.

Re: [ADDON] Topic Tags

Reply #8

Pushed "just now" :P the hashtags branch (the two will be merged sooner or later).
Some fancy preg_replace to get the work done:
https://github.com/emanuele45/topic_tags/blob/hashtags/Tags.subs.php#L242

...I think I forgot a hook and the maintenance task are not finished...probably are completely broken... lol
Bugs creator.
Features destroyer.
Template killer.

Re: [ADDON] Topic Tags

Reply #9

Ohhh... almost one year and a half ago!! LOL

In the last couple of days I did some work on that one.
Considering that when I started it was about 1848 lines of code and according to github I added 1,993 and remove 808, I basically rewrote it (and I have not yet finished LOL).
Well, it's not entirely true, I moved around quite a bit of stuff without changing it. :P

Anyway, I started making it generic, so that it could be used not only for topics, but potentially for any other kind of stuff (e.g. members, boards, thoughts, etc.).
I'm still focusing mainly on hashtags, but at topic level (because I'm not entirely sure it make sense to have single messages tagged with something [1]), but in theory normal tags should Just WorkTM.
I also added a table for logging when tags are used so that trends (as suggested by @Joshua Dickerson ) could be generated, but it's still unused... later that too.
Other things to do is the "remove message" part (i.e. remove tags from a topic when a message is removed), and I guess the remove topic as well. It's already present, but not tested at all.

Okay, for this update it's enough, I'll keep working on it for a while, maybe this time I can make it work "properly".
That means I have (still) to give the "owner" the power to delete tags (sort of moderation), but that's something for later.
Bugs creator.
Features destroyer.
Template killer.

Re: [ADDON] Topic Tags

Reply #10

Nice addon but I think if this is combined with first post on every page, the it'd be better.

Re: [ADDON] Topic Tags

Reply #11

There are two modes (that I want to be able to use independently at the same time on different "items"): one is the "hashtags" mode that applies to any message (but still is bound to the topic), and a "classic" mode that allows to attach tags only to the first message.
It will be flexible. :P
Bugs creator.
Features destroyer.
Template killer.

Re: [ADDON] Topic Tags

Reply #12

I'll definitely have to try this out. I was thinking what if you combined all tags into one system meaning topic tags, post tags(hashtags) and prefix tags - http://www.elkarte.net/community/index.php?topic=1424.0 - for easier searching of posts.

Re: [ADDON] Topic Tags

Reply #13

Tags and hashtags are already more or less combined. There are some differences, but the two systems are different, so it seemed meaningless to merge them more (for example if you can add hashtags it useless to have a box to add tags, just add to the text).

Merge the prefixes is something I was thinking about, but there are few considerations in order to do, and I feel prefixes are usually used in a very different way than tags, and I'm not sure merging everything in one "thing" is worth the effort.
Bugs creator.
Features destroyer.
Template killer.

 

Re: [ADDON] Topic Tags

Reply #14

Quote from: emanuele – Tags and hashtags are already more or less combined. There are some differences, but the two systems are different, so it seemed meaningless to merge them more (for example if you can add hashtags it useless to have a box to add tags, just add to the text).

Merge the prefixes is something I was thinking about, but there are few considerations in order to do, and I feel prefixes are usually used in a very different way than tags, and I'm not sure merging everything in one "thing" is worth the effort.
Now that I think about it, it might be a bad idea. Sometimes prefix tags are used in certain boards and when they are used it's only for 1-2 tags such as in http://vanillaforums.org/discussions