Advertisement:

Author Topic: SMF & WordPress  (Read 413839 times)

Offline Stixsmaster

  • Newbie
  • *
  • Posts: 2
SMF & WordPress
« on: March 31, 2007, 08:15:55 PM »
Has anyone here ever tried making it so that this forum and wordpress properly work together?

---Stixsmaster

Offline Ken.

  • Full Member
  • ***
  • Posts: 496
  • Gender: Male
  • TinyPortal Rocks!
    • Our FamilyForum
Re: SMF & WordPress
« Reply #1 on: April 01, 2007, 12:09:58 PM »
Here's one way to do it.

SMF + TinyPortal + Wordpress
My Wordpress
"If you don't have a stack of failures in your shop, you aren't trying hard enough". --Richard Raffin.


Offline Stixsmaster

  • Newbie
  • *
  • Posts: 2
Re: SMF & WordPress
« Reply #2 on: April 01, 2007, 05:54:03 PM »
yea but how to get tinyportal and smf when both in diff directory to work with wordpress that is on main site?

Offline Ken.

  • Full Member
  • ***
  • Posts: 496
  • Gender: Male
  • TinyPortal Rocks!
    • Our FamilyForum
Re: SMF & WordPress
« Reply #3 on: April 01, 2007, 07:50:46 PM »
yea but how to get tinyportal and smf when both in diff directory to work with wordpress that is on main site?

I'm running SMF/TP in one db, WP in a second db & Coppermine in a third db. It's not really a big deal, you just have to set your paths correctly.

In my case the setup for pulling WP & cpg into my forum is handled with iframe articles that are very easy to do with the TP article system.
Coppermine shares the SMF member base with the built-in bridge and that works out great, the only downside to the whole deal is that WP has no member base bridge available that I'm aware of. (there is one, but it goes in the wrong direction)
"If you don't have a stack of failures in your shop, you aren't trying hard enough". --Richard Raffin.


Offline SMdot™

  • Full Member
  • ***
  • Posts: 421
  • Gender: Male
  • shomaztadotcom
    • ShoMaztadotCom
Re: SMF & WordPress
« Reply #4 on: April 04, 2007, 03:04:48 PM »
wait how did you get wordpress into smf? is there a mod you download or a bridge?

Offline Ken.

  • Full Member
  • ***
  • Posts: 496
  • Gender: Male
  • TinyPortal Rocks!
    • Our FamilyForum
Re: SMF & WordPress
« Reply #5 on: April 04, 2007, 06:11:31 PM »

Please don't think that I'm trying to be rude but I quoted myself because the answer is already there in my other post.


In my case the setup for pulling WP & cpg into my forum is handled with iframe articles that are very easy to do with the TP article system.
Coppermine shares the SMF member base with the built-in bridge and that works out great, the only downside to the whole deal is that WP has no member base bridge available that I'm aware of. (there is one, but it goes in the wrong direction)
"If you don't have a stack of failures in your shop, you aren't trying hard enough". --Richard Raffin.


Offline RoarinRow

  • Full Member
  • ***
  • Posts: 662
  • Gender: Male
  • Ride my AV!
    • Avalanche Style
Re: SMF & WordPress
« Reply #6 on: May 05, 2007, 01:48:09 AM »
yea but how to get tinyportal and smf when both in diff directory to work with wordpress that is on main site?

I'm running SMF/TP in one db, WP in a second db & Coppermine in a third db. It's not really a big deal, you just have to set your paths correctly.

In my case the setup for pulling WP & cpg into my forum is handled with iframe articles that are very easy to do with the TP article system.
Coppermine shares the SMF member base with the built-in bridge and that works out great, the only downside to the whole deal is that WP has no member base bridge available that I'm aware of. (there is one, but it goes in the wrong direction)

I did the same thing with my WP, TP, and CPG, with iframes.  It's too bad that WP can't integrate with the SMF member database somehow.   As quick and easy as it is for them to sign up, then don't like doing it. 

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

Offline SMdot™

  • Full Member
  • ***
  • Posts: 421
  • Gender: Male
  • shomaztadotcom
    • ShoMaztadotCom
Re: SMF & WordPress
« Reply #7 on: May 05, 2007, 11:51:47 PM »
Here's one way to do it.

SMF + TinyPortal + Wordpress
My Wordpress

im doing this as well now www.shomazta.com/smf/index.php?action=blog

Xell

  • Guest
Re: SMF & WordPress
« Reply #8 on: May 22, 2007, 06:05:47 PM »
Hi guys,

Just so you know, there is a bridge out there for this: http://www.dmry.net/wordpress-smf-bridge-plugin-10/

It's quite buggy and some areas are really badly done (for example, it calls current_user to get info on the user registering.  Problems arise when you use admin to register someone, as it pulls admin's details and puts admins details into the smf!)

Anyway, i'm currently tweaking it into a site, and thought I'd recommend it.

Xell

Offline RoarinRow

  • Full Member
  • ***
  • Posts: 662
  • Gender: Male
  • Ride my AV!
    • Avalanche Style
Re: SMF & WordPress
« Reply #9 on: May 22, 2007, 08:59:17 PM »
Hi guys,

Just so you know, there is a bridge out there for this: http://www.dmry.net/wordpress-smf-bridge-plugin-10/

It's quite buggy and some areas are really badly done (for example, it calls current_user to get info on the user registering.  Problems arise when you use admin to register someone, as it pulls admin's details and puts admins details into the smf!)

Anyway, i'm currently tweaking it into a site, and thought I'd recommend it.

Xell

Let us know how it works out and what you did.   8)

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

Offline SMdot™

  • Full Member
  • ***
  • Posts: 421
  • Gender: Male
  • shomaztadotcom
    • ShoMaztadotCom
Re: SMF & WordPress
« Reply #10 on: May 23, 2007, 12:37:07 AM »
that thing didn't work for me =(

Offline perplexed

  • SMF Hero
  • ******
  • Posts: 2,603
  • It's quite perplexing isn't it
Re: SMF & WordPress
« Reply #11 on: May 23, 2007, 06:54:25 AM »
I used to have Joomla, and when I had that, Smf, joomla, wordpress and coppermine all used the smf member list/login etc

Joomla was just too much of a pain to keep updating etc so I dont have it any more, but that is one way to go and get what you need

Offline SMdot™

  • Full Member
  • ***
  • Posts: 421
  • Gender: Male
  • shomaztadotcom
    • ShoMaztadotCom
Re: SMF & WordPress
« Reply #12 on: May 23, 2007, 01:39:26 PM »
yeah joomla can just be used as a blog tho instead of wordpress =P I had it but I didn't like it... I still use it on wordsofcriticismdotcom but I sort of gave up on the site so it's just there =P

Offline Luke

  • Semi-Newbie
  • *
  • Posts: 29
  • Gender: Male
  • Drive for 5!
Re: SMF & WordPress
« Reply #13 on: May 25, 2007, 11:42:43 AM »
Single login, and nice package: SMF + Sphinx + WordPress

http://dynscs.com/sphinx/

Lots of options, and I mean lots.

WordPress as the main site, SMF + Sphinx in /forums (or whatever you like).
SMF + Sphinx as the main site, with WordPress in /blog (or whatever you like), etc.

Lots of theme possibilities, and all kinds of goodies.

Offline SMdot™

  • Full Member
  • ***
  • Posts: 421
  • Gender: Male
  • shomaztadotcom
    • ShoMaztadotCom
Re: SMF & WordPress
« Reply #14 on: May 25, 2007, 09:55:51 PM »
Single login, and nice package: SMF + Sphinx + WordPress

http://dynscs.com/sphinx/

Lots of options, and I mean lots.

WordPress as the main site, SMF + Sphinx in /forums (or whatever you like).
SMF + Sphinx as the main site, with WordPress in /blog (or whatever you like), etc.

Lots of theme possibilities, and all kinds of goodies.


No offense but I personally don't like that setup ^.^ It's looking better then before but you should setup a demo or have some links to example features so we can see what your portal has to offer.
« Last Edit: May 25, 2007, 09:57:54 PM by SMdot™ »

Offline ladynada

  • Full Member
  • ***
  • Posts: 423
  • Gender: Female
  • What happens next loves me
    • The Two Witnesses - Overcome The Carnal Mind Through Christ Jesus
Re: SMF & WordPress
« Reply #15 on: May 30, 2007, 01:04:52 AM »
* ladynada coughs softly....

watching this thread.
WORK for Truth, Print it, Take Time to READ ALL LINKS NOTED  click here --> The TWO Witnesses are Mom and Dad and SMF Skins

Offline jjgallow

  • Jr. Member
  • **
  • Posts: 122
    • StockDiaries.com
Re: SMF & WordPress
« Reply #16 on: June 08, 2007, 06:26:04 PM »
I've added some fixes to DMRY's smf bridge.  It should work for you now. Enjoy  :)

It should fix several problems that basically make the script not work, or register someone other than the user you intended to.

I have not yet got a hold of dmry, if someone would like to, or would like to host the script, that'd be great.

Please do test out and let me know!

Jeff


Quote
<?php
/*
Plugin Name: WP & SMF
Plugin URI: http://www.dmry.net/wordpress-smf-koprusu-eklentisi-10
Description: SMF Forum ile Wordpress'i birle?tirir. (SMF Forum and Wordpress with together.)
Author: dmRy
Version: 1.01  ..updated by jjgallow
Author URI: http://www.dmry.net
*/


define('SMF_API', true);
define('SMF', 'SSI');

if (!file_exists(ABSPATH.'/wp-content/plugins/WP_SMF/Settings.php')) {
      add_action('admin_footer', 'smf_uyari');
   } else {
      require('Settings.php');

$smf_settingsphp_d = ABSPATH.'/wp-content/plugins/WP_SMF/Settings.php';  ////moved to hear for wpmu compatibility
}


////////////////////////////Added for wpmu compatability
if (file_exists(ABSPATH.'/wp-content/mu-plugins/Settings.php')) {
      require('Settings.php');
$smf_settingsphp_d = ABSPATH.'/wp-content/mu-plugins/WP_SMF/Settings.php';
}
/////////////////////////added for wpmu compatability


if ($smf_settingsphp_d) {
   add_action('user_register', 'smf_kullanici_yarat');
   add_action('personal_options_update', 'smf_kullanici_guncelle');
        add_action('profile_personal_options', 'smf_kullanici_guncelle');   //  added by jjgallow for compatibility reasons
        add_action('profile_update', 'smf_kullanici_guncelle');    //  added by jjgallow for compatibility reasons
   add_action('wp_login', 'smf_oturum_ac');
   add_action('wp_logout', 'smf_oturum_kapat');
   add_action('delete_user', 'smf_kullanici_sil');
   add_action('plugins_loaded', 'smf_dil_dosyasini_yukle');
}   
   
// database
$wpdb->wpsmfuser = $table_prefix . 'wpsmf_users';


if (isset($_GET['activate']) && $_GET['activate'] == 'true') {
    add_action('init', 'WpSmfYukle');
}

function smf_dil_dosyasini_yukle() {
   load_plugin_textdomain('wp_smf', 'wp-content/plugins/WP_SMF');
}


function WpSmfYukle() {
   global $wpdb;
   $db_sql="CREATE TABLE IF NOT EXISTS `$wpdb->wpsmfuser` (
  `umeta_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) NOT NULL default '0',
  `meta_key` varchar(255) NOT NULL default '0',
  `meta_value` longtext NOT NULL default '',
  PRIMARY KEY  (`umeta_id`)
)";
   $wpdb->query($db_sql);
   
   
   if (!get_option('wp_smf_trackback')) {   
      $trackback_url = (WPLANG=='tr_TR' || WPLANG=='tr') ? 'http://www.dmry.net/wordpress-smf-koprusu-eklentisi-10/trackback' : 'http://www.dmry.net/wordpress-smf-koprusu-eklentisi-10/trackback';
      $trackback_body = sprintf(__("I installed and tried your plugin on my site \"%s\"",'wp_smf'), get_bloginfo('name'));
      $last_post = $wpdb->get_var("SELECT ID FROM $wpdb->posts ORDER BY ID DESC LIMIT 1");
      $trackback_title = __("I installed your plugin",'wp_smf');
      trackback($trackback_url, $trackback_title, $trackback_body, $last_post);   
      update_option('wp_smf_trackback', 'evet');
   }
   
}

function smf_uyari() {
   echo "
   <div id='akismet-warning' class='updated fade-ff0000'><p><strong>".__("SMF Settings.php  file can't find. Please copy Settings.php file to under WP_SMF folder to SMF directory.",'wp_smf')."</p></div>
   <style type='text/css'>
   #adminmenu { margin-bottom: 5em; }
   #akismet-warning { position: absolute; top: 7em; }
   </style>
   ";
}

function WPVeritabaniKurtar() {
   $wpdb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
}


function smf_kullanici_yarat($userID) {
   global $smf_settingsphp_d,$password,$user_login,$user_email;


//////////////////////////////////////////////////////////////////
//...Added code and edited here to properly locate the registered user rather than the logged in user ..by jjgallow.
$user_info = get_userdata($userID);
   require_once('smf_api_1.1.php');
   $userSmfID = smf_registerMember($user_info->user_login, $user_info->user_email, $user_info->user_password);
//////////////////////////////////////////////////////////////////


   WPVeritabaniKurtar();
   update_smf_user_option( $userID, 'Smf_User_ID', $userSmfID,true);
}

function smf_kullanici_guncelle($userID) {
   global $smf_settingsphp_d,$userdata;
        get_currentuserinfo();
   //////////////////////////////////////////////////////////////////
//...Added code and edited here to properly locate the registered user rather than the logged in user ..by jjgallow.
   $user_info = get_userdata($userID);
//////////////////////////////////////////////////////////////////

   $realName = $_POST['first_name']. ' '.$_POST['last_name'];
   $emailAddress = $_POST['email'];
   $personalText = $_POST['description'];
   $websiteUrl = $_POST['url'];
   $AIM = $_POST['aim'];
   $YIM = $_POST['yim'];      



   $realName = (strlen(trim($realName))>0) ? $realName : $user_info->user_login;  /////////// edited by jjgallow

   require_once('smf_api_1.1.php');
   smf_UpdateProfil($user_info->user_login, $realName, $emailAddress, $personalText, $websiteUrl, $AIM, $YIM);  /////////// edited by jjgallow
   
   if ($_POST['pass1']) {
      smf_ChangePassword($user_info->user_login, $_POST['pass1']);  /////////// edited by jjgallow
      smf_oturum_ac($user_info->user_login);   /////////// edited by jjgallow
   }
   WPVeritabaniKurtar();
}

function smf_oturum_ac($user_login) {
   global $smf_settingsphp_d;
   
   require_once('smf_api_1.1.php');
   $len = 3600;
   if($using_cookie) {         
      $len = 60*525600;
      $_SESSION['cms_smf_always'] = true;
   }
   if(smf_LoginById($user_login,$len)) smf_logOnline();
   WPVeritabaniKurtar();
}   

function smf_oturum_kapat($user_login) {
   global $smf_settingsphp_d,$userdata;
   get_currentuserinfo();
   
   require_once('smf_api_1.1.php');
   smf_LogoutById($userdata->user_login);
   WPVeritabaniKurtar();
}      

function smf_kullanici_sil($userID) {
   global $smf_settingsphp_d;
   
   $smf_UserID = get_smf_usermeta($userID,'Smf_User_ID');;
   require_once('smf_api_1.1.php');
    smf_deleteMembers($smf_UserID);
   WPVeritabaniKurtar();
   delete_smf_usermeta($userID,'Smf_User_ID',$smf_UserID);
}      




function update_smf_user_option( $user_id, $option_name, $newvalue, $global = false ) {
   global $wpdb;
   if ( !$global )
      $option_name = $wpdb->prefix . $option_name;
   return update_smf_usermeta( $user_id, $option_name, $newvalue );
}


function update_smf_usermeta( $user_id, $meta_key, $meta_value ) {
   global $wpdb;
   if ( !is_numeric( $user_id ) )
      return false;
   $meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key);

   if ( is_array($meta_value) || is_object($meta_value) )
      $meta_value = serialize($meta_value);
   $meta_value = trim( $meta_value );
   
   if (empty($meta_value)) {
      delete_smf_usermeta($user_id, $meta_key);
   }

   $cur = $wpdb->get_row("SELECT * FROM $wpdb->wpsmfuser WHERE user_id = '$user_id' AND meta_key = '$meta_key'");
   if ( !$cur ) {
      $wpdb->query("INSERT INTO $wpdb->wpsmfuser ( user_id, meta_key, meta_value )
      VALUES
      ( '$user_id', '$meta_key', '$meta_value' )");
   } else if ( $cur->meta_value != $meta_value ) {
      $wpdb->query("UPDATE $wpdb->wpsmfuser SET meta_value = '$meta_value' WHERE user_id = '$user_id' AND meta_key = '$meta_key'");
   } else {
      return false;   
   }
   
   $user = get_userdata($user_id);
   wp_cache_delete($user_id, 'users');
   wp_cache_delete($user->user_login, 'userlogins');
   
   return true;
}


function delete_smf_usermeta( $user_id, $meta_key, $meta_value = '' ) {
   global $wpdb;
   if ( !is_numeric( $user_id ) )
      return false;
   $meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key);

   if ( is_array($meta_value) || is_object($meta_value) )
      $meta_value = serialize($meta_value);
   $meta_value = trim( $meta_value );

   if ( ! empty($meta_value) )
      $wpdb->query("DELETE FROM $wpdb->wpsmfuser WHERE user_id = '$user_id' AND meta_key = '$meta_key' AND meta_value = '$meta_value'");
   else
      $wpdb->query("DELETE FROM $wpdb->wpsmfuser WHERE user_id = '$user_id' AND meta_key = '$meta_key'");
      
   $user = get_userdata($user_id);
   wp_cache_delete($user_id, 'users');
   wp_cache_delete($user->user_login, 'userlogins');
   
   return true;
}


function get_smf_usermeta( $user_id, $meta_key = '') {
   global $wpdb;
   $user_id = (int) $user_id;

   if ( !empty($meta_key) ) {
      $meta_key = preg_replace('|a-z0-9_|i', '', $meta_key);
      $metas = $wpdb->get_results("SELECT meta_key, meta_value FROM $wpdb->wpsmfuser WHERE user_id = '$user_id' AND meta_key = '$meta_key'");
   } else {
      $metas = $wpdb->get_results("SELECT meta_key, meta_value FROM $wpdb->wpsmfuser WHERE user_id = '$user_id'");
   }

   if ( empty($metas) ) {
      if ( empty($meta_key) )
         return array();
      else
         return '';
   }

   foreach ($metas as $index => $meta) {
      @ $value = unserialize($meta->meta_value);
      if ( $value === FALSE )
         $value = $meta->meta_value;

      $values[] = $value;
   }

   if ( count($values) == 1 )
      return $values[0];
   else
      return $values;
}

function get_the_totalusers() {
   global $wpdb;
   $totalusers = $wpdb->get_var("SELECT COUNT(ID) FROM $wpdb->users");
   return $totalusers;
}

function the_totalusers() {
   global $wpdb;
   $totalusers = $wpdb->get_var("SELECT COUNT(ID) FROM $wpdb->users");
   return $totalusers;
}

function SMF_EnSonMesajlar($limit=10,$hepsindenonce,$mesajdanonce,$mesajdansonra,$hepsindensonra) {
   global $smf_settingsphp_d;
   
   if(file_exists($smf_settingsphp_d)) include($smf_settingsphp_d);

   $baglan = new wpdb($db_user,$db_passwd,$db_name,$db_server);
   $count = 1;
   
   $baglan->query("SET NAMES 'UTF8'");
   
   $SQL="SELECT m.posterTime, m.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, m.ID_BOARD, b.name AS bName, IFNULL(mem.realName, m.posterName) AS posterName, 1 AS isRead, 0 AS new_from, LEFT(m.body, 384) AS body, m.smileysEnabled FROM ({$db_prefix}messages AS m, {$db_prefix}boards AS b) LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER) WHERE  b.ID_BOARD = m.ID_BOARD  ORDER BY m.ID_MSG DESC LIMIT $limit";
   $basliklar = $baglan->get_results($SQL);
   
   foreach ($basliklar as $baslik) {
      $content .= $mesajdanonce. '<a href="' . $boardurl . '?topic=' . $baslik->ID_TOPIC . '.msg' . $baslik->ID_MSG . ';topicseen#new" class="smflastpost">'. $baslik->subject .'</a><br><span class="smfpostextra">'.__('Last post by:','wp_smf').' <a href="' .  $boardurl . '?action=profile;u=' . $baslik->ID_MSG . '">'. $baslik->posterName .'</a> '.__('Topic:','wp_smf').'  <a href="'.$boardurl .'?board=' . $baslik->ID_BOARD .'.0">'.$baslik->bName.'</a> '.__('Date:','wp_smf').' '. date("d.m.Y H:i",$baslik->posterTime) .'</span>'.$mesajdansonra;
      $count = $count + 1;
   }
   echo $hepsindenonce.$content.$hepsindensonra;
   
   $wpdb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);   
}

function SMF_EnSonBasliklar($limit=10,$hepsindenonce,$mesajdanonce,$mesajdansonra,$hepsindensonra) {
   global $smf_settingsphp_d;
   
   if(file_exists($smf_settingsphp_d)) include($smf_settingsphp_d);

   $baglan = new wpdb($db_user,$db_passwd,$db_name,$db_server);
   $count = 1;
   $baglan->query("SET NAMES 'UTF8'");
   $SQL="SELECT m.posterTime, ms.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, b.ID_BOARD, b.name AS bName, IFNULL(mem.realName, m.posterName) AS posterName, 1 AS isRead, 0 AS new_from, LEFT(m.body, 384) AS body, m.smileysEnabled, m.icon FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}messages AS ms) LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER) WHERE t.ID_LAST_MSG = m.ID_MSG AND b.ID_BOARD = t.ID_BOARD AND ms.ID_MSG = t.ID_FIRST_MSG ORDER BY t.ID_LAST_MSG DESC LIMIT $limit";
   $basliklar = $baglan->get_results($SQL);
   
   foreach ($basliklar as $baslik) {
      $content .= $mesajdanonce. '<a href="' . $boardurl . '?topic=' . $baslik->ID_TOPIC . '.msg' . $baslik->ID_MSG . ';topicseen#new" class="smflasttopic">'. $baslik->subject .'</a><br><span class="smftopicextra">'.__('Last post by:','wp_smf').' <a href="' .  $boardurl . '?action=profile;u=' . $baslik->ID_MSG . '">'. $baslik->posterName .'</a> '.__('Topic:','wp_smf').'  <a href="'.$boardurl .'?board=' . $baslik->ID_BOARD .'.0">'.$baslik->bName.'</a>  '.__('Date:','wp_smf').' '. date("d.m.Y H:i",$baslik->posterTime) .'</span>'.$mesajdansonra;
      $count = $count + 1;
   }
   echo $hepsindenonce.$content.$hepsindensonra;
   
   $wpdb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);   
}

function SMF_EnSonUyeler($limit=10,$hepsindenonce,$mesajdanonce,$mesajdansonra,$hepsindensonra) {
global $smf_settingsphp_d;

   if(file_exists($smf_settingsphp_d)) include($smf_settingsphp_d);

   $baglan = new wpdb($db_user,$db_passwd,$db_name,$db_server);
   $baglan->query("SET NAMES 'UTF8'");
   $SQL="select m.ID_MEMBER, m.memberName from {$db_prefix}members AS m order by m.ID_MEMBER desc limit $limit";
   $uyeler = $baglan->get_results($SQL);
   foreach ($uyeler as $uye) {
      $content .= $mesajdanonce. '<a href="' . $boardurl . '?action=profile;u=' . $uye->ID_MEMBER . '" class="smflastmember">'. $uye->memberName .'</a>'.$mesajdansonra;
      $count = $count + 1;
   }
   echo $hepsindenonce.$content.$hepsindensonra;
   
   $wpdb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);         
}

function SMF_ForumIstatistik($hepsindenonce,$mesajdanonce,$mesajdansonra,$hepsindensonra) {
global $smf_settingsphp_d;

   if(file_exists($smf_settingsphp_d)) include($smf_settingsphp_d);

   $baglan = new wpdb($db_user,$db_passwd,$db_name,$db_server);
   $baglan->query("SET NAMES 'UTF8'");
   $toplam_bolum = $baglan->get_row("SELECT COUNT(ID_BOARD) AS toplam_bolum FROM {$db_prefix}boards");
   $toplam_bolum_s = $toplam_bolum->toplam_bolum;
   $toplam_kategori = $baglan->get_row("SELECT COUNT(ID_CAT) AS toplam_kategori FROM {$db_prefix}categories");
   $toplam_kategori_s = $toplam_kategori->toplam_kategori;
   $toplam_uye = $baglan->get_row("SELECT COUNT(ID_MEMBER) AS toplam_uye FROM {$db_prefix}members");
   $toplam_uye_s = $toplam_uye->toplam_uye;
   $toplam_mesaj = $baglan->get_row("SELECT COUNT(ID_MSG) AS toplam_mesaj FROM {$db_prefix}messages");
   $toplam_mesaj_s = $toplam_mesaj->toplam_mesaj;
   $toplam_konu = $baglan->get_row("SELECT COUNT(ID_TOPIC) AS toplam_konu FROM {$db_prefix}topics");
   $toplam_konu_s = $toplam_konu->toplam_konu;

   $content .= $mesajdanonce. __('Total Members:','wp_smf').' <a href="'. $boardurl . '?action=mlist">' .$toplam_uye_s. '</a>'.$mesajdansonra;
   $content .= $mesajdanonce. __('Total Posts:','wp_smf').' '.$toplam_mesaj_s.$mesajdansonra;
   $content .= $mesajdanonce. __('Total Topics:','wp_smf').' '.$toplam_konu_s.$mesajdansonra;
   $content .= $mesajdanonce. __('Total Categories:','wp_smf').' '.$toplam_kategori_s.$mesajdansonra;
   $content .= $mesajdanonce. __('Total Boards:','wp_smf').' '.$toplam_bolum_s.$mesajdansonra;
   
   
   echo $hepsindenonce.$content.$hepsindensonra;
   
   $wpdb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);      
}
?>
« Last Edit: June 09, 2007, 03:14:29 AM by jjgallow »

Offline RoarinRow

  • Full Member
  • ***
  • Posts: 662
  • Gender: Male
  • Ride my AV!
    • Avalanche Style
Re: SMF & WordPress
« Reply #17 on: June 08, 2007, 06:38:49 PM »
Cool jjgallow  8)  Could you please provide more information on how to implement the changes?

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

Offline jjgallow

  • Jr. Member
  • **
  • Posts: 122
    • StockDiaries.com
Re: SMF & WordPress
« Reply #18 on: June 09, 2007, 02:45:33 AM »
Sure thing.

Ok, I've hosted an updated WP_SMF package here, with all changes:

http://www.earthorbit.com/opensource

I've also added an admin panel to wordpress to configure the plugin with SMF.  Should be simpler this way.

Included is a readme.txt file with instructions.  The instructions are also exactly the same as described in:

http://www.dmry.net/wordpress-smf-bridge-plugin-10/
(which is the original author's site...I will try to contact them with the update).



While there is always more work to do, this package should function properly for what it was meant to do.  I will continue to develop it for my site and share the code as I go.

Please let me know how it works for you.

cheers,

Jeff
« Last Edit: June 09, 2007, 04:29:12 PM by jjgallow »

Offline Vandaahl

  • Jr. Member
  • **
  • Posts: 170
    • Cinema Extreme
Re: SMF & WordPress
« Reply #19 on: June 11, 2007, 02:05:44 PM »
What exactly does this plugin do? Does it give all existing SMF users a Wordpress blog?