MyBB Community Forums

Full Version: wp-mybb Bridge
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi to all,
I'm trying to update this plugin: because it's under GNU General Public License as you can see here:
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...
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
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.
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

Have you read my post?
(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"?
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
Hm? There is no problem when you update the article, but when you create one? Is that what you mean?
Yes, is that Wink

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

I fixed it using $ip Wink the only problem is the guest in WOL Sad
hmm if the user is logged in, there should be no guest but a member
Pages: 1 2