Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups
    1. Home
    2. xuso
    X
    • Profile
    • Following 0
    • Followers 0
    • Topics 5
    • Posts 21
    • Best 5
    • Groups 0

    xuso

    @xuso

    6
    Reputation
    610
    Profile views
    21
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    xuso Follow

    Best posts made by xuso

    • How to create a new route for a new custom page

      Hi!

      I'm developing a plugin that allows a user to ignore others and hide his posts in every topic. That part is done, now I want to create a new page to display the list of ignored users in the profile. I've done this:

      app.get('/user/:userslug/ignored', params.middleware.buildHeader, controllers.accounts.getIgnored);
      app.get('/api/user/:userslug/ignored', controllers.accounts.getIgnored);
      

      Where .getIgnored equals:

      controllers.accounts.getIgnored = function (req, res, next) {
      	if (!req.user) {
      		return helpers.notAllowed(req, res);
      	}
      
          /* Retrieve the ignored users from DB... */
      
      	res.render('account/ignored', {
      		userslug: req.params.userslug,
      		ignored: users
      	});
      
      }
      

      Ok. Now, if I go to the URL /user/admin/ignored it displays my template and my ignored users perfectly. So far, so good. The problem comes when I try to access that new page from a link (i.e. the profile dropdown), then the redirect doesn't work. I've figured out that the problem is I defined the routing on server-side but not on client-side, so... ΒΏHow can I get that? Basing on the homepage plugin I suppose that I have to change the client routing by using the hook filter:templates.get_config and add this:

      Plugin.changeClientRouting = function (config, callback) {
      	config.custom_mapping['^user/.*/ignored'] = 'account/ignored';
      	callback(null, config);
      };
      

      But it doesn't seem to work. 😞

      ΒΏAny help?

      Thank you πŸ™‚

      posted in NodeBB Development
      X
      xuso
    • Maximum Post Length

      Captura de pantalla 2015-02-01 a las 19.29.17.png

      Now there is only max length for title but I think it should be also for posts.
      Actually, IMO, it's not just a feature request, it could be even a security problem to allow a user to post a message with hundreds of thousands of characters and then try to parse it with each plugin (that's what happened to me).

      posted in Feature Requests
      X
      xuso
    • RE: Navigating to a different page after selecting "New Topic" or "Reply" doesn't close the New Topic/Reply box

      I think it is, so you can move across different pages without losing whatever you wrote. But maybe would be better minimize it to the bottom bar.

      posted in Bug Reports
      X
      xuso
    • How can I get the list of topics an user is following?

      I mean the topics you mark with this button:

      Captura de pantalla 2015-01-10 a las 15.23.24.png

      Is there any way to obtain all those topics?

      Thanks.

      posted in NodeBB Development
      X
      xuso
    • Shouldn't be the Watched Topics list, sorted by last message?

      Screenshot at ene 30 20-56-27.png

      posted in NodeBB Development
      X
      xuso

    Latest posts made by xuso

    • RE: Efficiently developing a theme

      Start NodeBB with ./nodebb watch and it will reload automatically whenever detects a change.

      posted in Technical Support
      X
      xuso
    • RE: Maximum Post Length

      Up πŸ™‚

      @Administrators

      posted in Feature Requests
      X
      xuso
    • Maximum Post Length

      Captura de pantalla 2015-02-01 a las 19.29.17.png

      Now there is only max length for title but I think it should be also for posts.
      Actually, IMO, it's not just a feature request, it could be even a security problem to allow a user to post a message with hundreds of thousands of characters and then try to parse it with each plugin (that's what happened to me).

      posted in Feature Requests
      X
      xuso
    • RE: Shouldn't be the Watched Topics list, sorted by last message?

      @julian said:

      What's it currently sorted by, initial post time? πŸ˜„

      This:

      @baris said:

      Sorted by the time you watched the topic.

      posted in NodeBB Development
      X
      xuso
    • RE: Shouldn't be the Watched Topics list, sorted by last message?

      ping @julian @psychobunny @baris πŸ™‚

      posted in NodeBB Development
      X
      xuso
    • Shouldn't be the Watched Topics list, sorted by last message?

      Screenshot at ene 30 20-56-27.png

      posted in NodeBB Development
      X
      xuso
    • RE: Automatic "Scroll to top" after a topic finishes loading

      Thanks πŸ˜‰

      posted in Bug Reports
      X
      xuso
    • RE: Problem with IOS/safari

      Try to clear cookies.

      posted in Bug Reports
      X
      xuso
    • RE: Automatic "Scroll to top" after a topic finishes loading

      Please, any solution for this? 😊
      @psychobunny @julian

      posted in Bug Reports
      X
      xuso
    • RE: Shouldn't topics have different titles?

      Totally agree.

      posted in Feature Requests
      X
      xuso