Links Category for Discourse


(Erick Guan) #1

Continuing the discussion from Wanted: Discourse Hacker News Plugin:

@commonpawn wrote a great spec and sponsored a plugin for building Hacker News like plugin for Discourse. Thanks! It’s available here:

It will be managed by team at some point.

Usage

  1. Install a plugin. Putting - git clone https://github.com/danskdynamit/discourse-links-category.git in after_code.
  2. Go to category settings to enable the feature.

Features

  • Composer for submitting link
  • Special topic list design for links, and link is also displayed in the topic. (Default CSS is cranky)
  • Including link in the digest email

See it in action

Dansk Dynamit has a different but beatiful design for the plugin. More on their roadmap.


Change the homepage or select a default category when creating a topic?
Case-Study for Archetypes: Questions-Archetype
Merge discourse-links-category into Discourse
How to handle announcements
Discourse Sidebar Blocks
Basic Links Plugin
Wanted: Discourse Hacker News Plugin
Special annotation for posts that are just links
(@SenpaiMass) #2

i have managed to successfully install this plugin, But when i click new topic and go to my links category it just shows up as a regular composer.
http://imgur.com/QfTEjOP

Here are the settings
http://imgur.com/SMoUmAr
On an updated discourse.


(Erick Guan) #3

Some views are removed recently. Should be fixed right now.


#4

Hi, Can I start using the plugin now?


(@SenpaiMass) #5

Yes u can, it works good as of now, i am running this on my MOE (Moh-ay) community. Few things if you are using a light theme this plugin works good with it but in case if you are using a dark theme.

You need to change CSS
here is the CSS which i am using for my dark theme.

https://p.pewd.cf/unuvepizid.sm

it should work fine.


#6

Thanks guys, this is great.

Just 2 things that don’t seem to work:

  1. The UX does not say anywhere “input link” or similar, so I think this will generate confusion for users
  2. The link box seems to be on font:white, it records the link when I hit save, but it does not show any text when I type in it


(Erick Guan) #7

I suppose it’s a cache problem. Or assets pipeline does not include proper files. Either way, it’s peculiar.

What’s your Discourse version? I am sure ./launcher restart or ./launcher rebuild can help.

It’s a screenshot on my dev environment.


#8

Ok, will check tomorrow if doing ./launcher restart or rebuild works

I did check http://beta.danskdynamit.com/ and they seem to have the same issue when I try to submit a link.

I have also tried to check my link submission page on another PC (maybe a browser cache issue I though) and nop, issue is still there.

But I will check your solution and revert back here.


#9

OK, did a rebuild, now I can see the topic sentence, but not the link sentence/text


(Erick Guan) #10

OK. It’s time to find out what happened.

What’s your browser version/Discourse version?
Is there any errors on your browser’s developer console?
Is there any errors on Discourse’s /logs?

Here is my screenshot on Dansk Dynamit (Chrome 50.0 on OS X 10.11.4):


(@SenpaiMass) #11

Hello.

On the Customize CSS can you add

#reply-control input.featured-link-field {
  margin-top: 6px;
  margin-right: 10px;
  box-sizing: border-box;
  width: 99%;
  padding: 5px;
  border: 1px solid white;
  @media (min-width: 992px) {
    & {
      width: 860px;
      color: #000;
      padding: 15px 10px;
    }
  }
}

and see if it fixes it.


#12

Thanks, but that did not work either


#13

Console error:

Discourse v1.6.0.beta3 +37

Firefox 44.0.2


(Erick Guan) #14

Yes, I managed to repro the problem. The markup here is right.

I believe it’s a bug in FF44, even FF46.

Changing window width does help in some way. After a bit research, it’s caused by border-box. Though I wonder what happened.

Anyway, this should be fixed by a subsequent commit now.


#15

I just checked the demo website and found that the featured link is dofollow. Can you make it nofollow or like producthunt (short link)?


(Erick Guan) #16

The link is not included in crawler’s view. It’s only visible to your user instead of bots.

I don’t remember if Discourse supports advance bot running headless browser with JavaScript bots. You don’t really need to worry about that now. I’ll look into that with next bugfix.


(Suppayami) #17

It seems that the plugin is not working in new build of Discourse (v1.6.0.beta11 +153)


(Philip Battin) #18

We’re also experiencing problems with the link since we updated to the latest version.
Anybody know what is causing the problem?


(Erick Guan) #19

I just pushed a update. Does the new version fix the problem for you? Leave any replies if encounter problems :slight_smile:


(Philip Battin) #20

it works!
However, it seems like the link is not attached to related topics