MyBB Community Forums
wp-mybb Bridge - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Resources (https://community.mybb.com/forum-8.html)
+--- Forum: Third Party Integration (https://community.mybb.com/forum-132.html)
+--- Thread: wp-mybb Bridge (/thread-51365.html)

Pages: 1 2


wp-mybb Bridge - Giangy94 - 2009-06-15

Hi to all,
I'm trying to update this plugin: http://mods.mybboard.net/archive/view/wp-mybb because it's under GNU General Public License as you can see here: http://mods.mybboard.net/download/wp-mybb.
I updated it and it works fine but I have wanted add a new feature, an option to insert the user id of the user that will be the author of the threads which are the blog's articles.
So in the file wpmybb.php I added this:
	$insertsql = array(
		'name' => 'wpmybb_uid',
		'title' => 'Uid User',
		'description' => 'Insert the uid of user that will create threads',
		'optionscode' => 'text',
		'value' => '',
		'disporder' => 3, 
		'gid' => $group
	);
	$db->insert_query("settings", $insertsql);
And then I replaced this:
$data['user_id'] = 1;
with this:
$data['user_id'] = $mybb->settings['wpmybb_uid'];
and now it doesn't open threads when I post on blog...


RE: wp-mybb Bridge - Diogo Parrinha - 2009-06-15

Don't forget to replace the other:
$data['user_id'] = 1;

One is for function wpmybb_on_post_thread($ph)
the other one is for function wpmybb_on_update_thread($ph)

I don't see what migth be wrong with your code apart from the:
'value' => '',
this means that the value will be blank. Thus, an administrator must edit it before using the plugin. You should make it like:
'value' => '1',
so the default User ID is 1. Have you checked your settings? It mustn't be blank otherwise it won't create any threads


RE: wp-mybb Bridge - faviouz - 2009-06-15

Could you please list all the features? I'm very happy with this. But you're going to share this amazing tool right? I really hope so. Finally a Wordpress bridge for MyBB, thank you. I'd be pleased if I could test this, if you want to of course. Any info on release date?

Regards and best of luck with this project.


RE: wp-mybb Bridge - Giangy94 - 2009-06-15

I can release it today because it works fine but I want to fix a small bug and add this feature to choose a user id to create threads.
This bridge send wordpress article to a forum that you can choose in wordpress option Smile

Bye


RE: wp-mybb Bridge - Diogo Parrinha - 2009-06-15

Have you read my post?


RE: wp-mybb Bridge - faviouz - 2009-06-15

(2009-06-15, 05:54 PM)Giangy94 Wrote: This bridge send wordpress article to a forum that you can choose in wordpress option Smile
You mean this is the only feature? Not even the login "fusion"?


RE: wp-mybb Bridge - Giangy94 - 2009-06-16

Hi Pirata,
I fixed that problem and now there is only a bug to fix before to release it....the ip adress...
When it creates a thread the logged ip is 20014781001601 and also in Who is Online there is a guest with this ip.
The variable it used for ip address is "ipaddress" => $user['regip'], so I added to global $mybb to put there $mybb->user['ip'] but there is the same problem and I don't know how to fix it.
The problem there isn't only if I update the article Smile


RE: wp-mybb Bridge - Diogo Parrinha - 2009-06-16

Hm? There is no problem when you update the article, but when you create one? Is that what you mean?


RE: wp-mybb Bridge - Giangy94 - 2009-06-16

Yes, is that Wink

PS: Also in the WOL, there is a guest with that ip Smile

EDIT:
I fixed it using $ip Wink the only problem is the guest in WOL Sad


RE: wp-mybb Bridge - Diogo Parrinha - 2009-06-16

hmm if the user is logged in, there should be no guest but a member