Jump to content
  • 0

IPB Tracker feed in sidebar block


Mumbles

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  127
  • Reputation:   36
  • Joined:  01/21/13
  • Last Seen:  

Hello,

I'm aware that the feed displaying the most recent posts from the Tracker in the sidebar is a custom modification; I've done a fair amount of searching for something similar, to no avail. There isn't really a section here for this type of request, but if anyone would be willing to share this code with me, I would greatly appreciate it.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  127
  • Reputation:   36
  • Joined:  01/21/13
  • Last Seen:  

Its a rediculously clunky piece of JavaScript with an RSS feed, that's all.

 

I could have guessed that much lol. At this point, I'm more requesting the actual code rather than how to write it.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  127
  • Reputation:   36
  • Joined:  01/21/13
  • Last Seen:  

The code we have is literally an rss feed - Perhaps ask Ind for his original version from the Hercules boards, as he's the person who wrote it.

 

There's also several IPB hooks that help you: Custom Sidebar Blocks, RSS Block, etc

 

I see. I'll try and figure out how to pull an RSS feed from the Tracker, then. I've already been using (e32) Custom Sidebar Blocks and IP.Content Blocks to try and emulate it, but the extra information about it reading from an RSS feed was helpful. Thank you.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  311
  • Reputation:   46
  • Joined:  11/06/11
  • Last Seen:  

Sorry for bumping.

 

Mumbles do you have any solutions?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  311
  • Reputation:   46
  • Joined:  11/06/11
  • Last Seen:  

http://board.playragnarok.ws/

 

That works well <3 thanks!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  127
  • Reputation:   36
  • Joined:  01/21/13
  • Last Seen:  

function writeBugs() {
	if (xhr_b.readyState < 4) //not ready?don't try to output nothing then...
		return;
	var postsBugs = xhr_b.responseXML.getElementsByTagName('item');//get content.

	docBugs = document.getElementById('rrsvnbugs');//where we'll put the html code?

	var html = '';


	html += '<ul class="ipsList_withminiphoto">';
	for (var i = 0; i < postsBugs.length && i < 5; i++) {
		html += '<li class="clearfix"><div class="list_content" style="margin-left:4px;"><strong><a title="'+read(postsBugs[i], 'title')+'" class="ipsType_small" rel="bookmark" href="'+read(postsBugs[i], 'link')+'">'+ ParseContent(read(postsBugs[i], 'title')) +'</a></strong><span class="desc ipsType_smaller"> - '+makeDate(read(postsBugs[i], 'pubDate')) +'</span></div></li>';
	}
	html += '</ul>';
	
	docBugs.innerHTML = html;//throw our html into the element
}
var docBugs;
document.writeln('<div class="ipsSideBlock clearfix __xXrecent20topics"><h3><a href="/board/tracker/" target="_blank">Recent Bugs</a></h3><div class="_sbcollapsable" id="rrsvnbugs"></div></div>');

var xhr_b = makeXHR();
xhr_b.open('GET', './index.php?app=core&module=global&section=rss&type=tracker&id=1');//first we write down the stuff for the news
xhr_b.onreadystatechange = writeBugs;
xhr_b.send(null);

This is a straight copy/paste.

 

 

I ended up using something fairly similar. Thanks Akkarin!

Link to comment
Share on other sites

×
×
  • Create New...