Discourse/Main Site Test Plan
-
It's more customary to put the parens inside:
(function() { }());
Really though, all that's necessary to ensure it's a function expression (instead of a function declaration) is a token before it.
So, just as valid:
void function() {}();
or0,function() {}();
-
As long as we're returning an object, why not just
var Discourse = function(){ return ["forum", "pagination"] }()
-
As long as we're returning an object, why not just
var Discourse = function(){ return ["forum", "pagination"] }() ```</blockquote> ASI makes Baby Jesus cry. --- Filed under: [Markdown makes him weep blood.](#tag)
-
Wow! That's so awesome. Thanks.
Ok, I think I see how these plugins work. So you start with
renderFeature
to push a<button>
html out, and then do aclickFeature
gets attached to the thingy that was just rendered.Seems pretty straight forward.
In the theme of keeping this as ghetto plug-in, I was thinking we could store the featured postIds as a CSV in the firstpost, like ARTICLE ID. Something like
<!--FEATURED:123,456,283-->
. It seems pretty straight-forward to read this out of the firstpost, but i'm wondering...- how to set a class on a post? (so we can indicate which posts are featured)
- how to edit of the first post? is it like,
firstPost.set('cooked', '????')
On an unrelated note, I have a hard time seeing
fa-paper-plane
as anything butfapper-plane
.
-
-
In the theme of keeping this as ghetto plug-in, I was thinking we could store the featured postIds as a CSV in the firstpost, like ARTICLE ID. Something like
If this isn't setting off your WTFometer, perhaps yours is broken.
-
Ok, I think I see how these plugins work. So you start with renderFeature to push a <button> html out, and then do a clickFeature gets attached to the thingy that was just rendered.
Nope, that's not how "these plugins" work - that's how the particular class, PostMenuView, which we're modifing, works.
You basically have to read the JS file you want to change, and figure out how to inject your opinion on a case-by-case basis.
In this case, the
post_menu
SiteSetting gets split on|
, then iterated, callingthis["render" + typeWithFirstLetterCaps](post, buffer);
. Then it sets up a click listener for the whole menu, and when something is clicked it gets thedata-action
from the element and calls the method in a similar fashion.In the theme of keeping this as ghetto plug-in, I was thinking we could store the featured postIds as a CSV in the firstpost, like ARTICLE ID.
Yeah, I'm with @error here - No, no, hell no.
Topics can have custom fields stored in the DB - https://github.com/discourse/discourse/pull/2297
However, this would involve setting up a Rails web endpoint. Are you up to that?
Just noticed that the paper airplane is in the newest version, which Discourse isn't using. I'll pick another one - inspect the change and update the plugin, if you already installed it.
-
Ah got it, thanks!
this would involve setting up a Rails web endpoint
I'm not sure what that is... but how hard could it be?
-
I think we either have to redraw routes or mount an engine. Don't quite remember.
Also, I recolored your avatar:
Feel free to use it.
-
If you expand the quote, you can clearly see that I did not say IFFE, but rather IIFE. Suggesting otherwise is treason.
What is causing this strange behaviour?
-
I'm sorry, citizen, but that information is not available at your security clearance.
All the information needed to figure it out is available on this page. Figure it out.
-
+1 for discourse.
The image dragging and dropping is working in IE11.
-
I'm sorry, citizen, but that information is not available at your security clearance.
I am not doing any role playing over here.
-
-
I put on my robe and wizard hat.
Sounds creepy. Have you got
yourselftested for signs of mental illnesses?
-
-
?
http://what.thedailywtf.com/t/bonecrusher-loves-his-cat-food/436/46
I'm sensing a theme...
Filed under: why did system just edit my post?
-
With all due respect, you're no match for Erik Gern.
You say that like it's a bad thing...?
-
Filed under: why did system just edit my post?
Probably to change the image URL after it cached it locally.
-
Probably to change the image URL after it cached it locally.
Yup. At least that feature works every time.
-
Not sure if lacunar amnesia or actually unaware of http://bash.org/?104383
-
I like my version better.