Can a "I jeffed some posts" post be made into a wiki?
-
-
+science
-
This topic was automatically closed after 60 minutes. New replies are no longer allowed.
-
-
No - there's no spanner to be able to do that:
-
Have @shadowmod attempt to grant a badge, but the SQL actually changes the
is_wiki
(or wahtever the name is) field in the database for the post.
-
but the SQL actually changes
Not possible on badge queries - they can't be used to modify the database. (They simply return results which are then used to modify the database.)
-
Oh come on, don't give up! This is Discourse, surely there's at least one injection vector we could find.
-
You should just be able to find what the wikify button does (e.g.
make_wiki()
) and then just change it to the jeff notification post ID.
-
That sounds like work...
-
-
You should just be able to find what the wikify button does (e.g.
make_wiki()
) and then just change it to the jeff notification post ID.Ah, you see, but it actually calls
ember-action-5423566
(this changes every reload), which calls a method inDiscourse.Vendor.Model.Post.Model.Actions.Extra.Secret
namespace, which is then routed to a RoR model somewhere down the line, probably calling a method on the topic and takingpost_number
as a parameter.Ok, I'm exaggerating, but it's probably not far.
-
I know we managed to do something like this before, I just can't remember exactly how it worked.
-
For a lot of actions, you can simply replace the
data-action
with the name of the actual action you want to take. For example, you can change thedata-action
for the "edit" button to "bookmark" and when you click it it will bookmark the post.
-
Yes, but finding what it actually calls within Ember is a different beast. Unless your solution would be to inject an invisible link in the DOM and simulate a click (which probably wouldn't even work since the click handler wouldn't get bound properly, most likely).
-
Yes, but finding what it actually calls within Ember is a different beast.
Yeah, that's why I mostly gave up on tinkering with Discourse. I mean, you think "it's JavaScript, how hard can it be to find the handler and tweak it a little?" - but no, everything's tangled in a mess of routes, controllers, actions and all the Ember crap to the point where even going through Discourse's GitHub is unlikely to help you.
-
going through Discourse's GitHub is unlikely to help you.
Going through Discourse's GitHub can only lead to insanity, and that requires a different type of help.
-
Going through Discourse's GitHub can only lead to insanity,
If you just read though the commit messages you can
laughcry yourself to sleep.
-
Basically a pretty even split between "Bikeshedding" and "Shit we should have tested for, but didn't"?
-
There are a lot more things in there that are mundane. At least the messages themselves. I wasn't going to go and do a code review on them.
Those were just some highlights that amused me.
-
Those were just some highlights that amused me.
How about their attempts to re-implement the London Underground map in git?
September last year:
-
How about their attempts to re-implement the London Underground map in git?
That seems fairly normal for a busy / relatively large project, TBH.
-
Nothing out the ordinary there; last company I worked at before my current one, I saw just as much complexity in the Mecurial commit history