Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 04 Sep 2009, 03:54
PGAmerica PGAmerica is offline
 
Join Date: Mar 2008
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.
Reply With Quote
  #2  
Old 04 Sep 2009, 14:39
kevcj's Avatar
kevcj kevcj is offline
 
Join Date: Mar 2007
Real name: Kevin
Originally Posted by PGAmerica View Post
I saw a mod along time ago that showed how to add vBulletin info on non-vBulletin pages.
You do not need a modification for this. All you need to do is turn the feature on and put a script on the site you want to display the feed on.

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.
__________________
political forum

Last edited by kevcj; 04 Sep 2009 at 14:45.
Reply With Quote
  #3  
Old 04 Sep 2009, 15:34
PGAmerica PGAmerica is offline
 
Join Date: Mar 2008
Thank you for this info. I will look into it now.

--------------- Added 04 Sep 2009 at 16:01 ---------------

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?

Last edited by PGAmerica; 04 Sep 2009 at 16:01. Reason: Auto-Merged DoublePost
Reply With Quote
  #4  
Old 04 Sep 2009, 17:49
kevcj's Avatar
kevcj kevcj is offline
 
Join Date: Mar 2007
Real name: Kevin
Originally Posted by PGAmerica View Post
Thank you for this info. I will look into it now.


I did a search as you suggested, but I was unable to get code to display the latest posts in specific forums.
Here is the code to display only certain forum sections on an external page

<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.
__________________
political forum
Reply With Quote
  #5  
Old 05 Sep 2009, 01:35
PGAmerica PGAmerica is offline
 
Join Date: Mar 2008
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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This is working. The code I am using for the 2nd pull (Forum ID 3 and ID4) is as follows:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This is also working. The code I am using for the 2nd pull (Forum ID 9) is as follows:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

THIS IS NOT WORKING!!

Ideas?

--------------- Added 05 Sep 2009 at 05:22 ---------------

Weird! It is working now.

Is there any way to show some of the contents of the posts on the page like vbAdvanced does?

Last edited by PGAmerica; 05 Sep 2009 at 05:22. Reason: Auto-Merged DoublePost
Reply With Quote
  #6  
Old 05 Sep 2009, 05:45
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by PGAmerica View Post
Weird! It is working now.

Is there any way to show some of the contents of the posts on the page like vbAdvanced does?
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.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #7  
Old 05 Sep 2009, 14:45
kevcj's Avatar
kevcj kevcj is offline
 
Join Date: Mar 2007
Real name: Kevin
Originally Posted by PGAmerica View Post

Is there any way to show some of the contents of the posts on the page like vbAdvanced does?
Take a look at a script called "carp" and another one called "grouper" from geckotribes. Both of those scripts take rss feeds and can parse them in different ways.

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.
__________________
political forum
Reply With Quote
  #8  
Old 01 Oct 2009, 21:45
ggiersdorf ggiersdorf is offline
 
Join Date: Aug 2005
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!
Reply With Quote
  #9  
Old 01 Oct 2009, 23:07
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #10  
Old 01 Oct 2009, 23:22
ggiersdorf ggiersdorf is offline
 
Join Date: Aug 2005
Thanks Lynn might someone be able to help me achieve this?
Reply With Quote
  #11  
Old 02 Oct 2009, 00:12
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
search "latest*" in "all mods" "titles only" and you should probably find what you want.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 00:19.

Layout Options | Width: Wide Color: