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

Comments
  #2  
Old 16 Aug 2005, 18:50
BigIke's Avatar
BigIke BigIke is offline
 
Join Date: Aug 2004
Real name: Ike
awesome awesome awesome
Been waiting for something like this... will install later
Reply With Quote
  #3  
Old 16 Aug 2005, 20:00
Floris Floris is offline
 
Join Date: Jan 2002
This is really cool stuff, thank you for the hard work and I will talk to my friend who asked me for such a thing to see if this is what he is looking for.
__________________
My community; http://wetalknation.net
Reply With Quote
  #4  
Old 16 Aug 2005, 22:50
Darth Gill Darth Gill is offline
 
Join Date: Jul 2005
Real name: Brandan Kraft
Can this be made for 3.5?
Reply With Quote
  #5  
Old 16 Aug 2005, 23:00
rsuplido rsuplido is offline
 
Join Date: May 2002
I haven't tried it but it should work. There are no vB code changes in the hack. Changes are all done on the side of WordPress.
Reply With Quote
  #6  
Old 16 Aug 2005, 23:36
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
really cool- thanks for sharing all of your work!
Reply With Quote
  #7  
Old 17 Aug 2005, 04:20
Darth Gill Darth Gill is offline
 
Join Date: Jul 2005
Real name: Brandan Kraft
I love it! I have it installed. This is exactly what I was looking for!!!! VERY GOOD. Now you need to make it better! Works great with 3.5.

Either Convert HTML into VBCODE or insert it as HTML

OR

Have an option in the plugin to insert into vbulletin only a snippet of the original post - that way forum users are forced to go to the blog.
Reply With Quote
  #8  
Old 17 Aug 2005, 12:26
rsuplido rsuplido is offline
 
Join Date: May 2002
Originally Posted by Darth Gill
Either Convert HTML into VBCODE or insert it as HTML
Yes, I actually too the easy way out and remove the html formatting using a php function. I was actually looking for a good, smart html to bbcode script, but I can't find one. Anyone know how vBulletin does it?

Thanks.
Reply With Quote
  #9  
Old 17 Aug 2005, 14:02
Darth Gill Darth Gill is offline
 
Join Date: Jul 2005
Real name: Brandan Kraft
I modified the code to put just 150 chars into the forum as a snippet. You also need to parse out   and " > <, etc... because the strip html function in php doesn't handle this. Just do a ireg_replace('"','\"','string) or something like that....

Brandan
Reply With Quote
  #10  
Old 17 Aug 2005, 14:07
rsuplido rsuplido is offline
 
Join Date: May 2002
Brandan,

The code right now actually looks for the <!--more--> tag and only copies the text beofre it. I thought that's a good way to quote the entry.

If you want to add a limit, you can probably add a new variable at vb-settings.php so you can increase/decrease the limit easily.

Thanks.
Reply With Quote
  #11  
Old 18 Aug 2005, 23:26
Darth Gill Darth Gill is offline
 
Join Date: Jul 2005
Real name: Brandan Kraft
Thanks rsupido, I changed it back (to use the <!--more--> tag ... I've noticed a few bugs that could use correction. First of all, when I create a blog entry, it doesn't seem to be making the new thread properly so that it shows up on forum home. (as the latest thread in that forum) and the icon is missing on the forum listing. It only shows up if you edit the thread manually.

Second, the rss feed doesn't display the comments for me properly...

See example:

Regular blog entry: http://blog.5solas.org/2005/08/18/th...rist-has-done/
Feed: http://blog.5solas.org/2005/08/18/th...has-done/feed/

Now I have some comments for this post, but they're not in this feed. Any ideas?

Thanks for a great product!

Last edited by Darth Gill; 19 Aug 2005 at 12:49.
Reply With Quote
  #12  
Old 19 Aug 2005, 12:45
Lord Brar's Avatar
Lord Brar Lord Brar is offline
 
Join Date: Jul 2004
Wow! Wow! Wow! Wow! Wow! Just plain Wow!

I am gonna try and install it on my 3.5 site! Thanks a lot sir!
__________________
Howdie! I am adguru @ vB.com
Reply With Quote
  #13  
Old 19 Aug 2005, 13:51
rsuplido rsuplido is offline
 
Join Date: May 2002
Originally Posted by Darth Gill
First of all, when I create a blog entry, it doesn't seem to be making the new thread properly so that it shows up on forum home. (as the latest thread in that forum) and the icon is missing on the forum listing. It only shows up if you edit the thread manually.
I'm not sure I understand the problem. Can you elaborate more on this?

Second, the rss feed doesn't display the comments for me properly...
vB doesn't have an RSS parser for posts in a thread, only for recent threads. I'll try to create a thread parser and then revise the WordPress thread RSS link to point to the vB RSS thread parser.
Reply With Quote
  #14  
Old 19 Aug 2005, 14:24
Darth Gill Darth Gill is offline
 
Join Date: Jul 2005
Real name: Brandan Kraft
Originally Posted by rsuplido
I'm not sure I understand the problem. Can you elaborate more on this?
Yeah, see attached pictures....

In the first one (forumhome), you can see that the latest thread in the forum isn't showing up in the display. In the second one, (5solas.org Blog Listing), you can see that the icon is missing in the display. I think maybe you need to do TWO inserts into vbulletin - one for thread and one for the post - but I may be mistaken.

You can see the forum listing at : http://forums.5solas.org/forumdisplay.php?f=29

Originally Posted by resuplido
vB doesn't have an RSS parser for posts in a thread, only for recent threads. I'll try to create a thread parser and then revise the WordPress thread RSS link to point to the vB RSS thread parser.
Sounds good to me! Wow! That would be awesome!
Attached Images
File Type: png forumhome.png (14.0 KB, 221 views)
File Type: png forumlisting.png (13.4 KB, 152 views)
Reply With Quote
  #15  
Old 19 Aug 2005, 14:29
rsuplido rsuplido is offline
 
Join Date: May 2002
I see what you mean. I'll try to look into it.
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
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 00:09.

Layout Options | Width: Wide Color: