Changeset 59

Show
Ignore:
Timestamp:
06/04/07 13:43:04 (2 years ago)
Author:
pdingle
Message:

Added an <ic> icon to the front page, and to the login form -- no need for the wp_redirect to rewrite the login page anymore. Started work on a registration page.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-infocard/pw-config.php

    r44 r59  
    2121define ('PW_PLUGINURL', get_settings('siteurl') . PW_PLUGINPATH ); 
    2222define ('PW_IMGURL', PW_PLUGINURL . '/pwlib/images'); 
    23 define ('PW_SECUREPLUGINURL', get_settings('pw_securesiteurl') . '/' . PW_PLUGINPATH ); 
     23define ('PW_SECUREPLUGINURL', get_settings('pw_securesiteurl') . PW_PLUGINPATH ); 
    2424define ('PW_SITEMESGURL', PW_PLUGINURL . '/site-messages/infocard-usermessage.php'); 
    25 /////Temporary 
    2625define ('PW_SECURESITEURL', get_settings('securesiteurl') ); 
     26define ('PW_FP_ICON', 'ic-logo-blue-icon.png' ); // icon must be in /pwlib/images/ic-logo 
    2727?> 
  • trunk/wp-infocard/wp-infocard.php

    r42 r59  
    4242add_action( 'delete_user', array( &$wpInfocard, 'pw_deleteUserCards' ) ); 
    4343 
     44// function to add information card link to front page 
     45add_filter( 'loginout', array( $wpInfocard, 'pw_frontpage_link' )); 
     46// function to add information card link to wp-login.php  
     47add_action( 'login_form', array( $wpInfocard, 'pw_loginform_link')); 
     48 
    4449function infocard_options()  
    4550{ 
  • trunk/wp-infocard/wp/admin.pw.php

    r58 r59  
    2727        // Output: none 
    2828        // Side effect: initializes some parameters 
    29         function pw_infocard() { 
     29        function pw_infocard()  
     30        { 
    3031                global $table_prefix; 
    3132 
     
    169170                $this->createOption('pw_enable_pass', 0); 
    170171 
     172 
     173 
    171174        } // end function setup 
    172175 
     
    197200                return $wpdb->query( $query ); 
    198201        } // end function delete_user_cards 
     202 
     203        function pw_frontpage_link( $link )  
     204        { 
     205                global $current_user; 
     206                $chunk = ""; 
     207                if( !$current_user->ID ) 
     208                { 
     209                       $chunk ='</li><li><a href="' 
     210                        . PW_SECUREPLUGINURL .'/' . PW_PLUGIN 
     211                        . '/login/infocard-login.php" alt="' 
     212                        . __('Information Card Login') 
     213                        . '"><img src="' 
     214                        . PW_IMGURL . '/ic-logo/' .PW_FP_ICON  
     215                        . '"/></a></li>'; 
     216                } 
     217                return $link . $chunk; 
     218        } //end function pw_frontpage_link 
     219 
     220        function pw_loginform_link()  
     221        { 
     222?> 
     223        <hr /> 
     224                <a href="<?php echo PW_SECUREPLUGINURL . '/' . PW_PLUGIN; ?>/login/infocard-login.php" alt="<?php _e('Infocard Login'); ?>" style="border-bottom: none; color: #FFF"> 
     225                        <?php _e('Login or Register using an Information Card'); ?> 
     226                        <br/> 
     227                        <img src="<?php echo PW_IMGURL; ?>/ic-logo/ic-logo-blue-icon-wp-login2.png" /> 
     228                </a> 
     229                &nbsp; <a alt="<?php echo __('What is this?'); ?>" style="border-bottom: none; color: #fff"  href="http://pamelaproject.com/"> 
     230                        <?php echo __('(what is this?)'); ?> 
     231                </a>  
     232<?php 
     233        } //end function pw_loginform_link 
    199234 
    200235} // end class pw_infocard