vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Integration with vBulletin - Complete Wordpress/Vbulletin Bridge - Share Users And Postings (https://vborg.vbsupport.ru/showthread.php?t=205388)

hayamakun 08-17-2010 05:51 PM

This added code allows the Wordpress front page (and probably some others that calculate comment count) to show the number of replies in the vb thread.

Note: I am using WP version 3.0.1 and VB version 3.8.6

In vbbridge.php, add to the end:

Code:

add_filter('get_comments_number', 'comments_count', 10, 2);

### Return Comment count
function comments_count($count, $postID = false) {
        global $vbulletin, $vwd;

        $wpdb =& $GLOBALS['wpdb'];
        $sql = "select vb_threadid FROM " . $GLOBALS['table_prefix'] . "posts where ID = '$postID'";
        $results = $wpdb->get_row($sql);

        $sql = "select replycount FROM " .  TABLE_PREFIX . "thread where threadid = '$results->vb_threadid'";
        $results2 = $wpdb->get_row($sql);

        return $results2->replycount;

}

That should work pretty well. Did some testing on it, seems to work fine.

eitai2001 08-22-2010 02:40 PM

Hi There.

I just want to find out. After the install, is it normal that the following areas in the Wordpress Admin cannot be access (Lead to a 404 error):
wp-admin/users.php
wp-admin/user-new.php

(Running WP 3.01, VB 4.05 )

Regards

Itai

amjadz4 08-22-2010 03:04 PM

Quote:

Originally Posted by eitai2001 (Post 2087845)
Hi There.

I just want to find out. After the install, is it normal that the following areas in the Wordpress Admin cannot be access (Lead to a 404 error):
wp-admin/users.php
wp-admin/user-new.php

(Running WP 3.01, VB 4.05 )

Regards

Itai

Yes its normal. Users are taken from vB database and not WP.

eitai2001 08-22-2010 03:18 PM

So if they login in wordpress are they automatically logged in VB and visa versa?

amjadz4 08-22-2010 04:41 PM

Quote:

Originally Posted by eitai2001 (Post 2087859)
So if they login in wordpress are they automatically logged in VB and visa versa?

No, login only works via vB. If they login in vB they will automatically login in wordpress. That's why its posted here and not on wp.org.

eitai2001 08-22-2010 04:59 PM

Oh ok, thanks ... I thought it was both ways ... still a very useful plugin.

cagbaazee 08-23-2010 07:05 AM

Will it work with Vbulletin version 4.05 and wordpress 3.1

Need review before i install it. Thanks

eitai2001 08-23-2010 07:33 AM

Works just fine for me ... and that's what I'm using.

cagbaazee 08-23-2010 10:07 AM

can someone post example of these... My wordpress site is and my vbulletin forum is Define the following options:

VB User ID:
VB Username:
VB Forum ID:
Forum URL:
Forum Relative Path:
Database Prefix:
Turn Plugin On:
Does your forum use Unicode (UTF-8):


Thanks for yr help....

eitai2001 08-23-2010 10:17 AM

There is a set of instructions that tells you exactly what you need to fill in, which I followed.

VB User ID: (The computer ID of the default username you want to use i.e. 1)
VB Username: (The actual username of the default username you want to use i.e. admin)
VB Forum ID: (The computer ID of the forum you want to place the thread i.e. for General Discussions, yours could be 6?)
Forum Url: http://gurusecret.info/vbforum
Forum Relative Path: /vbforum
Database Prefix: You need to check the actual database ... i.e. vb_


All times are GMT. The time now is 06:04 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02324 seconds
  • Memory Usage 1,744KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete