2012-05-10, 01:31 PM
2012-06-11, 08:24 AM
Good idea. I need this too.
2012-06-11, 01:00 PM
(2012-05-10, 01:31 PM)caygri Wrote: [ -> ]Hi,
I want insert mybb login on wordpress and add on wp article comment on mybb e and redirect on mybb 3d
Add a link to the login page in Menus.
Then for the comments do this:
Quote:So I made this system with MyBB in mind, but it will work with any other forums or site.
Navigate to: WP_root\wp-content\themes\{Your_Theme}
Add in the function.php:
Code:
Make a new file called meta.php with the following://meta include 'meta.php';
Code:
<?php add_action( 'admin_init', 'YOUR_PREFIX_register_meta_boxes' ); function YOUR_PREFIX_register_meta_boxes() { if ( ! class_exists( 'RW_Meta_Box' ) ) return; $prefix = 'YOUR_PREFIX_'; $meta_boxes = array(); $post_types = get_post_types(); // 1st meta box $meta_boxes[] = array( 'id' => 'personal', 'title' => 'MyBB Link', 'pages' => $post_types, 'fields' => array( array( 'name' => 'mybb Link', 'id' => $prefix . 'mybb', 'type' => 'text', ), // Other fields go here ) ); // Other meta boxes go here foreach ( $meta_boxes as $meta_box ) { new RW_Meta_Box( $meta_box ); } }
*Please note that you can directly apply the meta.php inside the function.php, however, I separated these codes to make troubleshooting easier.*
Place the meta.php into the same directory as the function.php (WP_root\wp-content\themes\{Your_Theme}).
Now you should have your meta pane and db call setup. However, you need your comment links to appear on your Blog.
To do this, navigate to: WP_root\wp-content\themes\{Your_Theme}
Edit the post.php and post-single.php to include the following:
Code:
You are now set! Go to a new post and you should see a box like this:<?php if (get_post_meta($post->ID, 'YOUR_PREFIX_mybb', true)){ ?> Comments <?php } ?>
This image has been resized. Click this bar to view the full image. The original image is sized 880x100.
Please note that you must use a URL that begins with http://.
Since this will add any link, you can use this system with any forum software.
Hope you enjoy!
That was written by a friend of mine Indest. I can't post a link to the forum though, as it would be breaking the rules