• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

WordPress 3 Bridge

Thanks xfrocks for the awesome plugin! Can't wait to try out fb integration.

Just need a bit of help here =)
I've installed a plugin for affiliate earnings via links on wordpress (found on WPMU). However, I find that when I click on the user tab on WP, it immediately takes me to xenforo's admin login

this happens even when I log out from xenforo and log in using my wordpress admin.
eg: i try clicking this
http://www.techgarage.my/wp-admin/users.php

then we get here
http://www.techgarage.my/community/admin.php?users/

In the user tab would be the affiliate earnings tab, in order for us to configure the plugin for those who linked in, and have someone buy via our site.

Appreciate help yea..

=)
 
Hi xfrocks, was just testing out the bridge plugin for wordpress on my site. Here's some feedback =)

1) It works!
2) However, it generates a new user on WP, negating pulling info from WP & FB to compare if there's similar users, and if yes, to match the users together
3) This causes our WP and Xenforo to have 2 different profiles, X & Y =(, though both basically rely on FB for the information pulling
-------------

Could we work on something similar to the following? (got them from http://www.justin-klein.com/projects/wp-fb-autoconnect_

Hooks & Filters
During the login process, a number of hooks and filters provide an easy way for programmers to customize the script's behavior as needed:
  • Hook wpfb_login runs just before the login process finishes, receiving the user's Wordpress uid, their Facebook uid, and a Facebook API instance with active client session. This allows you to access and utilize social information about your visitors; see the examples below for more detailed instructions.
  • Hook wpfb_prelogin runs at the very start of the login script, allowing you to perform custom actions even before connecting to Facebook.
  • Hook wpfb_connect runs after connecting to Facebook but before searching for a local Wordpress user, letting you access profile information but still abort the process if desired. For example, we might add a check that says "if the visitor doesn't belong to a certain fanpage, stop the process and redirect them to a message saying 'Sorry, only fans of my page can login to this blog.'"
  • Hook wpfb_add_to_form allows you to insert html into the <form> responsible for sending the user to _process_login.php. This is handy if you want to forward additional data for use during the login process.
  • Hook wpfb_add_to_js lets you insert additional javascript to be executed before submitting the <form> that sends the user to _process_login.php.
  • Hook wpfb_after_button lets you output custom html immediately after the Login with Facebook button.
  • Hook wpfb_existing_user runs before logging in an existing (i.e. not autoregistered) user.
  • Filter wpfb_insert_user is applied to userdata just before autoregistering an account, allowing you to customize new users without affecting existing ones.
  • Filter wpfb_extended_permissions lets you modify the extended permissions that Facebook will prompt for. The complete list of available permissions is documented here.
Examples

The hook wpfb_login receives an array of 3 arguments, formatted like this:
  • $args['WP_ID']: The local Wordpress userID
  • $args['FB_ID']: The Facebook userID
  • $args['facebook']: The Facebook API instance, with active client session
Because it provides a valid Facebook session and matching local blog user, it's easy to pull whatever information you need from their profile and utilize it on your local site. As an example, I'll check if I'm friends with the connecting user, and if so, add them to a special "Personal Friends" group
 
Will this work with multiple word press installs on different sub domains from 1 xf install.
 
a Pre Sales member suggested that some of the Millions of Wordpress users might want Wordpress integration with Wordpress handling the registrations.

http://xenforo.com/community/threads/xenforo-wordpress.16010/

Of course, releasing an Addon at Wordpress.com would announce Xenforo to Millions of Wordpress users .... maybe Kier should make one ? :)
What would this gain? (as in what's the differance?)
P.s the proxy one is a wordpress addon (and can handle wordpress as the main and not xenforo)
 
What would this gain? (as in what's the difference?)
  • There are a couple hundred xenforo users that want xenforo to be the main feature of their site - with Wordpress on the side. They want to ensure Xenforo runs without problems.
  • There are a couple million Wordpress users that want Wordpress to be the main feature of their site - with Xenforo on the side. They want to ensure Wordpress runs without problems.
P.s the proxy one is a wordpress addon (and can handle wordpress as the main and not xenforo)
I've never really understood Proxy.
I'm sure Wordpress users would want their Wordpress site to be as unchanged as possible. Does the styling of Proxy go against this ?
 
  • There are a couple hundred xenforo users that want xenforo to be the main feature of their site - with Wordpress on the side. They want to ensure Xenforo runs without problems.
  • There are a couple million Wordpress users that want Wordpress to be the main feature of their site - with Xenforo on the side. They want to ensure Wordpress runs without problems.
Well this and Proxy do all this? so am unsure what you mean...

I've never really understood Proxy.
I'm sure Wordpress users would want their Wordpress site to be as unchanged as possible. Does the styling of Proxy go against this ?
Yes it does but you can turn it off (with some playing)
 
How do I make a sidebar plugin widget for this? I'm trying the following but having problems...

PHP:
<?php
/*
Plugin Name: Events Upcoming
Plugin URI: http://www.8wayrun.com/
Description: Lists upcoming Streams
Version: 1
Author: Jaxel
Author URI: http://www.8wayrun.com/
*/

function xf_events_upcoming()
{
$timeNow = time();
$range = strtotime("+6 hours");
$timeformat = 'h:i A';
$ouput = "";

$xf = XenForo_WP::create();
if (!$events = $xf->xfdb->get_results("
SELECT EWRatendo_events.*, EWRatendo_services.service_slug,
FROM EWRatendo_events
LEFT JOIN EWRatendo_services ON (EWRatendo_services.service_id = EWRatendo_events.service_id)
WHERE EWRatendo_events.event_endtime >= $timeNow
AND EWRatendo_events.event_strtime <= $range
AND EWRatendo_events.service_id != '0'
ORDER BY EWRatendo_events.event_strtime
"))
{
return $output;
}

$output .= "<script type=\"text/javascript\" src=\"/forum/js/8wayrun/EWRatendo_ajax.js\"></script>";
$output .= "<span class=\"heading1\"><span>Upcoming Streams</span></span>";
$output .= "<div class=\"box\"><ul class=\"latestrp\" id=\"eventsUpcoming\">";

foreach ($events AS &$event)
{
$strtime = new DateTime(date('r', $event['event_strtime']));
$strtime->setTimezone(new DateTimeZone($event['event_timezone']));
$event['formatted_strshort'] = $strtime->format($timeformat);
$event['formatted_timezone'] = $strtime->format('P T');
$event['link'] = XenForo_WP::create()->buildPublicLink('events', $event);

$output .= "
<li data-service=\"$event[service_slug]\" data-serviceval=\"$event[service_value]\" data-serviceval2=\"$event[service_value2]\">
<img src=\"$event[event_thumb]\">
<a href=\"$event[link]\">$event[event_title]</a>
<span class=\"eventTime\">@ $event[formatted_strshort] ($event[formatted_timezone])</span>
</li>
";
}

$output .= "</ul></div>";

return $output;
}

add_shortcode('events-upcoming', 'xf_events_upcoming');

?>

First, it doesn't seem to be connecting to the database...

Second, the shortcode doesn't work.
 
Is there a way to for the bridge to take the user back to the original WordPress page they wished to login at (usually where it says you need to login to comment), rather than taking them to the XenForo login page and not redirecting them back? Usually after login, it just drops you to the Forum homepage.

Neither of these solutions work, nor do they even take you to the forum login. The page just refreshes without offering a login. It seems as though "get_permalink()" breaks login functionality.

<a href="<?php echo wp_login_url( get_permalink() ); ?>" title="Login">Login</a>

or

<?php wp_loginout(get_permalink()); ?>
 
Is there a way to for the bridge to take the user back to the original WordPress page they wished to login at (usually where it says you need to login to comment), rather than taking them to the XenForo login page and not redirecting them back? Usually after login, it just drops you to the Forum homepage.
+1 Good idea.
 
I am writing a mod in XenForo for SRK, that is using this bridge... is there any way to get information from the WORDPRESS database into my XenForo code? Or does it only do the reverse?
 
Top Bottom