The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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 |
#2
|
||||
|
||||
You can simply query the database, or use the vBulletin RSS feed.
|
#3
|
|||
|
|||
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 |
#4
|
||||
|
||||
The most easiest way would be to include global.php.
|
#5
|
|||
|
|||
um... how would this be done?
|
#6
|
||||
|
||||
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.
|
#7
|
|||
|
|||
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> <span class=\"smallfont\">(By: "+threads[x].poster+")</span> <br />;"); } </script> </div> You will need to replace yourforum url and path inside the code you might also need to replace the & sign with & 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! |
#8
|
|||
|
|||
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
|
#9
|
||||
|
||||
Quote:
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. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|