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.

Problem with new recent topics widget

3 posters

Go down

Solved Problem with new recent topics widget

Post by darki October 15th 2015, 5: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?
avatar
darki
Forumember

Posts : 254
Reputation : 10
Language : German, english

http://schiggysboard.com

Back to top Go down

Solved Re: Problem with new recent topics widget

Post by Ange Tuteur October 15th 2015, 6: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);
    });
  }
};
Ange Tuteur
Ange Tuteur
Forumaster

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

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Problem with new recent topics widget

Post by darki October 15th 2015, 6:24 pm

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

Solved.
avatar
darki
Forumember

Posts : 254
Reputation : 10
Language : German, english

http://schiggysboard.com

Back to top Go down

Solved Re: Problem with new recent topics widget

Post by brandon_g October 15th 2015, 6: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
brandon_g
brandon_g
Manager
Manager

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

https://www.broadcastingduo.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum