Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-04-2009, 02:54 AM
PGAmerica PGAmerica is offline
 
Join Date: Mar 2008
Posts: 405
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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 09-04-2009, 01:39 PM
kevcj's Avatar
kevcj kevcj is offline
 
Join Date: Mar 2007
Location: East Texas
Posts: 334
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
Reply With Quote
  #3  
Old 09-04-2009, 02:34 PM
PGAmerica PGAmerica is offline
 
Join Date: Mar 2008
Posts: 405
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #4  
Old 09-04-2009, 04:49 PM
kevcj's Avatar
kevcj kevcj is offline
 
Join Date: Mar 2007
Location: East Texas
Posts: 334
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
Reply With Quote
  #5  
Old 09-05-2009, 12:35 AM
PGAmerica PGAmerica is offline
 
Join Date: Mar 2008
Posts: 405
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
This is working. The code I am using for the 2nd pull (Forum ID 3 and ID4) is as follows:
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>
This is also working. The code I am using for the 2nd pull (Forum ID 9) is as follows:
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>
THIS IS NOT WORKING!!

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?
Reply With Quote
  #6  
Old 09-05-2009, 04:45 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
Reply With Quote
  #7  
Old 09-05-2009, 01:45 PM
kevcj's Avatar
kevcj kevcj is offline
 
Join Date: Mar 2007
Location: East Texas
Posts: 334
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
Reply With Quote
  #8  
Old 10-01-2009, 08:45 PM
ggiersdorf ggiersdorf is offline
 
Join Date: Aug 2005
Posts: 251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 10-01-2009, 10:07 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 10-01-2009, 10:22 PM
ggiersdorf ggiersdorf is offline
 
Join Date: Aug 2005
Posts: 251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Lynn might someone be able to help me achieve this?
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 11:40 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08708 seconds
  • Memory Usage 2,268KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete