Changeset 56

Show
Ignore:
Timestamp:
06/01/07 10:46:12 (2 years ago)
Author:
pdingle
Message:

added default pw-config file for wp, added vendor directory and jquery.js, created new infocard-login.php, altered instructions for editing wp-login.php

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-infocard/infocard.css

    r24 r56  
    1616        text-decoration: none; 
    1717} 
    18  
    1918body, td { 
    2019        font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana; 
     
    236235} 
    237236 
     237#debug { 
     238        background: #ECECE3 none repeat scroll 0%; 
     239        border: 1px solid #DBDAC4; 
     240        padding: 1em; 
     241        margin: 3em; 
     242        width: 50em; 
     243        font-size: 0.8em; 
     244} 
     245 
     246#pw_login_main { 
     247        background: #FFF; 
     248        border: 1px solid #DBDAC4; 
     249        padding: none; 
     250        margin: 3em; 
     251        width: 50em; 
     252} 
     253 
     254#pw_login_header { 
     255        background: #DBDAC4; 
     256        padding: 0.5em; 
     257 
     258} 
     259 
     260#pw_login_header h1{ 
     261        margin-top: 0px; 
     262        margin-bottom: 0px; 
     263        padding: 0.5em; 
     264        font-size: 1.8em; 
     265} 
     266 
     267#pw_login_intro { 
     268        margin: 3em; 
     269} 
     270 
     271#pw_login_links { 
     272        margin: none; 
     273        margin-top: -1em; 
     274        display: block; 
     275        padding: 0.5em; 
     276        padding-left: 0em; 
     277 
     278} 
     279#pw_login_links table { 
     280        list-style: none;        
     281        padding: 0em; 
     282        margin-top:  0px; 
     283} 
     284#pw_login_links td { 
     285        background: #FFF; 
     286        display: inline; 
     287        border: 1px solid #686868; 
     288        padding: 0.5em; 
     289        margin: 0.2em; 
     290        font-size: 0.8em; 
     291} 
     292#pw_login_links a { 
     293        text-decoration: none; 
     294        border-bottom: none; 
     295        color: #000; 
     296} 
     297#pw_login { 
     298        text-align: center; 
     299} 
     300#pw_login_submit { 
     301        display: block; 
     302        height: 75px; 
     303        width: 18em; 
     304        border: none; 
     305        text-align: right; 
     306        text-indent: 55px; 
     307        font-size: 1.5em; 
     308        margin-left: 15%; 
     309        background: transparent url( pwlib/images/cardlogo.gif ) no-repeat; 
     310} 
     311#showrpobject { 
     312        text-align: left; 
     313        font-family: "courier new", serif; 
     314        font-size: 0.8em; 
     315        border: 1px solid #686868; 
     316        padding-left: 1em; 
     317        padding-bottom: 0.5em; 
     318        margin-left: 3em; 
     319        margin-right: 1em; 
     320        margin-top: 1em; 
     321} 
     322 
     323#pw_login_footer { 
     324        background: #000;        
     325        height: 60px; 
     326        text-align: center; 
     327        border-bottom: none; 
     328        margin-top: 2em; 
     329} 
     330 
     331#pw_pamelaproject_logo { 
     332        display: block; 
     333        margin-left: auto; 
     334        margin-right: auto; 
     335        border-bottom: none; 
     336} 
     337 
     338#pw_login_footer a:link img { 
     339         text-decoration: none; 
     340         border:0; 
     341         border:none; 
     342} 
     343#pw_login_footer a:visited img { 
     344        color: #3366FF; 
     345        border:0; 
     346        border:none; 
     347} 
     348#pw_login_footer a:hover img{ 
     349        text-decoration: none; 
     350        border:0; 
     351        border:none; 
     352} 
  • trunk/wp-infocard/pwlib/login/infocard-submit.php

    r53 r56  
    6060<?php 
    6161  // Checking for people who don't know you need to use https at this point 
    62         if ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ){ 
    63 ?> 
    64 <?php 
    65                         if (PW_DEBUG_ON == FALSE) 
    66                         { 
    67 ?> 
    68                 <script language="JavaScript" type="text/JavaScript"> 
    69                         <!-- 
    70                         document.ctl00.submit(); 
    71                         --> 
    72                 </script> 
    73 <?php                    
    74                         } 
    75         } else { 
     62        if ( !isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' )       { 
    7663                pw_utils::errorPageRedirect('NOHTTPS'); 
    7764        } 
  • trunk/wp-infocard/pwlib/utils.pwlib.php

    r42 r56  
    157157                } 
    158158        } // end function printDebug 
    159          
     159 
     160        function displayPamelaProjectLogo() 
     161        { 
     162                echo PW_PLUGINURL . "/pwlib/images/pp-logo-bw-small.png"; 
     163        } 
    160164} // end class pw_utils 
    161165?> 
  • trunk/wp-infocard/wp/admin.pw.php

    r42 r56  
    367367?> 
    368368                                <code><br/>&nbsp; 
    369                                         wp_redirect( get_settings('siteurl')."/wp-content/plugins/wp-infocard/wp/login/infocard-login.php"); 
     369                                        wp_redirect( get_settings('pw_securesiteurl')."/wp-content/plugins/wp-infocard/wp/login/infocard-login.php"); 
    370370                                </code> 
    371371                        </li> 
  • trunk/wp-infocard/wp/clickback.pw.php

    r42 r56  
    88        // this class details all of the functionality needed to support clickbacks. 
    99        // PW_CLICKBACK_LENGTH is set in pw-config.php 
     10        function printHiddenClickback($clickback = "") 
     11        { 
     12                if ($clickback) 
     13                { 
     14                        $debug = "Clickback detected: $clickback"; 
     15                        print "\n\t<input type=\"hidden\" name=\"clickback\" " 
     16                        . "value=\"$clickback\t\" />"; 
     17                } 
     18                else 
     19                { 
     20                        $debug = "No clickback detected"; 
     21                } 
     22                return $debug; 
     23        } // end function printClickback 
    1024 
    1125        function createChallenge( $data ) { 
  • trunk/wp-infocard/wp/login/infocard-login.php

    r53 r56  
    1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    2 <?php 
    3 //////////////////////////////////////////////////////// 
    4 // login.php 
    5 // 
    6 // login.php is an html template that uses CSS look/feel from  
    7 // infocard.css, and calls functions from class.infocard-login.php.   
    8 // You should not have to alter this file in most cases. 
    9 // 
    10 /////////////////////////////////////////////////////// 
    11 define( '_VALID_IC', 1 );  
    12 include_once( dirname(__FILE__) . '/../../class.infocard-basic.php');  
    13 include_once( dirname(__FILE__) . '/../utils.pw.php');  
    14 include_once('class.infocard-login.php');  
    15 include_once( dirname(__FILE__) . '/../../pwlib/login/login.pwlib.php');  
     1<DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     2<?php  
     3define( '_VALID_IC', 1 ); 
     4include_once( dirname(__FILE__) . '/../../pw-config.php'); 
     5include_once( dirname(__FILE__) . '/../../' . PW_PLUGIN . '/utils.pw.php'); 
     6include_once( dirname(__FILE__) . '/../../' . PW_PLUGIN . '/clickback.pw.php'); 
     7include_once( dirname(__FILE__) . '/../../' . PW_PLUGIN . '/login/login.pw.php'); 
     8 
    169?> 
    17  
     10<DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    1811<html xmlns="http://www.w3.org/1999/xhtml"> 
    1912<head> 
    20         <title><?php pw_utils::printTitle(); ?> &rsaquo; <?php _e('Login', 'wp-infocard'); ?></title> 
     13        <title> 
     14                <?php pw_utils::screenPrint('Information Card Login'); ?> 
     15        </title> 
    2116        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
    2217        <link rel="stylesheet" href="<?php pw_utils::printCSSlink(); ?>" type="text/css" /> 
    23         <script type="text/javascript" src="<?php echo PW_PLUGINURL . '/pwlib/login/detect.js'; ?>"></script>    
     18        <script type="text/javascript" src="<?php echo pw_utils::printJqueryLocation(); ?>"></script> 
     19        <script> 
     20                // basic show and hide 
     21                $(document).ready(function() { 
     22                        $("#showrpobject").hide(); 
     23<?php  
     24                        if (!PW_DEBUG_ON) 
     25                                echo "$(\"#debug\").hide();"; 
     26?> 
     27                        $("#togglerpobject").click( function() { 
     28                                 $("#showrpobject").toggle('slow'); 
     29                                 return false; 
     30                        }); 
     31                }); 
     32        </script> 
    2433</head> 
    2534<body> 
    26  
    27 <div id="background_box"> 
    28         <h3><?php _e('Login to', 'wp-infocard'); ?></h3
    29         <h1><?php pw_utils::printTitle(); ?></h1
    30  
    31 <div id="iclogin"
    32         <table
    33         <tr><td rowspan="2"> 
    34              <a id="imgref" href="<?php InfocardLogin::printICSecureSubmitLink(); ?>"
    35                 <img src="<?php InfocardLogin::printInfocardLogo(); ?>"/
    36               </a
    37         </td><td id="ICtitle"> 
    38                 <a href="<?php InfocardLogin::printICSecureSubmitLink(); ?>"><?php _e('With an Information Card', 'wp-infocard'); ?></a
    39         </td></tr
    40         <tr><td
    41                 <script type="text/javascript"
    42                         ShowDetection('<table><tr><td><img src="<?php echo PW_IMGURL; ?>/go.gif"/></td><td>Selector Installed</td></tr></table>','<table><tr><td><img src="<?php echo PW_IMGURL; ?>/yellow.gif"/></td><td><a href="<?php pw_utils::errorPageLink('NOSELECTOR');?>">Do you have a selector installed?</a></td></tr></table>'); 
    43  
    44                 </script
    45         </td></tr
    46         <tr><td colspan="2"
    47                 <ul><li>        
    48                         <a href="<?php InfocardLogin::printMoreInfoLink(); ?>" title="huh?"><?php _e('What is an Information Card?', 'wp-infocard'); ?></a
    49                 </li><li> 
    50                         <a href="<?php InfocardLogin::printLostCardLink(); ?>" title="doh!"><?php _e('Lost your Card?', 'wp-infocard'); ?></a> 
    51                 </li></ul
    52         </td></tr
    53         </table
    54 </div
    55  
    56 <div id="iclogin"
    57   <form name="loginform" id="loginform" action="<?php InfocardLogin::printUPPostDestination(); ?>" method="post"> 
    58   <table
    59         <tr><td colspan="2" id="UPtitle"> 
    60                 <?php _e('With Username & Password', 'wp-infocard'); ?> 
    61         </td></tr> 
    62        <tr><td><?php _e('Username:', 'wp-infocard'); ?></td
    63         <td><input type="text" name="log" id="log" value="" size="30" tabindex="1" /
    64         </td></tr
    65         <tr><td><?php _e('Password:', 'wp-infoard'); ?></td
    66         <td><input type="password" name="pwd" id="pwd" value="" size="30" tabindex="2" /
    67         </td></tr
    68         <tr><td colspan="2"
    69                 <input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="3" />  
    70                 <?php _e('Remember me', 'wp-infocard'); ?> 
    71         </td></tr> 
    72         <tr><td/><td class="submit"> 
    73                 <input type="submit" name="submit" id="submit" value="<?php _e('Login with Password', 'wp-infocard'); ?>" tabindex="4" /> 
    74                 <input type="hidden" name="redirect_to" value="<?php InfocardLogin::printPostLoginRedirect(); ?>"/> 
    75         </td></tr> 
    76         <tr><td colspan="2"> 
    77                 <ul><li> 
    78                 <a href="<?php bloginfo('siteurl'); ?>/wp-register.php"><?php _e('Register', 'wp-infocard'); ?></a> 
    79                 </li><li> 
    80                 <a href="<?php bloginfo('siteurl'); ?>/wp-login.php?action=lostpassword" title="Password Lost and Found"><?php _e('Lost your password?', 'wp-infocard'); ?></a> 
    81                 </li></ul> 
    82         </td></tr> 
    83        </table
    84   </form
    85 </div
    86 <ul
    87         <li><a href="<?php pw_utils::printHomeLink(); ?>" title="<?php _e('Are you lost?', 'wp-infocard'); ?>">&laquo; <?php _e('Back to blog', 'wp-infocard'); ?></a></li
    88 </ul
    89 </div> 
    90  
     35  <div id="pw_login_main"> 
     36       <div id="pw_login_header"> 
     37               <h1><?php pw_utils::screenPrint('Information Card Login: ') . pw_utils::printTitle(); ?></h1
     38        </div
     39        <div id="pw_login_links"> 
     40               <table id="pw_login_linklist"><tr
     41                       <td id="home"
     42                               <a href="<?php pw_utils::printHomeLink(); ?>"> 
     43                                       <?php pw_utils::screenPrint('Home'); ?
     44                               </a
     45                       </td
     46                       <td id="mainloginpage"> 
     47                               <a href="<?php pw_utils::printOtherLoginOptionsLink(); ?>"
     48                                       <?php pw_utils::screenPrint('See All Login Options'); ?
     49                               </a
     50                       </td
     51                        <td id="learnmore"> 
     52                                <a href="<?php pw_utils::printLearnMoreLink(); ?>"> 
     53                                       <?php pw_utils::screenPrint('Learn More'); ?
     54                               </a
     55                       </td
     56                       <td id="rpobject"> 
     57                               <a id="togglerpobject" href=""
     58                                       Show/Hide RP Object 
     59                               </a> 
     60                       </td
     61               </tr></table
     62        </div
     63       <div id="pw_login_intro"
     64                <p>Information Cards are a new way to access your accounts. Designed to relieve password & username fatigue, these digital cards can be created by you yourself, or hosted by an authority. Give them a try!</p> 
     65       </div
     66       <div id="pw_login"> 
     67               <form name="ctl00" id="ctl00" method="post" action="<?php pw_login::printICPostDestination(); ?>"
     68<?php 
     69                       $trigger_debug = pw_login::printIdentitySelectorTrigger(); 
     70                       $cb_debug = pw_clickback::printHiddenClickback($clickback); 
     71?
     72                       <button id="pw_login_submit" type="submit"><?php pw_utils::screenPrint('Login or Register Now!'); ?></button
     73                       <div id="showrpobject"
     74                               <?php pw_login::printIdentitySelectorTrigger('prettyprint'); ?
     75                       </div
     76               </form
     77        </div
     78        <div id="debug"> 
     79<?php 
     80               $userAgent = $_SERVER['HTTP_USER_AGENT']; 
     81               pw_utils::printDebugHeader('DEBUG MODE ON'); 
     82                pw_utils::printDebug("This site is under maintenance - anything is possible<br/>" 
     83                . "<br/>This page contains the hidden form object that specifies required and optional claims, and invokes the Identity Selector.<br/>" 
     84               . "View the page source to see the object.<br/><br />"); 
     85               pw_utils::printDebug("Plugin: " . PW_PLUGIN . "<br/>\n"); 
     86                pw_utils::printDebug("Table Prefix: " . PW_TABLE_PREFIX . "<br/>\n"); 
     87                pw_utils::printDebug("User Agent: $userAgent<br/>\n"); 
     88                pw_utils::printDebug("Clickback: $cb_debug<br/>\n"); 
     89                pw_utils::printDebug("Selector Trigger: $trigger_debug<br/>\n"); 
     90                pw_utils::showClaimList($claimslist); 
     91               pw_utils::showDataMap($datamap); 
     92?
     93       </div
     94       <div id="pw_login_help"
     95       </div
     96        <div id="pw_login_footer"
     97               <a id="pw_pamelaproject_logo" href="http://pamelaproject.com" alt="Powered by PamelaWare"><img src='<?php pw_utils::displayPamelaProjectLogo(); ?>' /></a
     98       </div> 
     99  </div> 
    91100</body> 
    92 </html> 
    93  
    94 <?php  
    95         // test  
    96 ?> 
  • trunk/wp-infocard/wp/utils.pw.php

    r51 r56  
    3838                if (PW_DEBUG_ON) 
    3939                { 
    40                         echo "<title>$content</title>\n"; 
     40                        echo "<h3>$content</h3>\n"; 
    4141                } 
    4242        } // end function printDebugHeader 
     
    6868                print get_settings('siteurl'); 
    6969        } // end function printHomeLink 
     70 
     71         function printOtherLoginOptionsLink(){ 
     72                print get_settings('siteurl') . "/wp-login.php"; 
     73        } // end function printOtherLoginOptionsLink 
     74 
     75         function printLearnMoreLink(){ 
     76                print "http://pamelaproject.com"; 
     77        } // end function printLearnMoreLink 
    7078 
    7179        function errorPageRedirect( $error_code='', $error_details = '') { 
     
    200208                return get_settings('siteurl'); 
    201209        } 
     210 
     211        function printJqueryLocation() 
     212        { 
     213                echo PW_PLUGINURL . "/vendor/jquery.js";         
     214        } 
    202215} // end class pw_utils 
    203216?>