Register Chat 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 (Contributor) rsuplido is offline
Developer Last Online: Jan 2010 Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.0.8 Rating: (4 votes - 5.00 average) Installs: 48
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:	33505Click image for larger version

Name:	005.png
Views:	1386
Size:	2.3 KB
ID:	33506Click 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
VBulletin-Wordpress Bridge for 3.64 imranbaig vBulletin 3.6 Add-ons 53 22 Mar 2008 17:41

  #166  
Old 28 Aug 2006, 03:04
ScruffyDeluxe's Avatar
ScruffyDeluxe ScruffyDeluxe is offline
 
Join Date: Feb 2002
OK, I've been running this for a while now, and I'm certain it's worth another beta. From the textfile:

// Changes (+author)

* Editing an entry will also edit the first post in the thread (endquote)
* Editing an entry will not modify the timestamp of the first post in the thread (ScruffyDeluxe)
* Saving a new entry will not publish until the publish button is clicked, or if the post status checkbox is set to publish (SD)
* Any possibility of duplicate threads via changing post status hopefully squashed (SD)
* Entry quote in first post will be shown as posted by the user rather than "The Front Page" (SD)

// Bugs

* If you delete a post in WP, it doesn't get deleted in VB
* More a bug in this textfile than anything - the approximate line numbers change once you edit a file :1

// Ideas

* If you set an entry to draft status after publishing, it should moderate the thread
* Consider an overhaul to WP's comments page to show a thread view
Sorry I haven't popped in here for a while... 'issues'.
Attached Files
File Type: txt [Hack] vB3.5-WP2 Bridge v0.3.txt (12.1 KB, 51 views)
Reply With Quote
  #167  
Old 28 Aug 2006, 19:53
Deimos Deimos is offline
 
Join Date: Oct 2002
Can't seem to get it working on VB 3.6

I get this mess

Hello world!
August 28th, 2006

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

Posted in Uncategorized | Edit |
Warning: comments_popup_link(/home/deimos/public_html/wp/wp-includes/vb3-settings.php) [function.comments-popup-link]: failed to open stream: No such file or directory in /home/deimos/public_html/wp/wp-includes/comment-functions.php on line 289

Warning: comments_popup_link(/home/deimos/public_html/wp/wp-includes/vb3-settings.php) [function.comments-popup-link]: failed to open stream: No such file or directory in /home/deimos/public_html/wp/wp-includes/comment-functions.php on line 289

Warning: comments_popup_link() [function.include]: Failed opening '/home/deimos/public_html/wp/wp-includes/vb3-settings.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/deimos/public_html/wp/wp-includes/comment-functions.php on line 289

Warning: get_comments_number(/home/deimos/public_html/wp/wp-includes/vb3-settings.php) [function.get-comments-number]: failed to open stream: No such file or directory in /home/deimos/public_html/wp/wp-includes/comment-functions.php on line 230

Warning: get_comments_number(/home/deimos/public_html/wp/wp-includes/vb3-settings.php) [function.get-comments-number]: failed to open stream: No such file or directory in /home/deimos/public_html/wp/wp-includes/comment-functions.php on line 230

Warning: get_comments_number() [function.include]: Failed opening '/home/deimos/public_html/wp/wp-includes/vb3-settings.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/deimos/public_html/wp/wp-includes/comment-functions.php on line 230
1 Comment »
On the main WP page.
__________________
Ultimate Online Forums
Reply With Quote
  #168  
Old 28 Aug 2006, 19:53
Deimos Deimos is offline
 
Join Date: Oct 2002
And if I try and publish anything, I get

Warning: wp_insert_post(/home/deimos/public_html/wp/wp-includes/vb3-settings.php) [function.wp-insert-post]: failed to open stream: No such file or directory in /home/deimos/public_html/wp/wp-includes/functions-post.php on line 10

Warning: wp_insert_post(/home/deimos/public_html/wp/wp-includes/vb3-settings.php) [function.wp-insert-post]: failed to open stream: No such file or directory in /home/deimos/public_html/wp/wp-includes/functions-post.php on line 10

Warning: wp_insert_post() [function.include]: Failed opening '/home/deimos/public_html/wp/wp-includes/vb3-settings.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/deimos/public_html/wp/wp-includes/functions-post.php on line 10

Warning: Cannot modify header information - headers already sent by (output started at /home/deimos/public_html/wp/wp-includes/functions-post.php:10) in /home/deimos/public_html/wp/wp-includes/pluggable-functions.php on line 272
__________________
Ultimate Online Forums
Reply With Quote
  #169  
Old 29 Aug 2006, 07:48
ScruffyDeluxe's Avatar
ScruffyDeluxe ScruffyDeluxe is offline
 
Join Date: Feb 2002
You're missing the vb3-settings file, it seems. Although the latest file I attached has the modification steps, you'll need to check rsuplido's first post in this thread for the missing stuff (don't forget to grab postfeed.php too).

Let me know how it goes - I'm still running this on vB3.5.4 and WP 2.0.2, and it would be a nice surprise to see if it's forward-compatible

Last edited by ScruffyDeluxe : 29 Aug 2006 at 07:51.
Reply With Quote
  #170  
Old 04 Oct 2006, 05:57
Kurisu Kurisu is offline
 
Join Date: Aug 2002
Anyone got this working with WP 2.0.4 and vB 3.6?
Reply With Quote
  #171  
Old 11 Oct 2006, 15:10
Moment Moment is offline
 
Join Date: Dec 2005
Originally Posted by Kurisu
Anyone got this working with WP 2.0.4 and vB 3.6?
+1 :cross-eyed:
Reply With Quote
  #172  
Old 12 Oct 2006, 13:14
baze22 baze22 is offline
 
Join Date: Apr 2002
Originally Posted by Kurisu
Anyone got this working with WP 2.0.4 and vB 3.6?
I did this yesterday using the file in this post and in my initial testing it looks like its working as it should.

2 things I had to change:

1. I had the same problem as mentioned above "failed to open stream: No such file or directory" when in fact my vb3-settings file was exactly where it was supposed to be. I even hard coded the path - same error. I don't have an explanation, but I changed the file name to vb36settings.php and the references in the code - it worked fine.

2. Looks like 3.6 changed a table name. In the text file above it had this {$vb_dbprefix}post_parsed and I changed it to this: {$vb_dbprefix}postparsed

After those 2 things it looks to be working fine. My thanks to those who put this together.

baze
Reply With Quote
  #173  
Old 12 Oct 2006, 13:30
baze22 baze22 is offline
 
Join Date: Apr 2002
Originally Posted by baze22
1. I had the same problem as mentioned above "failed to open stream: No such file or directory" when in fact my vb3-settings file was exactly where it was supposed to be. I even hard coded the path - same error. I don't have an explanation, but I changed the file name to vb36settings.php and the references in the code - it worked fine.
I think I figured out what the problem here was. When I created the vb3-settings.php file, I copy/pasted the file name from the instructions at the top of the page. But it isn't the same - you get when you type it in. It is hex char 96 as opposed to the hex char 2D you get when typing it in. Bottom line would probably work if the file name was typed in when saving the file instead of copied & pasted from above. I figured this out when I copied & pasted the filename from above into TextPad and the - showed up as a special character.

baze
Reply With Quote
  #174  
Old 23 Oct 2006, 09:50
thedigitalsin thedigitalsin is offline
 
Join Date: Oct 2006
never mind, got it working

Last edited by thedigitalsin : 24 Oct 2006 at 07:11.
Reply With Quote
  #175  
Old 06 Nov 2006, 14:53
realmadrid realmadrid is offline
 
Join Date: Apr 2006
I was wondering if someone could help me. I have 2 issues....I'm trying to set this up. The first issue that Im coming up with is that in wp-admin/post.php I dont see the following code:

$result = $wpdb->query($postquery);

so I can add the follwing as per instructions... "// VB Bridge Start...etc.etc

2nd thing is that accord to instructions "im supposed to find

......function get_comments_number( $comment_id ) ...... section


I think the closest thing I have to that in the comments-functions.php is

......function get_comments_number( $post_id )....... etc.etc

is this ok to make the change

Thanks
Reply With Quote
  #176  
Old 07 Nov 2006, 12:40
BryceW BryceW is offline
 
Join Date: Feb 2006
Just upgraded WP 2.0.4 to WP 2.0.5 and currently running VB 3.5.4.
I just reapplied the instructions given in this post to the new 2.0.5 files: http://www.vbulletin.org/forum/showp...&postcount=137

Worked great.
Reply With Quote
  #177  
Old 20 Nov 2006, 11:22
imranbaig imranbaig is offline
 
Join Date: Sep 2005
Real name: Imran
Hi nice hack, With Few modifications to above post. I was able to make it work with wp 2.05 and VBulletin 3.63.
If the author allows I will release this as a plugin.
Thanks regards.
Reply With Quote
  #178  
Old 20 Nov 2006, 12:34
rsuplido rsuplido is offline
 
Join Date: May 2002
That would be great! Go ahead and release it.


Thanks.
Reply With Quote
  #179  
Old 20 Nov 2006, 12:35
Deimos Deimos is offline
 
Join Date: Oct 2002
Hell yeah! that'd be sweet.
__________________
Ultimate Online Forums
Reply With Quote
  #180  
Old 20 Nov 2006, 12:49
imranbaig imranbaig is offline
 
Join Date: Sep 2005
Real name: Imran
aite let me pick them up all into orderd folders maybe a small readme, I will release it tonight.
Thanks. by the way you can check it here www.mobile-junction.com nothing is added yet just making mods and plugins.
right now making a plugin for vb to send sms for free across 200+ countries using simple phpmail function.

EDIT: There are few things which I need to correct before I can release it

Last edited by imranbaig : 20 Nov 2006 at 12:53.
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
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 18:18.

Layout Options | Width: Wide Color: