last topics from different subforums
+2
Ange Tuteur
H.A.SS.A.N
6 posters
Page 2 of 2
Page 2 of 2 • 1, 2
last topics from different subforums
First topic message reminder :
hi friends
I need code for make wigdet to bring last topic from different subforums
at least 1 topic from each subforum when I selected by ID of these subforums
the code is similar to this http://fmdesign.forumotion.com/t229-add-news-topics-from-multiple-forums
but I need to maintain the orginal news-wigdet and make another wigdet contain news from other subforums
I hope to help me
thank u
hi friends
I need code for make wigdet to bring last topic from different subforums
at least 1 topic from each subforum when I selected by ID of these subforums
the code is similar to this http://fmdesign.forumotion.com/t229-add-news-topics-from-multiple-forums
but I need to maintain the orginal news-wigdet and make another wigdet contain news from other subforums
I hope to help me
thank u
Last edited by H.A.SS.A.N on October 23rd 2015, 11:31 am; edited 1 time in total
Re: last topics from different subforums
Try changing it to this :
- 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 = $('.alt1:has(.lastpost-avatar), tr:has(.a7lashare)', d), content = document.createElement('DIV'), i = 0;
for (; i < o.amount; i++) {
if (!last[i]) break;
else content.appendChild(last[i]);
}
o.node.appendChild(content);
});
}
};
Re: last topics from different subforums
What is it giving you ? It should return the necessary data unless it returned something you didn't want ?
Re: last topics from different subforums
on thing appear , I show wigdet on http://www.a7la-anime.com/forum is the last one
and I add this code
and this code
???
what's the problem ??
and I add this code
- 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 = $('.alt1:has(.lastpost-avatar), tr:has(.a7lashare)', d), content = document.createElement('DIV'), i = 0;
for (; i < o.amount; i++) {
if (!last[i]) break;
else content.appendChild(last[i]);
}
o.node.appendChild(content);
});
}
};
and this code
- Code:
<div id="topicbox-1" class="last-ajax-posts">
</div>
<script type="text/javascript">
_getNewest({
forum : 196,
amount : 3,
node : 'topicbox-1'
});
</script>
???
what's the problem ??
Re: last topics from different subforums
Hmm.. I think it might be due to the version change. In the script, remove ?change_version=prosilver. I'm fairly certain that's the cause. Plus it's not relevant anymore since your templates are modified.
Re: last topics from different subforums
Topic solved and archived ~ brandon_g
Remember to mark your topic when a solution is found.
General Rules | Tips & Tricks | FAQ | Forgot Founder Password?
Team Leader
Review Section Rules | Request A Review | Sticker Points
Page 2 of 2 • 1, 2
Similar topics
» Only Moderators name in SubForums
» Sorted topics in subforums
» Height of subforums
» How do I create subforums?
» subforums hide
» Sorted topics in subforums
» Height of subforums
» How do I create subforums?
» subforums hide
Page 2 of 2
Permissions in this forum:
You cannot reply to topics in this forum