![]() |
JS & external.php for vB3
Has anyone from here played around with this yet? I have a problem with the code I put together with a little help from vbulletin.com.. It grabs the post, but not the lastest post.. its always a couple of post behide and just now its showing the wrong post title, but the right poster... Strange huh? anyone has any idea of what this problem might be?
Note: I have this code repeated 3 times on the same page, but with different forum ids of course.. could this be a problem, or not? Thanks MOD; sorry if I'm not suppose to ask vb3 questions here yet.. |
I have the following code:
<script type="text/javascript"src="http://www.cogumelosmagicos.org/forum/external.php?forumids=30,31,32,38,40&type=js"> </script> <script type="text/javascript"> <!-- for (i = 0; i < 1; i++) var titleAsString = new String(threads[i].title); if (titleAsString.length > 27) { var newTitle = titleAsString.substring(0,27); document.write("Tópico: <a href=\"http://www.cogumelosmagicos.org/forum/showthread.php?threadid="+threads[i].threadid+"\">"+newTitle + "..."+"</a><br />Autor: <a href=\"http://www.cogumelosmagicos.org/forum/member.php?u="+threads[i].poster+"\">"+threads[i].poster+"</a> - "+threads[i].threadtime+"<br />"); } else { document.write("Tópico: <a href=\"http://www.cogumelosmagicos.org/forum/showthread.php?threadid="+threads[i].threadid+"\">"+titleAsString+"</a><br />Autor: <a href=\"http://www.cogumelosmagicos.org/forum/member.php?u="+threads[i].poster+"\">"+threads[i].poster+"</a> - "+threads[i].threadtime+"<br />"); } //--> </script> |
Uh, almost forgot to ask.. was anyone able to link to the poster? I can't get the poster id to link to it... just the poster username as you can see on part of the code:
Autor: <a href=\"http://www.cogumelosmagicos.org/forum/member.php?u="+threads[i].poster+"\">"+threads[i].poster+"</a> |
*bump* :)
|
All times are GMT. The time now is 06:28 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|