Topic Previews (ie, doing it even more wrongerest)
-
Use the following in userscript/whatever on the topics list page to load an onmouseover preview of the topic post body to see whether you give a shit about reading more or not.
[code]
");
$("body").append("
$("#topagination_tooltip").mouseleave(__topicPreviewHide);
function __topicPreviewShow(html,parent) {
var pos = parent.position();
$("#topagination_tooltip").html(html).css("top", pos.top+25).css("left", pos.left).show(200);
}
function __topicPreviewHide() {
$("#topagination_tooltip").hide(150);
}
function __loadTopicPreviews() {
$(".topic-list td.main-link a").each(
function () {
try {
var hoverlink = $(this);
var temp = hoverlink.attr("href").split("/");
var url = "/" + temp[1] + "/" + temp[2] + "/" + temp[3] + "/1.json";
var actualUrl = hoverlink.attr("href");
var jqxhr = $.getJSON(url, function () {
}).done(function (data) {
var html = "Go to last read post on topic: " + hoverlink.html() + "
" + data.post_stream.posts[0].cooked;hoverlink.mouseover(function () { __topicPreviewShow(html, hoverlink); }); }) } catch (err) { alert(err); } });
};
__loadTopicPreviews();
[/code]Screenshot:
-
Note - only tested in Chrome.
-
Why don't you just go ahead and write a whole new frontend for Discourse? It looks like you're headed that way.
-
fuck 'em, give me enough beer and time and i would.
-
This one took about 45 min [mainly because I've had a lot of alcohol tonight...]. It's not pretty, but I don't give a shit about making it look pretty unless people think it's worth it because they like the functionality (or if I like it, I'll come back around and beautify it).
Just trying to make the user-experience on my end at least come close to rivaling every other modern forum I visit.
-
Legit question @ben_lubar - how long did it take you to set up dicsourse to create your plugin/update?
-
It's pretty simple, maybe 15 minutes if it's your first time. Basically, you do this:
- Install Docker through your package manager.
- Clone this repo.
- Copy samples/standalone.yml to containers/whatever.yml
- Edit the ports in the
expose:
section if you are already using ports 80 and 2222 for something. - Put your own email address in the
DISCOURSE_DEVELOPER_EMAILS
field for instant admin when you sign up on your forum. - If you're running more than one Discourse instance on the machine, change /var/docker/shared/standalone to something unique to that instance.
- Make sure you have a SSH private key on the host machine. If you don't, use
ssh-keygen
.
./launcher bootstrap whatever
./launcher start whatever
./launcher ssh whatever
- You are now root on the discourse instance. Congratulations.
-
maybe 15 minutes if it's your first time. Basically, you do this:
Install Docker through your package manager.
I can already see that it's going to take a lot longer than 15 minutes, as I'd be having to try this on a plain windows8 home edition. Not even a built in vm with this piece of crap os. Eventually maybe I'll take the time to use @sam's dicsourse vm link and get a vm running.
-
Why don't you just go ahead and write a whole new frontend for Discourse? It looks like you're headed that way.
Because Jeff's ego would never let sane UI penetrate his baby.
-
let sane UI penetrate his baby
That does sound quite sick and I wouldn't allow it either
-
That does sound quite sick and I wouldn't allow it either
Couldn't think of a better term, sorry.
-
Just do a public fork with the sane UI, call it Recourse. Probably be a hit overnight.
-
I've done it so many times my install time is about 10 minutes for vanilla install on a droplet. With my S3 image buckets, automated backups (through discourse), twitter, facebook, google, and yahoo logins....and my stock ticker bar add...40 minutes.
Filed under: I don't mean to brag.
But seriously though, I have grown faster because I break a lot of things (I'm not awesome).
-
Thanks, but darkmatter knows when to stop before he creates a monster.
-
All three are very protective of changes (at least to the main branch). I submitted a git pull request for some verbiage change. I beleive it was denied. I see @ben_lubar in the pull queue making regular submissions.
They are not beyond reason but some things they are very particular about.
-
Did you have to say "penetrate" in connection to Discourse?
-
Did you have to say "penetrate" in connection to Discourse?
Dickcorpes penetrate, yes?
-
Yo dawg, I heard you like discourse in your Dicsourse, so I've put some discourse in your Dicsourse so you can discourse while you Dicsourse?
-
Why in the fuck was I linked to a broken fucking Vagrant image that took 2 hours to initialize before I even got to the Docker stuff if that's all I had to do?
Guess I could maybe get a new VM running to test it in...
-
Welcome to my world of hurt. Only I'm working with a Virtualbox image from scratch and following their instructions to try and get a stable repeatable setup.
I'm having problems with the 'repeatable' and 'stable' bits. Largely getting both together in the same incarnation of an install.
-
The only correlation between VirtualBox and stable that I've ever had is that I can't get anything done with it.
-
Snapshot before every command and clone with name "This one fucking works, DONOTCHANGE!" once you get it running? :<wbr>P
Filed under: I can't fucking escape that emoji!, A-ha! <wbr> to the rescue!
-
Only problems I've had with VirtualBox in the past few years are of the self inflicted kind (too much/little memory/disk, running Windows guest under a Linux host with only 8GB host memory... ).
It even hosts the system my employer/department make. Not that that's necessarily something I should think is worth mentioning.
Anyway.
No, for any faults it has, Virtualbox isn't the problem in this instance.
-
I just have to bitch every time it gets brought up. It's like a nervous twitch.
Once I got a VM to run for a while on Virtual Box, but then it froze up and I could never get it to restart.
-
I also had issues with networking being too slow once. Can't remember if it was the adapter I chose, or extra slowness in bridge vs. NAT modes. And Windows D3D drivers are... questionable, at best.
But for general case of "just get shit tested" it usually works fine for me as well.
-
Snapshot before every command and clone with name "This one fucking works, DONOTCHANGE!" once you get it running? :<wbr>P
Filed under: I can't fucking escape that emoji!, A-ha! <wbr> to the rescue!
That's what i do....
Had OSX running in windowsXP virtualbox to do iphone development. It took a while to set up and ran damn slow, but once i got a working snapshot i was good to go.
-
Idea from my bitching over at meta.discourse? How do I use this?
-
Idea from my bitching over at meta.discourse? How do I use this?
You talking about OP or one of the off-topic things?
-
-
So it is
For the JS above you can either bookmark it as "javascript:
ALLTHECODEZ
" for url and run it when you load the page, or you can get a userscript extension for browser to auto-run the code on page load. It won't auto-update with the ajaxed new topics right now because I didn't hook their ajax refresher, so F5 is the only way to make it refresh the tooltips.It is loading from the topic JSONs, so it makes a call for every topic on the screen.
-
@pjh should implement it as part of discourse <3
-
You lot seem to be presuming I have a lot more control over the server we're all using than I do..
Hint... only access I have is port 80.
-
You make stuff work. We want stuff to work. This stuff works.
You'll figure it out in your drunken haze.
-
I'm not the one making it work. Delegation works most of the time, but.
-
This stuff works.
correction - mostly works. it has some extremely Dicsourse-like qualities to its user-friendliness. fits right in!
if they truly were to add it to the system base, I'd hope for a bit better quality than my 30 minute drunken hack. @wood said that they had done topic previews previously and removed them because no one cared... which to me translates to no one cared to read his forums because damnit topic previews are a great feature and I love them in the forums I visit that have them.
-
My definition of works is usually fairly generous.
-
@wood said that they had done topic previews previously and removed them because no one cared.
To me this says: "No one said they liked it, so we took it out."
Rule #382 of software design: Users will rarely, if ever, tell you that they like a feature. The only spontaneous feedback you are likely to receive will be negative.
-
His actual words on the topic.
Basically, it doesn't work on my iPad (because that's about the only touch device that dicsourse is vaguely usable on), so I'm not going to add it for anyone else.
-
His actual words on the topic.
Basically, it doesn't work on my iPad (because that's about the only touch device that dicsourse is vaguely usable on), so I'm not going to add it for anyone else.
Oh, so we're back to him breaking his "no developer ui" rule again?
-
Yeah. I posted in @matches topic on meta.d in favor of the hover preview and outlining the use case for it, as well as how to do it without making the negative impact on bandwidth that they are randomly worried about in this one case (check the JSON spam for everything else in the forum, they send the same data like 5 times [slight exaggeration] on every pull.....)
-
Basically, it doesn't work on Jeff's iPad (because that's about the only touch device that dicsourse is vaguely usable on for him), so he's not going to add it for anyone else.