The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
External Data Provider, possible to collect post text?
Hi
I have been playing allot arround with this whole vBulletin, and I have just figured out how to use the External Data Provider option to write data to the external.php file, I also figured out how to collect that information with a JavaScript so that I can display that on any website. The thing I wanted to know is if it is possible to get the text from the first message in a post? Right now the code on my website looks like this: Code:
<script type="text/javascript" src="http://www.my-site.com/forums/external.php?forumids=2&fulldesc=1&type=js"></script> <script language="" type="text/javascript"> <!-- for (x = 0; x < 1; x++) { document.writeln("<a href=\"http://www.my-site.com/forums/showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a> (Posted By: "+threads[x].poster+" "+threads[x].threaddate+" "+threads[x].threadtime+")<br />"); } //--> </script> News (Posted By: User 01-01-1970 00:00 AM) What I would like then is the rest of the post displaying under it (right here) and not only the title and who and when posted it. I guess there can be a way to querry that as it knows the link to the page where the post is. Any response would be very appreciated and if you require any more information I will be happy to help. Thanks! |
#2
|
||||
|
||||
The full post text is not available via the external.php page. You may be able to grab the "description", but I think that is only x amount of characters. You can try it and see what you get - threads[x].description would be the term, I think.
|
#3
|
|||
|
|||
Thank for the reply on this matter, but I think that the threads[x].description only works on RSS2 and not JS as I only get a undefined message.
What I ghotugh was if there is a way to use the information threads[x].threadid collects and then use some sort of script to collect the text from that post, it is probably possible, but also not easy :S |
#4
|
||||
|
||||
Yeah, looking at the external.php page shows me that the only variables available for javascript are threadid, title, poster, threaddate, and threadtime.
If you don't mind using code, then you can just make a query in your page and spit out the results. You can find a modification that puts the Lastest X Threads on a page and grab the query/code from there for your page. |
#5
|
|||
|
|||
Any suggestions on how I will go about doing this, I actually started learning all of this last night
I had some .html know how and just plaied arround with everything else, if you could just point me in the right directions I would be very grateful. |
#6
|
||||
|
||||
Did you do a search for a modification like I said? If you find a modification, it will have the query info in it. Then, you can make a php page by reading this article - [How-To] vBulletin API Basics: Creating Custom Pages & Misc.
|
#7
|
|||
|
|||
Thanks, I will see if I can figure this out, I will get back to this if I figure it out or not.
Thanks allot again! |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|