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

Reply
 
Thread Tools Display Modes
  #1  
Old 06-02-2008, 07:38 PM
fmckinnon fmckinnon is offline
 
Join Date: Jun 2008
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Want to get "Today's Posts" or similar on WordPress

Hey Everyone,

I've got vbulletin installed at http://www.theworshipcommunity.com/forums

We are about to launch a magazine-style site in the root directory, which is powered by WordPress. We're using the Revelation Theme for WordPress, and since we aren't requiring registration to read the articles in WordPress ... I don't think we need the vbulletin/wordpress bridge just yet.

However, one of the things we'd hoped to implement on the homepage of Wordpress is an "include" to show some of the recent forum posts.

Example:
Today's Forum Discussions:
... and then have a dynamically updated list of the most recently updated (or new) threads.

In vbulletin, this is easy enough by simply logging in and going to "Quick Links > Today's Posts". What I'd love to be able to do is get these same results to show up to non-members, or people who aren't logged in, and have it show up on the index.php page of WordPress at http://www.theworshipcommunity.com/index.php

Any help or suggestions?
Fred
Reply With Quote
  #2  
Old 06-03-2008, 04:20 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can simply query the database, or use the vBulletin RSS feed.
Reply With Quote
  #3  
Old 06-03-2008, 02:49 PM
fmckinnon fmckinnon is offline
 
Join Date: Jun 2008
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, Dismounted

The RSS feed seems to only include new items on the front page .. main forums, and doesn't seem to reflect updated threads in sub-forums, or just newly "updated" threads (only "new" threads, unless I'm missing something).

Can you help me along with what the code would like like to "query the database" from within wordpress?

Thanks,
Fred
Reply With Quote
  #4  
Old 06-04-2008, 09:24 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The most easiest way would be to include global.php.
Reply With Quote
  #5  
Old 07-13-2008, 04:01 AM
mattpist mattpist is offline
 
Join Date: Jul 2008
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

um... how would this be done?
Reply With Quote
  #6  
Old 07-13-2008, 06:22 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know how WordPress works, but if the MySQL user you use for WordPress has permissions on the vBulletin database, you can use WordPress' internal database class.
Reply With Quote
  #7  
Old 07-14-2008, 07:16 PM
aisais aisais is offline
 
Join Date: Jan 2005
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mattpist View Post
um... how would this be done?
I think you can use JS feed insted.

I am planning to do it this way:

First, activate External Source Provider.

Go to: Admin Control Panel > vBulletin Options > External Data Provider:
and choose JavaScript ( first choice ).

Then copy this Java Script code code and add it right at the inside your WP theme template.

Code:
<!-- Title -->
<div id="forum">
<h2><a href="http://www.yourforum.url/search.php?$session[sessionurl]do=getnew">Last Active Threads</a></h2>
<!-- List of today's threads -->
<script type="text/javascript" src="http://www.yourforum.url/external.php?forumids=2,32,35,27,3,12,6,30,31&type=js"></script>
<script language="" type="text/javascript">
<!--
for (var x in threads)
{
document.writeln("<a href=\"showthread.php?t="+threads[x].threadid+"&goto=newpost\"><a href=\"http://www.yourforum.url/showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a>&nbsp;&nbsp;<span class=\"smallfont\">(By: "+threads[x].poster+")</span> <br />;");
}
</script>
</div>
Forumids= IDs of forum to grap posts from.
You will need to replace yourforum url and path inside the code
you might also need to replace the & sign with &amp; in case had errors.
Option : if you want to show the list based on last post time add : &lastpost=1 right after &type=js at 4th line of the code.

Please let me know if it works with you.
Good Luck!
Reply With Quote
  #8  
Old 07-15-2008, 04:04 PM
Fraik Fraik is offline
 
Join Date: Feb 2007
Location: the Netherlands
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can use the feeds, or simply search for 'external' in the mods section here. I use inferno external to display the last x amounts of posts on my wordpress site
Reply With Quote
  #9  
Old 07-25-2008, 03:19 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 aisais View Post
I think you can use JS feed insted.

I am planning to do it this way:

Please let me know if it works with you.
Good Luck!
I have been trying to get this working on my wordpress site, but its not going through. The script works on a basic HTML page, but when its put into a wordpress page, it stops working.

I had 3 html portal pages the feed was working on for around 6 months. In june those sites were migrated to wordpress. The code was copied from the html page, pasted it into a wordpress page and it does not work.

Over the past 2 days I have tried 3 different sources of code - the one you posted above, my code from the html site and a code straight from vbulletin.com and non of them work. They might work in the right / left columns but I have not tried it there. I created a static wordpress page, and get nothing from the feed.
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 02:10 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.07870 seconds
  • Memory Usage 2,240KB
  • 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
  • (1)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete