Ask Your Question

Is there a way to add an interesting tag via direct URL?

asked 2011-02-02 09:59:28 -0600

Benoit's avatar

updated 2011-02-02 12:08:04 -0600

Evgeny's avatar

Is it possible to use craft a URL that would add a tag to the "interesting" list without going through the UI?

We'd like to be able to have users click a link to automatically subscribe to certain tags.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-02-02 12:11:57 -0600

Evgeny's avatar

updated 2011-02-02 12:38:53 -0600

It is possible right now if the request is of type "POST" and sent as Ajax, data must be in json format and the user must be logged in for that to work.

The url is /mark-tag/interesting/, and data sent as JSON.stringify({tagnames: tagnames}), where tagnames is an array of tags.

The javascript code lives in: askbot/skins/default/media/js/tag_selector.js, where function sendAjax runs the request.

edit flag offensive delete link more


Hmm...But it's not really possible to do that just as an embedded URL or an <a href="...">subscribe to interesting tag</a> is it?
Benoit's avatar Benoit  ( 2011-02-02 14:08:35 -0600 )edit
It must be a POST request, because it changes data, with GET it will be "not kosher"
Evgeny's avatar Evgeny  ( 2011-02-02 14:10:46 -0600 )edit
It may be possible to create some sort of a macro in the templates for the users who wish to create such customization.
Evgeny's avatar Evgeny  ( 2011-02-02 14:12:44 -0600 )edit
I'm wondering if a URL that consumes a parameter and then does a post internally is feasible: something like .../subscribe-me/?tag=my-interesting-tag. The intent is to be able to send an email to a bunch of people with a link that allows them to subscribe to the same tag with minimal involvement on their part.
Benoit's avatar Benoit  ( 2011-02-02 14:35:15 -0600 )edit
Well, to save the data that must be a post request, but it is possible to have the link lead to a screen with a "subscribe" button. I think it will actually be more liked by the users, because they will feel more in control this way.
Evgeny's avatar Evgeny  ( 2011-02-03 16:58:57 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-02-02 09:59:28 -0600

Seen: 202 times

Last updated: Feb 02 '11