The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Latest vBulletin Posts on a Non-vBulletin Page
I saw a mod along time ago that showed how to add vBulletin info on non-vBulletin pages. It would allow me to do something like vbAdvanced does (latest posts, etc) without using vbAdvanced. I do not need all the features of vbAdvanced and want alot more control of the look and feel.
Does anybody know where these instructs are? I look around and cannot seem to find it. |
#2
|
||||
|
||||
Quote:
If you want to look it up, its called the "external data provider." Here is where to find it at. Step 1 - VB admin control panel - left column - vb options - vb options - External Data Provider - Enable External Javascript - Yes - Save. Step 2 - Then go to the webpage you want to display the recent post on and add this code. <script type="text/javascript" src="http://www.your forum address.com/forum/external.php?&type=js"></script> <script language="" type="text/javascript"> <!-- for (x = 0; x < 15; x++) { document.writeln("*<a href=http://www.your forum address.com/forum/showthread.php?t="+threads[x].threadid+">"+threads[x].title+"</a><br />"); } //--> </script> That will display the 15 most recent forum threads on your external page. Just for the fun of it, I inserted a * to separate the links. Lets say you want 5 post instead of 15, just replace that 15 in the code with a 5. You can see it here in the left column of this site - its feeding the most recent post from the VB forum - http://www.elgms.com/ That should get you started. If you need more inforamtion, go to vbulletin.com and look up "External Data Provider" - there have been several examples posted over there. You can also define which forum sections you want to display from. And I have that option set on another one of my sites. Where only post from certain forum sections are displayed. |
#3
|
|||
|
|||
Thank you for this info. I will look into it now.
--------------- Added [DATE]1252080062[/DATE] at [TIME]1252080062[/TIME] --------------- Well, it works perfectly with your code. I did a search as you suggested, but I was unable to get code to display the latest posts in specific forums. My goal is twofold: 1) Display the contents of the latest post (including the post title)in 1 specific forum on my main page (the news forum). Actually, preferably the 1st 50 characters with a link to the full post. 2) Display the contents of the latest post (including the post title) in 2 specific forums on my main page. Actually, preferably the 1st 25 characters with a link to the full posts. Is this even possible? |
#4
|
||||
|
||||
Quote:
<script type="text/javascript" src="http://www.your forum address.com/external.php?forumids=49,108,11,13,12&type=js"></script> <script language="" type="text/javascript"> <!-- for (x = 0; x < 15; x++) { document.writeln("*<a href=http://www.your forum address.com/showthread.php?t="+threads[x].threadid+">"+threads[x].title+"</a><br />"); } //--> </script> Notice in this second example there is some extra code in the first part ?forumids=49,108,11,13,12&type=js Just change those numbers to the forum section you want to display. I use both of the codes on two different wordpress blogs. That is how I came up with them so fast. I just copied them out of my site and posted them here. If they work for me, they will work for u. |
#5
|
|||
|
|||
It is working. I have placed your script 3 times on my page to pull in posts for news, forum 3&4 and also forum 9. The first 2 are working, but the last on is not. See for yourself at http://www.jonandchuck.com.
The code I am using to pull in the "News" (forum ID #2) is as follows: Code:
<script type="text/javascript" src="/forums/external.php?forumids=2&type=js"></script> <script language="" type="text/javascript"> <!-- for (x = 0; x < 15; x++) { document.writeln("<li><a href=/forums/showthread.php?t="+threads[x].threadid+">"+threads[x].title+"</a></li>"); } //--> </script> Code:
<script type="text/javascript" src="/forums/external.php?forumids=3,4&type=js"></script> <script language="" type="text/javascript"> <!-- for (x = 0; x < 15; x++) { document.writeln("<li><a href=/forums/showthread.php?t="+threads[x].threadid+">"+threads[x].title+"</a></li>"); } //--> </script> Code:
<script type="text/javascript" src="/forums/external.php?forumids=9&type=js"></script> <script language="" type="text/javascript"> <!-- for (x = 0; x < 15; x++) { document.writeln("<li><a href=/forums/showthread.php?t="+threads[x].threadid+">"+threads[x].title+"</a></li>"); } //--> </script> Ideas? --------------- Added [DATE]1252128122[/DATE] at [TIME]1252128122[/TIME] --------------- Weird! It is working now. Is there any way to show some of the contents of the posts on the page like vbAdvanced does? |
#6
|
||||
|
||||
Not through using the javascript method you are using, no. If you want a post preview, you will have to use queries to grab this information for your page.
|
#7
|
||||
|
||||
Quote:
Carp is free and can display only rss2 feeds. Grouper is a commercial grade solution and can display all kinds of feeds. Your supposed to be able to display just the title, part of the feed or the whole article using those 2 scripts. Their very flexible in the ways you can set them up. |
#8
|
|||
|
|||
Sorry to jump on this late, but Im trying to use this as well however I was wondering if there is a way to make the newest post or the newest reply in a post to jump the thread to the top again?
Im trying to say the last 10 active discussions. If one happens to be a new post fine, if its a 30 day old post and someone replies I want that to bump up to the top of the list again.. is that possible?? thanks in advance! |
#9
|
||||
|
||||
RSS feeds show the latest threads. So, if you want to do latest posts, you will probably have to use another method like query the database.
|
#10
|
|||
|
|||
Thanks Lynn might someone be able to help me achieve this?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|