Quantcast
Channel: Discourse Meta - Latest topics
Viewing all 60613 articles
Browse latest View live

Copying categories

$
0
0

@manvfat wrote:

I'm creating lots of private categories for smaller groups and, frankly, it's a ballache. Is it possible to effectively create one master category and then paste them as and when needed?

It would be great if I could copy the category settings and the default posts that are in there when the group starts up.

Also - is it possible to automate membership of a group based on how many time a user posts over 24 hours? If they fail to post twice then they lose membership of the group?

Thanks in advance!

Posts: 1

Participants: 1

Read full topic


Did not receive "First Flag" badge

$
0
0

@purldator wrote:

I just noticed I was never awarded the First Flag badge. I've flagged posts and to my knowledge at least one was agreed upon and not deferred. My PMs show ~5 agreed flags. Unless I do not understand what the badge requirements are?

Posts: 6

Participants: 3

Read full topic

Discourse in the Windows App Store

$
0
0

@brahn wrote:

This is something that I thought would be an interesting experiment when I first heard about Project Westminster via Publish responsive websites to the Windows Store with Project Westminster

Now that Windows 10 is out and the app dev SDK is updated... here is my discourse instance in the windows app store - ClarionHub (Windows 10 only!)

Ignore for now my efforts at creating icons and lack of details in the app store meta data which I plan to fix up when I get a chance smile

There are a few issues of course since discourse is designed to run in a standard browser, like the lack of a "Back" button, but overall it works quite well. The workflow for logging in is not so great as it opens a new instance of the app in order to do the oAuth stuff but I think that might be fixable with the correct configurations. Clicking on links that are supposed to open in a new window results in a new instance of the "app" so that is a strange experience and would need to be fixed somehow. What would be great is if there was a way to trigger the OS notifications which should be possible as well but probably needs a plugin (?).

Posts: 1

Participants: 1

Read full topic

Users list not complete

$
0
0

@adrianpear5on wrote:

Hi

I recently setup a Discourse hosted instance at www.accountingtalk.co.uk. In Admin I can see the full list of users but when selecting Users from the hamburger I only see myself and Discourse Support.

Can anyone please explain?

Thanks
Adrian

Posts: 5

Participants: 3

Read full topic

Purpose of admin-nav on admin plugins page

$
0
0

@Simon_Cossar wrote:

Is there a purpose to having the stacked admin navigation on the admin>plugins page? Looking at the code in plugins.hbs it seems that all it can do is display one item, and that item is for the page the the user is currently on.

<div class="admin-nav pull-left">
  <ul class="nav nav-stacked">
    {{nav-item route='adminPlugins.index' label="admin.plugins.title"}}

    {{#each route in adminRoutes}}
      {{nav-item route=route.full_location label=route.label}}
    {{/each}}
  </ul>
</div>

Posts: 2

Participants: 2

Read full topic

"New Topic" button on tag results page?

$
0
0

@downey wrote:

Related to this:

We had some users browsing tags and asked why there wasn't a "New Topic" button on a tag list page (such as this one). It might help to prevent tag proliferation and encourage use of existing tags.

Similar to new topics created from a category listing page, this button would pre-populate the relevant tag in the composer window.

Posts: 1

Participants: 1

Read full topic

How do you edit the language file?

"Who's online" widget in Discourse - my version

$
0
0

@meglio wrote:


Live demo: http://forum.kozovod.com/

Disclosure

This is my take on showing a simple "who's online" list in my Discourse setup.

NB. This solution does not follow best practices to add functionality to Discourse!
However, I wanted it a lot and had very little time, so I used the tools I knew and had at my hands.

Drawbacks of this solution

  • It uses React.js instead of Ember. Simply because I don't know Ember, don't like it and failed learning it in a short period of time (it was the opposite with React).
  • It uses WordPress with Twig Anything plugin - the only reason being that presence information is not available
  • It does not use Discourse message bus. It makes an HTTP request every X seconds or minutes as by your configuration. If you have plenty plenty of users online, this might be bad for your service traffic channel.

Good side

  • It works!
  • It is easily customizable!
  • It is what my Discourse community needs - here and now!
  • It works fine on mobiles as well - tested.

Step 1. Customization section in Discourse

Create a new customization and name it e.g. "React.js":

</head> section:

<script src="https://fb.me/react-with-addons-0.13.3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.6.15/browser.min.js"></script>

First line loads react, second line loads in-browser compiler for React components. Both are CDN-hosted.

CSS section

For now, use this. Feel free to customize when you got it working:

.who-is-online-user {
    display: inline-block;
    padding: 0 3px;
}
.who-is-online-status {
    display: inline-block;
    margin-right: 2px;
    font-size: 28px;
    vertical-align: middle;
}
.who-is-online-status-online {
    color: green;
}
.who-is-online-status-idle {
    color: orange;
}
.who-is-online-prefix-text {
    color: white;
    background-color: gray;
    display: inline-block;
    margin-right: 4px;
    padding: 1px 4px;
}

Copy the same CSS code to the mobile CSS section.

</body> section

<section id="who-is-online-widget"></section>

<script type="text/babel">

var WhoIsOnlineWidget = React.createClass({
    getInitialState: function() {
        return {
            updating: false,
            data: []
        };
    },
    updateUsersList: function() {
        if (this.state.updating) {
            return;
        }
        var me = this;
        this.setState({updating: true}, function() {
            jQuery.ajax(this.props.apiUrl, {
                method: "POST"
            })
            .done(function(data) {
                // On success, update the list
                if (!data || !data.code || data.code !== 'OK' || !data.result) {
                    return;
                }
                me.setState({data: data.result});
            })
            .fail(function() {
                // On failure do nothing
            })
            .always(function(){
                // Always plan the next fetch
                me.setState({updating: false}, function() {
                    setTimeout(me.updateUsersList, me.props.updateSeconds);
                });
            });
        });
    },
    render: function() {
        var items = [];
        for (var i = 0; i < this.state.data.length; i++) {
            var user = this.state.data[i];
            items.push(
                <div className="who-is-online-user">
                    <span className={"who-is-online-status who-is-online-status-"+user.status}>{"\u2022"}</span>
                    <a className="userNickname"
                        href={user.user_absolute_url}>
                        {user.user_from_api.username}
                    </a>
                </div>
            );
        }
        var prefixText = null;
        if (this.props.prefixText.length > 0) {
            prefixText = (
                <span className="who-is-online-prefix-text">
                    {this.props.prefixText}
                </span>
            );
        }
        return (
            <div className="container">
                {prefixText}
                {items}
            </div>
        );
    }
});

React.render(
    <WhoIsOnlineWidget
        apiUrl="http://kozovod.com/api-endpoint/whos-online/"
        updateSeconds={300000}
        prefixText="Who's online"/>,
    document.getElementById('who-is-online-widget'),
    function(){
        this.updateUsersList();
    }
);

</script>

apiUrl="http://kozovod.com/api-endpoint/whos-online/" - URL to the API that we will build in WordPress, details follow.

updateSeconds={300000} - how often to update the online status in user browser, in milliseconds. I set it to 5 minutes to avoid any trouble with my very little WordPress server instance.

prefixText="Who's online" - the text you would like to be shown in a gray box.


Step 2. New API Endpoint in WordPress

Yes, it sounds really weird, but it works:

  1. I'm using WordPress to fetch info from Discourse with using my admin api key
  2. In WordPress, I'm using Twig Anything plugin and its API Endpoints add-on to build my own API in WordPress.
  3. From user browser who's exploring Discourse, I query my WordPress API to get the info I need.

Why I did so:

  1. To keep Discourse admin API hidden from public. I could request the API directly from user browser, but it would reveal API key, which is no-no.
  2. It saved me time to use the tools I already have in place, i.e. the Twig Anything plugin and its add-ons.

Data Source configuration

Create a Twig Template in your WordPress and configure its data source section as on the following screenshot:

The URL is:

http://your-discourse.com/admin/users/list/active.json?api_username=XXX&api_key=YYY

XXX your Discourse admin username
YYY your Discourse api key


Twig Template

Here is the template code. Note that it outputs a JSON-array, which we are going to make a part of API responst with using the API Endpoints add-on:

[
{% set num = 1 %}
{% for user in data if (not user.suspended and not user.blocked and user.username != 'api_ru') %}
  {% if num <= 11 %}

    {% if not loop.first %},{% endif %}
    {


    {% if date(user.last_seen_at) > date('-30minutes') %}
      "status": "online",
    {% else %}
      "status": "idle",
    {% endif %}
    "avatar_absolute_url": "http://forum.kozovod.com{{ user.avatar_template|replace({'{size}':'22'}) }}",
    "user_absolute_url": "http://forum.kozovod.com/users/{{user.username_lower}}",
    "user_from_api": {{user|json}}


  }

  {% endif %}
  {% set num = num + 1 %}
{% endfor %}
]

A few notes:

user.username != 'api_ru' - I'm using a separate admin user api_ru in Discourse for API calls. This check makes sure it won't appear in the resulting list of online users.

{% if num <= 11 %} - up to 11 users in the list

http://forum.kozovod.com - don't forget to change to your own Discourse URL in all links

{% if date(user.last_seen_at) > date('-30minutes') %} - users seen in last 30 minutes will be shown with a green circle; the rest will have an orange circle. Adjust this timeframe to your needs.


API Endpoint in WordPress

Create a new API Endpoint in Settings -> API Endpoints in your WordPress admin panel:

A few notes:

Success and Error templates are there for you by default

In the HTTP headers section, don't forget the following 2 headers:

Content-Type: application/json; charset=utf-8
- this one will indicate that the API output is JSON

Access-Control-Allow-Origin: *
- this one will allow for API to be requested from outside of your WordPress domain


API Output

Your new API endpoint will return JSON of the following structure:


Done!

Posts: 9

Participants: 3

Read full topic


Translation error prevents email from being sent

$
0
0

@ndalliard wrote:

Yeah, see the title. It seems like I just can send invites from threads and the invitation function from my profile itself doesnt sent any email even tough I am able to enter an email and click on the button and I get the message, that he email was sent. I was also looking in the administration panel and the emails from the invites on the thread are listed and the others not.

Funny thing: I invited me@example.org on my profile. Didnt get an email. I invited me@example.org on a thread he got an email. I resent the email on the profile to me@example.org and he got a second invite.

Yeah. Does this function work here or do you all use (if so) the invitions on the thread? Maybe its a bug?!

Thanks!

Edit: Here the error:

Posts: 5

Participants: 4

Read full topic

Code gets formatted as one line when using invalid language code

$
0
0

@DoctorJones wrote:

I was trying to post code samples on another discourse forum and couldn't get it to format it on multiple lines.

Here's the sample

    if ((this.LocalResident) && (this.ResortAmbassador) && (SpecialOfferDiscount > 0) && UseSpecialOffer)
        //blah
    else if ((this.LocalResident) && (this.ResortAmbassador))
        //blah
    else if ((this.ResortAmbassador) && (SpecialOfferDiscount > 0) && UseSpecialOffer)
        //blah
    else if ((this.LocalResident) && (SpecialOfferDiscount > 0) && UseSpecialOffer)
        //blah
    else if (this.LocalResident)
        //blah
    else if (this.ResortAmbassador)
        //blah
    else if (this.SpecialOfferDiscount > 0 && UseSpecialOffer)
        //blah
    else
    {
        _CurrentDiscount = Discounts.None;
    }

It appears fine in preview, but doesn't appear correctly once posted.

It also broke subsequent code blocks.

    //get the values of all the currently applied discounts     var discounts = new[]     {         new          {              DiscountType = Discounts.LocalResident,             Discount = LocalResident ? LocalResidentDiscount : 0m,         },         new          {              DiscountType = Discounts.Amabassador,             Discount = ResortAmbassador ? ResortAmbassadorDiscount : 0m,         },         new          {             DiscountType = Discounts.SpecialOffer,             Discount = UseSpecialOffer ? SpecialOfferDiscount : 0m,         },         new          {             DiscountType = Discounts.DiscountCode,             Discount = DiscountCodeDiscount,         },     };

Posts: 13

Participants: 4

Read full topic

Unread (1) in the menu - Open directly that last unread post

$
0
0

@ndalliard wrote:

It would be great if the forum directly opens the last unread post if there is only one left. At the moment I have to click on the Unread menu butten and then from there a second time on the post itself.

Posts: 9

Participants: 4

Read full topic

Global Notice should be Red (CSS gets overwritten)

$
0
0

@ndalliard wrote:

I just asked me why the global announcement (global notice in the admin panel) isn't red because thats something I would use if there is something really important to say to all my users that should grab a lot of attention. And I looked into the CSS to change it by myself and I saw, that the red background from the global notice is overwritten by the .alert.alert-info. I think that was not the intention here or do I miss something?

(I am not sure about the bug category here on the forum, cause this does not prevent discourse to function, but it seems not typical, like it was intended, so is this category the right place for this?)

Posts: 2

Participants: 2

Read full topic

Review bar Plugin for discourse

$
0
0

@rnovino wrote:

Has anyone created a Review Plugin for discourse somewhat showing a bar graph of the ratings of a specific item, I'm planning to make my discourse site as review community.

Here is the example idea, the main code that we will type in the post is somewhat like this

Design | 80%
Features | 90%
Battery | 70%
Display | 50%
Audio | 85%

then it will generate something like this

the poll features is really intersting so I just imagine similiar execution to that smile

Posts: 2

Participants: 2

Read full topic

Has anyone added a custom footer to Discourse?

$
0
0

@Erik_Manger wrote:

Hi everyone,

Props to whomever can help. Does anyone customized the footer of Discourse to include copyright text, links, etc.?

I am looking to do this for my site but honestly cannot figure out how to properly code the footer to where it looks and works good.

All help is appreciated, right now it feels like my Discourse site is "pantless". frowning

Posts: 3

Participants: 3

Read full topic

Upgrade with discourse-tagging plugin failed, website down

$
0
0

@uwe_keim wrote:

Tried to do an upgrade through the web UI, it failed.

I then did the usual

cd /var/discourse
git pull
./launcher rebuild app

but it also failed (discourse-upgrade-failed.txt):

** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

I've found this error, scrolling up.

NoMethodError: undefined method `attributes' for TopicListItemSerializer:Class

Now my website is down and I'm really clueless.

My question:

How to approach this and bring my website back online again?

Posts: 8

Participants: 4

Read full topic


Problem embeding topics 403

$
0
0

@billybonks wrote:

Continuing the discussion from Problem Embedding Comments:

similar issue as the linked topic, but none of the solutions seem to work

embed_url
http://discourse.unearthing.io/embed/comments?embed_url=http%3A%2F%2Funearthing.io%2Fnew-features-ember-2-0%2F

post url
http://www.unearthing.io/new-features-ember-2-0/

Config

Posts: 1

Participants: 1

Read full topic

Footer is missing in several places around the site

$
0
0

@downey wrote:

Continuing the discussion from Has anyone added a custom footer to Discourse?:

Reproduce steps:

  • As an admin, add some HTML for a footer to your site. Save settings.

Expected

  • Footer will be at the bottom of the page whenever the bottom is reached (excepting infinite scrolling).

Actual:

There are several pages where the admin-customized footer HTML is not rendered:

  • error pages
  • search result pages
  • list of all tags
  • list of a specific tag
  • user leaderboard
  • Any others? (If anyone finds them please add to this topic.)

Posts: 2

Participants: 2

Read full topic

Babble - A Chat Plugin

$
0
0

@riking wrote:

I've been playing around with this for the past few days, and gotten something resembling halfway decent together.

I've put the code up at http://www.github.com/gdpelican/babble (It's currently a functioning plugin, so you could in theory install on a discourse instance today, although I wouldn't recommend it just yet.)

There's also a TODO.md file in there with a rudimentary roadmap, and it's, of course, open source, so help / feedback is welcome.

Posts: 26

Participants: 7

Read full topic

Is it possible to add a user action event listener?

$
0
0

@KevinWorkman wrote:

I run a little site that uses Discourse as a forum.

I'm adding a little bit of gamification to the site, in the form of points. Points are simply a total of various actions the user can take on the site, as well as actions the user can take on the forum: things uploaded to the site + comments left on the site + topics posted on the forum + likes received on the forum, etc.

Right now, I use the Discourse api (/users/UserName.json) to get those actions. I simply poll this every 5 seconds to detect changes to the user's points.

I know this is stupid, and I'd like to use long polling instead. I can set that up for actions taken on my site, but the question is: how do I detect when a user takes an action on the forum?

My googling shows up various discussions on "web hooks", but I can't tell if there's an "official" way to implement this.

Just to be clear, what I'm hoping for in the best case is a way that I can go to the admin panel, then specify urls on my site that discourse will post to when a user takes a specific action (such as starting a topic or receiving a like).

Posts: 1

Participants: 1

Read full topic

Best blog software for a startup

$
0
0

@justin_gordon wrote:

I've got a new startup effort, and as much as I like personal blogging using jekyll, I really need something more user friendly for the business folks to create articles.

What's the best recommendation for easy to use blogging linked to a discourse forum for discussion?

Wordpress with the discourse plugin?

@codinghorror, have you considering offering such an all-in-one service?

Thanks in advance for any advice. This is the sort of thing you don't want to have to change in the near future once you set this up.

Just saw this:

Seems that square.com is using ghost.com, and is @codinghorror.

Posts: 4

Participants: 3

Read full topic

Viewing all 60613 articles
Browse latest View live




Latest Images