The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Problem with new recent topics widget

View previous topic View next topic Go down

Solved Problem with new recent topics widget

Post by darki on October 15th 2015, 5:43 pm

Hi,

@Ange Tuteur helped me in this topic:
http://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?

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 on 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
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Problem with new recent topics widget

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

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

Solved.

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 on October 15th 2015, 6:26 pm

Topic marked solved and archived ~ brandon_g


Remember to mark your topic when a solution is found.

brandon_g
Support Moderator
Support Moderator

Male Posts : 5357
Reputation : 489
Language : English
Location : USA

http://broadcastingduo.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


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