Upgrade Instructions for version 2.06
--------------------------------------------------
Make sure the vbbridge.php file is in the plugins directory NOT A SUBDIRECTORY! Do not create a separate subdirectory for this plugin!
In the Vbridge Settings menu, there is a new option that you MUST turn on called "Turn Plugin On". Set this option to yes.
The template modifications as far as comments has been changed slightly. This is in regards to the $reply variable. It was once an object, now an array, so instead of:
$reply->pagetext
It is now:
$reply[pagetext]
Note the template changes in the readme below.
Upgrade Instructions for version 3.01
--------------------------------------------------
Just upload the new version of vbbridge.php.
Installation Instructions
---------------------------------------------------
Upload the vbridge.php and functions_wysiwyg2.php file to your wp-content/plugins directory. DO NOT create a subdirectory.
Activate the product in your WordPress plugins section.
YOU MUST go to the options page before you do anything else. Click Options, then "Vbridge Options".
Define the following options:
VB User ID: This is the userid comment threads will be started with IF the author is NOT REGISTERED with VB.
VB Username: This is the username comment threads will be started with IF the author is NOT REGISTERED with VB.
VB Forum ID: This is the default FORUM id where all comment threads will be posted unless another is selected. This also will indicate what forum will automatically be selected in the drop down menu on the write page.
Forum URL: This is the URL to your forum. NO index.php, NO trailing slash. Example: http://www.yoursite.com/forum
Forum Relative Path: This is the RELATIVE file path to your forum. So if your forum is located at http://www.yoursite.com/forum then the RELATIVE path would be /forum.
Database Prefix: This is your vbulletin database prefix. If you do not have one, then leave this blank.
Turn Plugin On: Select yes, this turns the plugin on.
DO NOT click "yes" for the "Turn Auto-Integrate" option yet!!!!!!!!!!!
Go to the "Post Articles To Forum" option and select "Yes".
CLICK SUBMIT!
NEXT
Go to the "Reading" option. You need to change the setting for "Encoding for pages and feeds" to the same encoding your forum uses. By default, this is: ISO-8859-1 If you have specifically changed your encoding, then use your new encoding. If you do not have proper characters, then VB may display threads with odd characters.
If your getting funny characters when you post, you may want to change back to utf-8 in WordPress and then do the same in Vbulletin here: AdminCP -> Languages & Phrases -> Language Manager -> [edit settings].
IMPORTANT!!!!!!!!!!!!!!!!!!!!!!!!!
You MUST write a test post in Wordpress and make sure it is posting to the forum you select. If the post does post fine to VBULLETIN, then you have done everything right (so far).
Now you need to go to 'Users' -> 'Vbridge User Settings' in your Wordpress Dashboard. Here is where you map your Vbulletin users to Wordpress. You will see an option to select a Wordpress User Group for each Vbulletin user group. If you do not want a particular usergroup to be bridged to Wordpress select "Do Not Map" for that group. For example, Map your VB Administrators group to the Wordpress Administrator group. There will be a selection for each user group you have created for Vbulletin.
Once you have finished this click submit then click Options, then "Vbridge Options". Select "Yes" for the option: "Turn Auto-Integrate On".
The last step is to go to this URL: http://www.vbulletin.org/forum/vborg_miscactions.php?do=installhack&threadid=134521
You should be all set. If for some reason you can no longer login to Wordpress, or you get errors, just delete or rename the vbbridge.php file and that will deactivate the plugin.
Users are bridged to WP when they view any wordpress page, and are logged into Vbulletin. They MUST be logged into Vbulletin at the time. All user information contained in the VBulletin database table "user" is now in the global object $vbuser. Example: $vbuser->username will display the users VBulletin username.
----------------------------------------------------------------------------
IF YOU WANT TO USE VB For comments:
Find in any of the following templates: index.php, single.php, page.php.
<!-- start post loop -->
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
ADD the following code after it:
<?php
### Vbridge Call
$vbridge = Comment_Handler($post->ID);
###
?>
Find this code (or similar code indicating the comment section of your template):
<?php wp_link_pages(); ?>
<!-- <?php comments_popup_link(__('0 Comments'), __('1 Comments'), __('% Comments')); ?>
And replace with this:
<?php
#### Vbridge Replacement code for comments
if ($vbridge[id] > 0) {
?>
<div class="comments">
<?php
if(is_single()) {
if (is_array($vbridge[replies])) {
?>
<br /><br />
<h3 id="comments">Comments:</h3>
<ol class="commentlist">
<?php
foreach ($vbridge[replies] as $reply) {
?>
<li class="<?php echo $oddcomment; ?>" id="comment-<?php comment_ID() ?>">
<?php echo $vbridge[vb_parser]->do_parse($reply[pagetext], false, true); ?>
<small class="commentmetadata">
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/comment_arr.gif" alt="" />
by <cite> <a href=<?php echo get_option('vbb_VBURL') ?>/member.php?u=<?php echo $reply[userid] ?>><?php echo $reply[username]; ?></a></cite>
</small><br />
</li>
<?php /* Changes every other comment to a different class */
if ('alt' == $oddcomment) $oddcomment = '';
else $oddcomment = 'alt';
}
}
?>
</ol>
<?php
}
?>
<a href=<?php echo get_option('vbb_VBURL') ?>/showthread.php?t=<?php echo $vbridge[id] ?>>(<?php echo intval($vbridge[count]) ?>) comments</a> | <a href=<?php echo get_option('vbb_VBURL') ?>/newreply.php?do=newreply&noquote=1&t=<?php echo $vbridge[id] ?>>Add your comments</a>
</div>
<?php
}
##End Vbridge Replacement
?>
You can also now link authors usernames to their VB profile page. Wherever you see the code:
<?php the_author() ?>
You can replace that with something like:
<?php
if ($vbridge[id] > 0) {
?>
<a href=<?php echo get_option('vbb_VBURL') ?>/member.php?u=<?php echo $vbridge[thread_starter] ?>><?php the_author() ?></a>
<?php
}
else {
the_author();
}
?>