How to add Recent Topics to homepage?

Solved Technical Support

Suggested Topics

  • 0 Votes
    1 Posts

    like title, how can i modify widget on "/recent" router? how can add ex: recent post, recent view... widget on this screen?

  • 0 Votes
    1 Posts

    I want to show only the widgets that have a link to the homepage. What should I do?

  • 0 Votes
    3 Posts

    I run into the same issue with nginx without any Cloudfare rules set for the forum and without any CDN active, so the webserver serves content directly.



    There should be no forward slash at the end which complies with the documentation:

    "url": "",


    here note the double slash on the first line /forum/

    The double slash solves the issue, at least during initial testing on different browsers and devices.
    Not sure if this is a Windows/nginx specific thing as the path's are set a bit different.

    [...] location /forum/ { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; # proxy_pass; proxy_pass http://io_nodes; proxy_redirect off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; }
  • 0 Votes
    7 Posts

    To restrict replies by the last reply time, you need to do two things.

    On the server side, hook into filter:topic.reply, it is passed data with the tid. Look up the last post and owner using the tid. Then, if the last post was made by the owner, and the timestamp of the last post is less then a day from now, return an error.

    On the client, you'll want to disable the reply button if the last post fulfills the same requirements above. You can use to get the information you need.

    Server filter:topic.reply hook example:

    plugin.topicReply = function (data, next) { var tid = data.tid; Topics.getLatestUndeletedReply(tid, function(err, pid) { if (err) return next(null, data); Posts.getPostFields(pid, ['timestamp', 'uid'], function (err, lastPost) { if (err) return next(null, data); Topics.isOwner(tid, lastPost.uid, function (err, isOwner) { if (err) return next(null, data); if (isOwner && lastPost.timestamp + 86400000 > { return next(new Error('Not enough time passed.')); }else{ next(null, data); } }); }); }); });

    client.js example

    $(window).on('action:ajaxify.end', function(){ // If the user is at a page with a reply button. if ($('[component="topic/reply"]').length && { var first =[0]; var last =[]; // If the last poster is the owner, // and they posted less than a day ago, // disable the reply button. if (last.uid === first.uid && last.timestamp + 86400000 > $('[component="topic/reply"]').addClass('disabled'); } });

    It's late for me, I might have messed up somewhere.

    Also, you can reduce the server code a lot by using async.waterfall and async.apply

  • 1 Votes
    9 Posts

    Thanks @pichalite it works great. @ARC also a good idea.. I will remember that for future addons..

    I replaced your fadein animation with one from animate.css (FadeInBottom) which slides the rows up and fades in at the same time which looks great when scrolling normally but looks a bit crazy when you page jump (since they all slide up at the same time causing the scrollbar to go a bit crazy 🙂 ) so i set it back to the one you added. I will experiment with it to see if the users like it or not.. Thanks for your help.