Bridge SMF 1.1 e107 beta 1

Started by Orstio, January 12, 2008, 08:56:15 PM

Previous topic - Next topic

PSPx000

Can any one help, ?

What if SMF is at
www*exampleFORUM*com

and e107 is at
www*example*com


Orstio


deltree

#162
Hello all... I need some help!

I have a little problem when I try syncronize my e107 with the smf_members table... let me try explain it to you:

1) I had edit the e107 file "\usersettings.php" this is the file that edit the e107 members profile, and then I did have include this few code lines bellow:
Quote
// File name: \usersettings.php

            if ($sql->db_Select('user', '*', "user_id = '" . intval($inp) . "'")) {
                $xrow = $sql->db_Fetch();
                $xuser_email = $xrow['user_email'];
                $xuser_name = $xrow['user_name'];
                $xuser_loginname = $xrow['user_loginname'];
                if (ADMIN && getperms("4")) {
                    $xuser_loginname = $tp->toDB($loginname);
                }
            }

            $sql->db_Update("user", "{$new_username} {$pwreset} " . $sesschange . ", user_email='" . $tp->toDB($_POST['email']) . "', user_signature='" . $_POST['signature'] . "', user_image='" . $tp->toDB($_POST['image']) . "', user_timezone='" . $tp->toDB($_POST['timezone']) . "', user_hideemail='" . $tp->toDB($_POST['hideemail']) . "', user_login='" . $_POST['realname'] . "' {$new_customtitle}, user_xup='" . $tp->toDB($_POST['user_xup']) . "' WHERE user_id='" . intval($inp) . "' ");

           // SMF Forum
           $xquery = "SELECT ID_MEMBER, realName, memberName, emailAddress FROM `smf_members` WHERE emailAddress='" . $xuser_email . "' LIMIT 0,1";
           $xsql = mysql_query($xquery) or die(mysql_error());
           if ($xrow = mysql_fetch_array($xsql)) {
              $ID_Forum = $xrow['ID_MEMBER'];

              $xquery = "UPDATE smf_members SET realName='" . $new_usern . "', memberName='" . $tp->toDB($xuser_loginname) . "', emailAddress='" . $tp->toDB($_POST['email']) . "' WHERE ID_MEMBER='" . $ID_Forum . "' ";
              $xsql = mysql_query($xquery) or die(mysql_error());

              // Update CLAN ROSTER
              $xquery= "SELECT clan_roster_id, clan_roster_tag FROM `" . MPREFIX . "clan_roster` WHERE clan_roster_id='" . intval($inp) . "'";
              $xsql = mysql_query($xquery) or die(mysql_error());

              if ($xrow = mysql_fetch_array($xsql)) {
                 $xname = $row['clan_roster_tag'];
                 if ($xname != $username) {
                    $xquery= "UPDATE ".MPREFIX."clan_roster SET clan_roster_tag='" . $tp->toDB($username) . "' WHERE clan_roster_id='" . intval($inp) . "'";
                      $xsql = mysql_query($xquery) or die(mysql_error());
                 }
               }
             }

* The problem is... when a member try make some changes on the e107 profile's, such as ("user_name", "user_loginname" and "user_email"), this routine and try do update it on the smf_members database and it's create a new register on the smf_memebers, so at the end I have double registers of the same member on the smf_memebrs db! (Why it didn't just updated the table "smf_members"?)

What I am doing wrong here??? (note: I already have the "smf_1-1_e107_bridge_1-1_beta_1" on my e107; and its works fine atm, but I just wish synchronize some few fields with my own site when some member wish change it!)



* Forum version: SMF 1.1.8
* e107 version: 0.7.5
* The SMF data works fine on the same e107 database.
* My Website is: hxxp:geforceelite.com [nonactive]

Orstio

$new_usern  should be $new_username ?

deltree

#164
Quote from: Orstio on January 08, 2010, 04:21:41 PM
$new_usern  should be $new_username ?

No, it's correct... but I'm still have the same problem, do u have an idea about why it's happen?

* Note: I am not an expert in PHP/MySQL, so... maybe I am use the wrong MySQL command lines to updated the smf_members table, sorry for my ignorance here, but I really dont know what to do, and also if this code script that I was wrote is correctly?

Orstio

If you want to use field names from query output, you should use mysql_fetch_assoc instead of mysql_fetch_array.  Not sure about your server config, so maybe it works as well with array, but it's better form to use assoc.

deltree

#166
Could you give me some examples about what u mean, pls? cos, I dont know how works this commands (mysql_fetch_assoc instead of mysql_fetch_array) and also I don't know how to do for use the assoc in MySQL.

Thx in Advance!

WhiteKnight30303

#167
I've installed this bridge on several of my websites, but I'm having trouble getting it to work on this particular one:

hxxp:www.pixel-gamers.com/forums [nonactive]

The quote buttons no longer work on the forum, and regardless of your preference settings, it refuses to take you back to the topic you just posted on after you post.

Edit1:
I checked the error log and found it filled with 135 pages of the following error repeating:

Quote from: Error Log
Guest    Today at 12:45:56 AM
hxxp:www.pixel-gamers.com/e107_plugins/smf/smf.php?board=7.0 [nonactive]
8: Undefined variable: ID_MEMBER
/home/<removed>/public_html/e107_plugins/smf/smf.php
347

Wajalot

#168
Hi

I installed e107 in http://teo2.wajalot.net [nofollow] and smf in http://teo2.wajalot.net/forum [nofollow], the bridge seems works properly but is not true cause the wrap call itself many times.... Where is the problem?

Thanks in advance.

I don't know what I´ve done, but now works perfect.

Foghorn Leghorn

Hello,

Is there any chance to get the bridge working, while the forum is in subdomain?
ex:
e07=> http*www.my-domain.xx/
SMF=> http*www.forum.my-domain.xx/

Thanks in advance for any help or suggestions :)

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Bruno36

Hello!

I install the bridge, when I click on a blank page I  http://www.scooter-chinois-4t.com/e107_plugins/smf/smf.php I have a blank page
Bruno36 the French
SMF 2.0.9

brianhill1980

I cannot get the bridge to work with e107 v0.7.24 and e107 Bridge 1.1 beta.

When I install the script, I try to go to the configuration page and I I get this error.

QuoteInternal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Looking into the error log on the server, this is the message I get.

Quote[Sat Apr  2 13:18:46 2011] [error] [client 96.48.205.171] File does not exist: /home/letha6/public_html/500.shtml
[Sat Apr  2 13:18:46 2011] [error] [client 96.48.205.171] Premature end of script headers: /home/letha6/public_html/home/e107_plugins/smf/admin_smf_config.php
SoftException in Application.cpp:256: File "/home/letha6/public_html/home/e107_plugins/smf/admin_smf_config.php" is writeable by group
[Sat Apr  2 13:17:07 2011] [error] [client 96.48.205.171] malformed header from script. Bad header=Not Modified: /home/letha6/public_html/site/forum/download/file.php
[Sat Apr  2 13:17:07 2011] [error] [client 96.48.205.171] malformed header from script. Bad header=Not Modified: /home/letha6/public_html/site/forum/download/file.php
[Sat Apr  2 13:17:07 2011] [error] [client 96.48.205.171] malformed header from script. Bad header=Not Modified: /home/letha6/public_html/site/forum/download/file.php
[Sat Apr  2 13:17:07 2011] [error] [client 96.48.205.171] malformed header from script. Bad header=Not Modified: /home/letha6/public_html/site/forum/download/file.php
[Sat Apr  2 13:17:07 2011] [error] [client 96.48.205.171] malformed header from script. Bad header=Not Modified: /home/letha6/public_html/site/forum/download/file.php

Any help would be appreciated.

SilverKnight


Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

achtung

Is anyone working on a bridge for 2.0?

zachdude

I install the bridge but it doesn't work. I have tried using the default ../forum path, and the full path (e.g. /public_html/blah/forum) and IDK what I'm doing wrong...

you can try it at hxxp:atl.brutalbrainwork.com [nonactive]

Kindred

well, first of all - doesn't work is hardly a useful statement. HOW is is not working? error messages?

second, smf version? e107 version?

third, as you might have noticed if you read the rest of this thread, this bridge is not actually fully functional and has some issues at the moment.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: