Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: XP Publisher Wizard for Bridged CPG Revisited  (Read 2355 times)

0 Members and 1 Guest are viewing this topic.

giorgio79

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 114
XP Publisher Wizard for Bridged CPG Revisited
« on: March 24, 2007, 12:28:43 pm »

Hi Guys,

I have read several threads on the login issue to a bridged cpg with XP Publisher Wizard.

I too cannot login, as when I type username/pass the login screen in the wizard continuosly reappears...
This happens even while I am logged in to CPG with IE.

Is there a work around for this?

I read that someone would need to code this as XP publisher does not support bridged login, and I do not think this should be a big deal, as all the functionality exists already.

Can someone point me to a direction on where to start poking around?

Should I be copying the login function from bridge/udb_base.inc.php to the xp_publish.php?

I found this in udb_base.inc.php

Code: [Select]
        // Simple login by specified username and pass.
        // Used for xp publisher login
        // Needs override for any BBS that is more complex than straight md5(password)
        function login( $username = null, $password = null, $remember = false ) {

                $encpassword = md5($password);

                // Check for user in users table
        $sql =  "SELECT {$this->field['user_id']} AS user_id, {$this->field['username']} AS user_name FROM {$this->usertable} WHERE ";
        $sql .= "{$this->field['username']} = '$username' AND BINARY {$this->field['password']} = '$encpassword'";
                $results = cpg_db_query($sql);

                if (mysql_num_rows($results)) {
                        $USER_DATA = mysql_fetch_assoc($results);
                        mysql_free_result($results);
                        return $USER_DATA;
                } else {
                        return false;
                }
        }


and this in udb_base.inc.php

Code: [Select]
// Process login information
function process_login()
{
    global $CONFIG, $USER; //$PHP_SELF,
    global $ONNEXT_SCRIPT, $ONBACK_SCRIPT, $WIZARD_BUTTONS;
    global $template_login_success, $template_login_failure,$template_login;
    global $lang_login_php, $cpg_udb;

    $tt = 'worked';

    if ( $USER_DATA = $cpg_udb->login(addslashes($_POST['username']), addslashes($_POST['password'])) ) {
        $USER['am'] = 1;
        user_save_profile();

        $params = array('{WELCOME}' => sprintf($lang_login_php['welcome'], USER_NAME),
            '{POST_ACTION}' => trim($CONFIG['site_url'], '/') . '/' . $_SERVER['PHP_SELF'] . '?cmd=publish',
            );

        echo template_eval($template_login_success, $params);
    } else {
        $params = array('{ERROR}' => $lang_login_php['err_login'],
            '{POST_ACTION}' => trim($CONFIG['site_url'], '/') . '/' . $_SERVER['PHP_SELF'] . '?cmd=publish',
            );


        echo template_eval($template_login_failure, $params);
    }

    $ONNEXT_SCRIPT = 'dummy.submit();';
    $ONBACK_SCRIPT = 'dummy.submit();';
    $WIZARD_BUTTONS = 'true,true,false';
}

Logged

pvisser

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: XP Publisher Wizard for Bridged CPG Revisited
« Reply #1 on: June 30, 2008, 02:04:45 pm »

Yes Same here. I Bridge the whole album in my SMF site. It all  works fine but XP Publisher is not working is the bridged version in VISTA but is does in XP. I Use CP 1.4.8 SMF 1.1.4 and I did some scripting myself like Last 20 uploaded pics in SMF User profile, Menu like upload in SMF user profile. Button in posts from SMF user See my albums  and pictures etc.

When i change from Bridge to Sand alone it works in VISTA and in XP. I think it has to with, Cookies or else. I hope someone has a sulotion for it. I by glad to give my coding to othere users whos bridged in SMF for the above scipting. Just let my know..

 8)
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.