Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
vBulletin-WordPress Bridge Details »
vBulletin-WordPress Bridge
Mod Version: 1.2, by rsuplido (Member) rsuplido is offline
Developer Last Online: Mar 2013 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.0.8 Rating: (2 votes - 5.00 average) Installs: 47
Released: 16 Aug 2005 Last Update: 19 Aug 2005 Downloads: 91
Not Supported DB Changes Code Changes Additional Files  

I have been looking around for a WordPress - vBulletin plug-in and can’t seem to find one. I had time today to look at the WordPress code and tried out some things, and came up with a small hack for a bridge.

This bridge will let you use vBulletin as the main comments area for the blog entry. A copy of the intro blog entry is automatically created in a specific forum you choose, as well as a link back to the original blog entry from the forum. The blog entry will also show the total comments made.

Let me first say that I don’t have any experience in creating plug-ins for WordPress so please don’t ask me to convert this to one. If you plan to make this as an official plug-in or improve on it, please make sure to let me know so I can place a link on this article to yours.

Thanks and I hope you all enjoy it.

Note:
  • This hack will only work if your WordPress and vBulletin tables are in a single database.
  • This hack has only been tested on adding entries directly from the admin panel. It has not been tested on xmlrpc clients.
  • Use at your own risk. I will not be held liable for any loss of data nor problems that you might encounter on your site during the whole process of the mod.Backup your files and database(s) before proceeding.

Database Changes:

I have added a new column in WordPress’ posts table to maintian the vBulletin thread id that will be automatically generated for the blog entry. Note that the table name prefix might be different from your WordPress table settings:

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

Files to Upload:

Save the following as vb3–settings.php and upload it to the Wordpress wp-includes folder:

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

  • $vb_forumid - is the forum id of the blog discussion forum. Usually, this is the ‘News’ or ‘Blog’ forum. I advice to to set the permission of this forum to not allow ‘New Posts’ but allow ‘New Replies.’ To get the id of the forum, on your vBulletin forums page, click on the forum that you want to assign and check the URL at the address bar. It will appear like ‘..forumdisplay.php?f=x’ where x is the forum id.
  • $vb_userid - is the user id you want to assign as the one who will automatically create a new thread in the forum you have chosen.To get the user id, go to your forum’s Member List and click on the member you would like to assign. The URL will appear like ‘member.php?u=x’ where x is the user id.
  • $vb_username - is the corresponding username of the user id. Rather than generating a new SQL query to get the username, it is better to just assign the name to this variable.
  • $vb_path - this is the actual URL of your site’s forum. Note that there is no trailing slash.
  • $vb_dbprefix - if you specified a table prefix when you installed vBulletin, enter it here.
  • $vb_dbprefix - This message will appear at the end of the vBulletin post that links back to the blog entry.

Added in v1.1: In the attached files at the right, download postfeed.php and upload it to the root folder of your vB forums (it should be in the same folder where external.php is).

Files to be Modified:

Here comes the slightly harder part. We need to modify some WordPress files. Part of the changes assume that you are using the Kubrick default theme. If you are using a different theme, change the corresponding files accordingly.

wp-includes/comment-functions.php

Replace:

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

With:

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

Below:

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

Add:

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

Save file.

Added in v1.1: wp-includes/feed-functions.php

Replace:

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

With:

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

Save file.

wp-admin/post.php

Below:

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

Add:

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

Below:

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

Modified in v1.2: Add:

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

Save file.


If you are using the Kubrick default theme, open wp-content/themes/default/comments.php

Replace contents with:

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

Save File.


If you are using the Kubrick default theme, open wp-content/themes/default/single.php

Replace:

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

With (note that you are adding the path of the forum):

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

Save file.


If you are using the Kubrick default theme, open wp-content/themes/default/footer.php

Replace:

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

With:

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

Save file.


Lastly, open wp-rss2.php

Replace:

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

With (note that you are specifying the complete URL of the forum here):

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

Save file.

vBulletin Settings:

The RSS feed will not work if you haven't activated RSS External synidcation on your forum. To do this, on your forums admincp, go to vBulletin Options->External Data Provider and check 'Yes' on Enable RSS Syncidcation.


Final Words:

Well, that’s about it! I’m not sure how often I can visit this thread but I hope those who find success in implementing the bridge, can help those who are having problems. Again, if you have suggestions on improving the script, let me know.

Thanks and happy modding!

Live Demo: http://www.internettablettalk.com/blog/


Revision History:

v1.2 (12/7/2005):
Uses correct vB user id and user name of the blog author. This will work only if the username of the Wordpress user is exactly the same as the vB username. If not, it uses $vb_userid and $vb_username defined in the settings.

v1.1 (8/19/2005):
Revisions are based on reports by Darth Gill (see discussion). New version includes vB RSS thread parser and a bug fix on vB not displaying recently added blog entry on the forum level. Current revisions are marked in green.

Changes:
  • Added file to upload: postfeed.php (see Files to Upload section)
  • New file to modify: wp-includes/feed-functions.php
  • Fixed reported latest thread bug in wp-admin/post.php. Apply changes in green.


Screenshots:

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	004.png
Views:	1802
Size:	5.1 KB
ID:	33505   Click image for larger version

Name:	005.png
Views:	1386
Size:	2.3 KB
ID:	33506   Click image for larger version

Name:	006.png
Views:	1407
Size:	3.6 KB
ID:	33507  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Integration with vBulletin VBulletin-Wordpress Bridge for 3.64 imranbaig vBulletin 3.6 Add-ons 53 22 Mar 2008 16:41

  #46  
Old 22 Aug 2005, 15:39
OrangeFlea OrangeFlea is offline
 
Join Date: Aug 2004
Let me ask this regarding the vBulletin integration:

If someone wanted for the comments to be posted exclusively by forum members within the blog itself and not the forum, is that possible? Just like how Sitepoint.com has it, in where members of the message board could post comments inside the blog article and not on the forum.
Reply With Quote
  #47  
Old 22 Aug 2005, 15:46
rsuplido rsuplido is offline
 
Join Date: May 2002
It seems like you are asking for an integration of the user database. That would be an entirely different hack. This hack aims to have users not register via WordPress at all and just use vBulletin as the main user database. Only the authors are intended to be registered in Wordpress.

I thought that having just one database will be more efficient. Also, a lot of 3rd party commercial programs integrate best with vB, like PhotoPost, ReviewPost, Coppermine, Chat apps, etc.
Reply With Quote
  #48  
Old 22 Aug 2005, 16:47
OrangeFlea OrangeFlea is offline
 
Join Date: Aug 2004
Originally Posted by rsuplido
It seems like you are asking for an integration of the user database. That would be an entirely different hack. This hack aims to have users not register via WordPress at all and just use vBulletin as the main user database. Only the authors are intended to be registered in Wordpress.
No, I think you misunderstand. I just want for the comments to appear under the blog article itself, not on a forum, like this: http://www.sitepoint.com/blogs/2005/...ajax/#comments. Sitepoint uses Wordpress for their blog, by the way. Furthermore, I want the comments, which would be placed under the blog article, to be made by registered members of the vbulletin board.
Reply With Quote
  #49  
Old 22 Aug 2005, 17:01
rsuplido rsuplido is offline
 
Join Date: May 2002
I can probably create an enhancement to list the comments made in vB. If they want to add a comment, they have to do it in the forums though.
Reply With Quote
  #50  
Old 23 Aug 2005, 16:27
cyberxp9 cyberxp9 is offline
 
Join Date: Apr 2005
Originally Posted by rsuplido
First, I see that your blog comments RSS is already working:
http://www.cyberxp9.net/forum/postfe...=170&type=rss2

For the Entries (RSS), no, the change should not have affected it. Actually it works. If you try: http://www.cyberxp9.net/blog/?feed=rss2 you should see the actuall RSS of your blog's entries.
weird dude, it must of took some time to activate hit, thanks a bunch xp9
Reply With Quote
  #51  
Old 24 Aug 2005, 03:07
cyberxp9 cyberxp9 is offline
 
Join Date: Apr 2005
is it a problem that if I access postfeed directly you get an error?
Database error in vBulletin 3.0.8:

Invalid SQL:
SELECT title
FROM thread
WHERE threadid =
AND visible = 1

mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND visible = 1' at line 4

mysql error number: 1064

Date: Tuesday 23rd of August 2005 11:05:30 PM
Script: http://www.cyberxp9.net/forum/postfeed.php?
or get an error like this:
Database error in vBulletin 3.0.8:

Invalid SQL:
SELECT title
FROM thread
WHERE threadid =
AND visible = 1

mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND visible = 1' at line 4

mysql error number: 1064

Date: Tuesday 23rd of August 2005 10:57:28 PM
Script: http://www.cyberxp9.net/forum/postfeed.php?t=&type=rss2
Referer:
IP Address: 69.177.28.85

Last edited by cyberxp9; 24 Aug 2005 at 03:11.
Reply With Quote
  #52  
Old 24 Aug 2005, 04:04
rsuplido rsuplido is offline
 
Join Date: May 2002
Yes, you need to specify the id of the thread:

..postfeed.php?t=x

where x is the thread id
Reply With Quote
  #53  
Old 24 Aug 2005, 04:05
cyberxp9 cyberxp9 is offline
 
Join Date: Apr 2005
Originally Posted by rsuplido
Yes, you need to specify the id of the thread:

..postfeed.php?t=x

where x is the thread id
huh? I just change the url? than how come I get this thing
LINK REMOVED DUE TO RETARDS CLICKING ON IT SO I KEPT ON GETTING SENT ERROR EMAILS

Last edited by cyberxp9; 28 Aug 2005 at 14:28.
Reply With Quote
  #54  
Old 24 Aug 2005, 15:31
rsuplido rsuplido is offline
 
Join Date: May 2002
You would notice that Wordpress posts that weren't done through the bridge will not allow comments ("Comments Off"). I think you are clicking on those blog entries and thus getting the error. If you look at you latest blog entries, they run pretty well.
Reply With Quote
  #55  
Old 28 Aug 2005, 04:57
Spacefreak Spacefreak is offline
 
Join Date: Jul 2005
Originally Posted by OrangeFlea
No, I think you misunderstand. I just want for the comments to appear under the blog article itself, not on a forum, like this: http://www.sitepoint.com/blogs/2005/...ajax/#comments. Sitepoint uses Wordpress for their blog, by the way. Furthermore, I want the comments, which would be placed under the blog article, to be made by registered members of the vbulletin board.
This is exactly what I am looking for as well: Comments appear on the blog (Wordpress) , yet utilizes the vBulletin user registration system.

http://www.macnn.com is another site that pulls it off.

Last edited by Spacefreak; 28 Aug 2005 at 05:02.
Reply With Quote
  #56  
Old 28 Aug 2005, 23:07
Darth Gill Darth Gill is offline
 
Join Date: Jul 2005
Real name: Brandan Kraft
Back from vacation, and I made this change so that I could make drafts and click the "advanced editing" button without creating a new thread. Basically, you should only create a new thread if you publish.

Find in wp-admin/post.php
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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

Reply With Quote
  #57  
Old 29 Aug 2005, 19:14
chanzero chanzero is offline
 
Join Date: Aug 2003
this is very cool. a couple questions though:

1) after the wp post is written and automatically generates the vb thread & post, am i correct in assuming that editing the wp post will not affect the vb thread/post? i think that would be good for when people rename the post or edit the post, etc

2) does anyone have any experience with wordpress MU (multi-user)? if so, would this hack be just as easy to apply to MU?

Last edited by chanzero; 29 Aug 2005 at 19:35.
Reply With Quote
  #58  
Old 04 Sep 2005, 05:14
Cole2026 Cole2026 is offline
 
Join Date: Feb 2004
Real name: Cole
Originally Posted by chanzero
this is very cool. a couple questions though:

1) after the wp post is written and automatically generates the vb thread & post, am i correct in assuming that editing the wp post will not affect the vb thread/post? i think that would be good for when people rename the post or edit the post, etc

2) does anyone have any experience with wordpress MU (multi-user)? if so, would this hack be just as easy to apply to MU?
Any chance you could give us the ability to not use the forum as a comment system, but use the wordpress system with forum integration?

Thanks
Reply With Quote
  #59  
Old 04 Sep 2005, 18:04
sarahsboy18 sarahsboy18 is offline
 
Join Date: Aug 2005
Would it be possible to set it up so that when I set which forum the post is submitted to based on the post's category in WP?

I have several major sections of my blog that I would like to keep seperated in my forums pages... E.G.

News Category Blog -> News Forum
Product Reviews Blog Category -> Product Reviews Forum

Last edited by sarahsboy18; 04 Sep 2005 at 18:06.
Reply With Quote
  #60  
Old 04 Sep 2005, 19:14
rsuplido rsuplido is offline
 
Join Date: May 2002
Originally Posted by sarahsboy18
Would it be possible to set it up so that when I set which forum the post is submitted to based on the post's category in WP?
I have no plans of incorporating that feature. Imagone if there are 100 categories. What you can do however is choose a hidden forum and then move the thread manually to to correct forum.
Reply With Quote
Reply


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

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 20:17.

Layout Options | Width: Wide Color: