Problem with new recent topics widget Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
3 posters

    Problem with new recent topics widget

    avatar
    darki
    Forumember


    Posts : 254
    Reputation : 10
    Language : German, english

    Solved Problem with new recent topics widget

    Post by darki Thu Oct 15, 2015 4:43 pm

    Hi,

    @Ange Tuteur helped me in this topic:
    https://help.forumotion.com/t143844-add-time-and-author-to-recent-topics-of-a-specific-subforum

    Now I realize there is a "bug". All looks fine, but by clicking on a topic title in the new widget for recent topics of a specific subforum the topic loads with an URL like this:
    /t4114-wifi-matches-der-sb-user?change_version=prosilver

    As you can see, "?change_version=prosilver" will automatically added to the URL of the topic. Through this fact, the whole forum changes his appearance because of changing style to prosilver.

    Ange or anybody else an idea, what the reason could be?
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: Problem with new recent topics widget

    Post by Ange Tuteur Thu Oct 15, 2015 5:19 pm

    Hi @Darki,

    This is my mistake, I forgot to remove the version query. Remplace the main script with the following script and it should get rid of that.
    Code:
    window._getNewest = function(o) {
      if (!o.node) return false;
      if (!o.forum) o.forum = 1;

      if (!o.amount) o.amount = 5;

      o.node = document.getElementById(o.node);

      if (o.node) {
        $.get('/f' + o.forum + '-?change_version=prosilver', function(d) {
          var last = $('.forumbg:not(.forumbg.announcement) .row', d), content = document.createElement('DIV'), i = 0;
         
          for (; i < o.amount; i++) {
            if (!last[i]) break;
            else {
              content.appendChild($('.topictitle', last[i])[0]);
              content.appendChild($('.lastpost', last[i])[0]);

              for (var a = content.getElementsByTagName('A'), i = 0, j = a.length; i < j; i++) a[i].href = a[i].href.replace(/change_version=prosilver/, '');
            }
          }

          o.node.appendChild(content);
        });
      }
    };
    avatar
    darki
    Forumember


    Posts : 254
    Reputation : 10
    Language : German, english

    Solved Re: Problem with new recent topics widget

    Post by darki Thu Oct 15, 2015 5:24 pm

    Yep, now it works. Thanks for your fast bugfixing. Smile

    Solved.
    brandon_g
    brandon_g
    Manager
    Manager


    Male Posts : 10113
    Reputation : 923
    Language : English
    Location : USA

    Solved Re: Problem with new recent topics widget

    Post by brandon_g Thu Oct 15, 2015 5:26 pm

    Topic marked solved and archived ~ brandon_g



    Problem with new recent topics widget Brando10
    Remember to mark your topic Problem with new recent topics widget Solved15 when a solution is found.
    General Rules | Tips & Tricks | FAQ | Forgot Founder Password?

    Problem with new recent topics widget Scre1476
    Team Leader
    Review Section Rules | Request A Review | Sticker Points