Changeset 126

Show
Ignore:
Timestamp:
12/03/07 14:22:08 (1 year ago)
Author:
pdingle
Message:

added a disabled infocard icon and put it in the profile page

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/RB-0.9/wp-infocard/site-messages/infocard-usermessage.php

    r112 r126  
    22<?php 
    33$messageType = $_REQUEST['mesg']; 
     4 
    45 
    56include_once( dirname(__FILE__) . '/../' . '/pw-config.php'); 
  • branches/RB-0.9/wp-infocard/wp-infocard.php

    r123 r126  
    4747// function to add information card link to wp-login.php  
    4848add_action( 'login_form', array( $wpInfocard, 'pw_loginform_link')); 
     49add_action( 'register_form', array( $wpInfocard, 'pw_registerform_link')); 
    4950 
    5051//if ( PW_USECAPTCHAS ) 
  • branches/RB-0.9/wp-infocard/wp/admin.pw.php

    r122 r126  
    239239        { 
    240240                global $current_user; 
    241                 if (strpos($_SERVER[SCRIPT_URI], "https")) 
    242                 { 
    243                         $css = PW_PLUGINURL . "/custom/infocard-frontpage.css"; 
    244                 } 
    245                 else 
    246                 { 
    247                         $css = PW_SECUREPLUGINURL . "/custom/infocard-frontpage.css"; 
    248                 } 
     241                $css = get_option('siteurl') . "/custom/infocard-frontpage.css"; 
    249242 
    250243                $chunk = ""; 
    251244                if( !$current_user->ID ) 
    252245                { 
    253                         $chunk = '<link rel="stylesheet" href="'.$css.'" type="text/css" />'; 
     246                        //$chunk = '<link rel="stylesheet" href="'.$css.'" type="text/css" />'; 
     247                        $chunk = ''; 
    254248                        // note I set the CSS styles inline because otherwise 
    255249                        // the user has to link infocard.css - not worth it 
    256250                        // for this one icon 
    257                        $chunk .='</li><li><a id="pw_frontpage_link" href="' 
     251                       $chunk .='<li><a href="' 
    258252                        . PW_SECUREPLUGINURL .'/' . PW_PLUGIN 
    259253                        . '/login/infocard-login.php" alt="' 
    260254                        . __('Information Card Login') 
    261                         . '"><img id="pw_frontpage_icon" src="' 
     255                        . '" style="border-bottom:none;"><img src="' 
    262256                        . PW_IMGURL . '/' .PW_FP_ICON  
    263                         . '"/></a></li>'; 
     257                        . '" style="border:none; border-bottom: none;"/></a></li>'; 
    264258                } 
    265                 return $link . $chunk; 
     259               return $link . $chunk; 
    266260        } //end function pw_frontpage_link 
    267261 
     
    283277        } //end function pw_loginform_link 
    284278 
     279 
     280        function pw_registerform_link() 
     281        { 
     282//              if ( PW_USECAPTCHAS ) 
     283//                      display_cryptographp(); 
     284?> 
     285        <hr /> 
     286                <a href="<?php echo PW_SECUREPLUGINURL . '/' . PW_PLUGIN; ?>/login/infocard-login.php" alt="<?php pw_utils::screenPrint('Infocard Login'); ?>" style="border-bottom: none; color: #FFF"> 
     287                        <?php pw_utils::screenPrint('Register using an Information Card'); ?> 
     288                        <br/> 
     289                        <img src="<?php echo PW_IMGURL; ?>/infocard_60x42.png" style="padding:10px" /> 
     290                </a> 
     291                &nbsp; <a alt="<?php echo __('What is this?'); ?>" style="border-bottom: none; color: #fff"  href="http://pamelaproject.com/"> 
     292                        <?php echo __('(what is this?)'); ?> 
     293                </a> 
     294<?php 
     295        } //end function pw_registerform_link 
     296 
    285297        function pw_printUserCardStatus() 
    286298        { 
     
    295307?> 
    296308                        <p> 
    297                                 <img src="<?php echo PW_IMGURL; ?>/ic-logo/ic-logo-blue-icon.png"/> <?php pw_utils::screenPrint('Information Card ID: ' . $handle); ?> 
     309                                <img src="<?php echo PW_IMGURL; ?>/infocard_60x42.png"/>  
     310<?php  
     311                        pw_utils::screenPrint('An Information Card is associated with this account');  
     312                        //pw_utils::screenPrint('Information Card ID: ' . $handle);  
     313?> 
    298314                        </p> 
    299315 
     
    305321                                . "<label for='Information Card Info' style='display: inline'><img src=\"" 
    306322                                . PW_IMGURL 
    307                                 . '/ic-logo/ic-logo-disabled.png"' 
     323                                . '/infocard_60x42_disabled.png"' 
    308324                                . " style='vertical-align: middle'/> &nbsp;"; 
    309                                 pw_utils::screenPrint('No Information Card in use.'); 
     325                                pw_utils::screenPrint('No Information Card associated with this account.'); 
    310326                                echo "</label></p>"; 
    311327                } 
  • branches/RB-0.9/wp-infocard/wp/processing.pw.php

    r122 r126  
    2626                pw_utils::printDebug("&nbsp;Login ID: ".$datamap['user_login']->new_value."<br />"); 
    2727                pw_utils::printDebug("&nbsp;Account ID: ".$datamap['ID']->new_value."<br />"); 
    28                 pw_utils::printDebug("&nbsp;Status: ".$status." <br/>"); 
     28                pw_utils::printDebug("&nbsp;User Status: ".$status." <br/>"); 
    2929 
    3030                pw_utils::printDebug("&nbsp;Errors: ");  
     
    3434                        pw_utils::printDebug(" none<br />"); 
    3535 
    36                 pw_utils::printDebug("&nbsp;Trusted Source:"); 
    37                 if ($blessed) 
    38                         pw_utils::printDebug("Yes<br/>"); 
    39                 else 
    40                         pw_utils::printDebug("No<br/>"); 
     36                pw_utils::printDebug("&nbsp; Issuer Trust: ".$blessed."<br />"); 
    4137 
    4238                pw_utils::printDebug("&nbsp;Account Validation: "); 
    43                 if ($validated
    44                         pw_utils::printDebug("Sent<br/>"); 
     39                if ($validated === 'validate'
     40                        pw_utils::printDebug("Required<br/>"); 
    4541                else 
    4642                        pw_utils::printDebug("Not needed<br/>"); 
  • branches/RB-0.9/wp-infocard/wp/userdata.pw.php

    r125 r126  
    7777                } 
    7878 
    79                 pw_utils::printDebug('&nbsp;&nbsp;Card belongs to account #: ' . $identity_user_id . "<br/>" );  
     79                pw_utils::printDebug('Card Found:  Acct# ' . $identity_user_id . "<br/>" );  
    8080 
    8181                $query = "SELECT * from " . PW_TABLE_PREFIX . "users " 
     
    164164        { 
    165165                global $claimslist, $datamap; 
    166                 pw_utils::printDebug('<br/>Mapped Token Data:<br/>'); 
     166                pw_utils::printDebug('<br/>Mapped Token Data:<br/>', 1); 
    167167                foreach(array_keys($datamap) as $key) 
    168168                { 
    169169                        $datamap[$key]->new_value = eval($datamap[$key]->mappingfunction); 
    170170                        //pw_utils::printDebug('&nbsp;Mapping Function: '.$datamap[$key]->mappingfunction.'<br/>'); 
    171                         pw_utils::printDebug('&nbsp;' . $datamap[$key]->handle.'&nbsp;Value: '.$datamap[$key]->new_value.'<br/>'); 
    172                 } 
    173                 pw_utils::printDebug('<br />'); 
     171                        pw_utils::printDebug('&nbsp;' . $datamap[$key]->handle.'&nbsp;Value: '.$datamap[$key]->new_value.'<br/>', 1); 
     172                } 
     173                pw_utils::printDebug('<br />', 1); 
    174174        } // end function mapTokenData 
    175175 
     
    239239                if ($loginid) 
    240240                { 
    241                         pw_utils::printDebug('&nbsp;getLoginID: Login ID already exists: '.$loginid.'<br/>'); 
     241                        pw_utils::printDebug('LoginID Mapping: LoginID has already been created for the user: '.$loginid.'<br/>', 2); 
    242242                        return $loginid; 
    243243                } 
    244244                $loginid = $datamap['user_email']->new_value; 
    245                 //$loginid = 'pamtest'; 
    246                 pw_utils::printDebug('&nbsp;getLoginID: Login ID generated: '.$loginid.'<br/>'); 
     245                pw_utils::printDebug('LoginID Mapping: LoginID generated: '.$loginid.'<br/>', 2); 
    247246                return $loginid; 
    248247        } //end function getLoginID 
     
    268267        function updateUserData( $ID, $datamap ) 
    269268        { 
    270                 pw_utils::printDebug('Comparing Existing Values to Newly Mapped Values for Account # ' . $ID . ':<br />'); 
     269                pw_utils::printDebug('<br />Account Data Analysis (Acct# ' . $ID . ')<br />'); 
    271270 
    272271                // not sure if there is a more graceful way to do this... 
     
    296295                if (wp_update_user($userdata)) 
    297296                { 
    298                         pw_utils::printDebug('&nbsp;WP-User Updates Successful'); 
     297                        pw_utils::printDebug('<br />WP-User Updates Successful', 2); 
    299298                } 
    300299        } // end function updateUserData 
     
    327326                        . "OR accountid = '$acct'"; 
    328327 
    329                 pw_utils::printDebug($query); 
    330  
    331328                $results = $wpdb->get_results( $query, OBJECT ); 
    332                 pw_utils::printDebug( '<br/>IdentityData: <br/>' );    
     329                pw_utils::printDebug( '<br />Card Data Analysis: <br />' );    
    333330 
    334331                switch ( count($results) ) 
     
    453450                                $datamap['cardhandle']->add_db_value($identity_info[0]->cardhandle); 
    454451                                $card_info['found'] = TRUE; 
    455                                 pw_utils::printDebug('&nbsp;&nbsp;Card belongs to account #: ' . $identity_info[0]->accountid . "<br/>" ); 
     452                                pw_utils::printDebug('Card Found: Acct# ' . $identity_info[0]->accountid . "<br/>" ); 
    456453                                break; 
    457454                        case 0: 
     
    520517                global $wpdb, $datamap; 
    521518 
    522                  pw_utils::printDebug( '<br/>Getting Card Info from Card Hash:' . $cardhash . '<br/>'); 
     519                 pw_utils::printDebug( 'Presented card identified as: ' . $cardhash . '<br/>', 1); 
    523520 
    524521                $query = "SELECT * FROM `" . PW_TABLE_PREFIX 
     
    574571                                $datamap['cardhandle']->add_db_value($identity_info[0]->cardhandle); 
    575572                                $results['found'] = TRUE; 
    576                                 pw_utils::printDebug('&nbsp;&nbsp;Card belongs to account #: ' . $datamap['ID']->db_value . "<br/>" ); 
     573                                pw_utils::printDebug('-- Card belongs to account #: ' . $datamap['ID']->db_value . "<br/>", 2); 
    577574                                break; 
    578575                        case 0: 
     
    611608                                // 
    612609                                $results['found'] = TRUE; 
    613                                 pw_utils::printDebug('&nbsp;&nbsp;User Data found & mapped, based on Account ID.<br />' ); 
     610                                pw_utils::printDebug('&nbsp;&nbsp;User Data found & mapped, based on Account ID.<br />', 1); 
    614611                                foreach (array_keys($datamap) as $key) 
    615612                                { 
     
    710707                                $datamap['cardhandle']->add_db_value($identity_info[0]->cardhandle); 
    711708                                $results['found'] = TRUE; 
    712                                 pw_utils::printDebug('&nbsp;&nbsp;Card belongs to account #: ' . $accountID . "<br/>" ); 
     709                                pw_utils::printDebug('Card belongs to account #: ' . $accountID . "<br/>" ); 
    713710                                break; 
    714711                        case 0: