Plugin Directory

Changeset 193530


Ignore:
Timestamp:
01/13/2010 09:42:11 AM (16 years ago)
Author:
mindnl
Message:
 
Location:
affiliate-plus/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • affiliate-plus/trunk/affiplus.php

    r186562 r193530  
    55Description: Affiliate Plus lets your registered users get credit for new users they recruit
    66Author: Nico
    7 Version: 1.3
     7Version: 1.3.1
    88Author URI: http://www.blogio.net/blog/
    99Questions, sugestions, problems? Let me know at nico@blogio.net
     
    1919    $newoptions['affp_trkpar'] = 'affid';
    2020    $newoptions['affp_usrpage'] = '1';
     21    $newoptions['affp_showid'] = '1';
    2122    add_option('affiliate_plus_cfg', $newoptions);
    2223   
     
    4546        'affp_trkpar'           => '',
    4647        'affp_usrpage'          => '',
    47         'affp_land'             => ''
     48        'affp_land'             => '',
     49        'affp_showid'           => ''
    4850    );
    4951    $affiliate_plus_cfg = get_option('affiliate_plus_cfg');
    5052   
    51     if(!isset($affiliate_plus_cfg['affp_trkpar'])){
     53    if(!($affiliate_plus_cfg['affp_trkpar'])){
    5254        $affiliate_plus_cfg['affp_trkpar'] = 'affid';
    5355    }
     
    9092function affiplus_signupform()
    9193{
     94    global $wpdb;
     95    $affiliate_plus_cfg = array(
     96        'affp_override'         => '',
     97        'affp_expire'           => '',
     98        'affp_redir'            => '',
     99        'affp_trkpar'           => '',
     100        'affp_usrpage'          => '',
     101        'affp_showid'           => ''
     102        );
     103    $affiliate_plus_cfg = get_option('affiliate_plus_cfg');
     104
    92105    // check if we have a cookie
    93106    if(isset($_COOKIE['affiplus'])){
    94107        $form_referral = $_COOKIE['affiplus']."\" readonly=\"readonly";
    95     }
    96     echo'<p>
    97         <label>Referral ID<br />
    98         <input type="text" name="affiplus_referral" id="user_login" class="input" value="'.$form_referral.'" size="20" tabindex="30" /></label>
    99     </p>';
    100 
    101 
     108        if ($affiliate_plus_cfg['affp_showid']){
     109            echo'<p>
     110            <label>Referral ID<br />
     111            <input type="text" name="affiplus_referral" id="user_login" class="input" value="'.$form_referral.'" size="20" tabindex="30" /></label>
     112            </p>';
     113        } else {
     114            echo'<input type="hidden" name="affiplus_referral" id="user_login" class="input" value="'.$form_referral.'" size="20" tabindex="30" />';
     115        }
     116    } else {
     117        echo'<p>
     118            <label>Referral ID<br />
     119            <input type="text" name="affiplus_referral" id="user_login" class="input" value="'.$form_referral.'" size="20" tabindex="30" /></label>
     120        </p>';
     121    }
    102122}
    103123
     
    146166        'affp_redir'            => '',
    147167        'affp_trkpar'           => '',
    148         'affp_usrpage'          => ''
     168        'affp_usrpage'          => '',
     169        'affp_showid'           => ''
    149170        );
    150171    $affiliate_plus_cfg = get_option('affiliate_plus_cfg');
     
    210231        'affp_redir'            => '',
    211232        'affp_trkpar'           => '',
    212         'affp_usrpage'          => ''
     233        'affp_usrpage'          => '',
     234        'affp_showid'           => ''
    213235        );
    214236    $affiliate_plus_cfg = get_option('affiliate_plus_cfg');
     237   
     238    if(!($affiliate_plus_cfg['affp_trkpar'])){
     239        $affiliate_plus_cfg['affp_trkpar'] = 'affid';
     240    }
    215241
    216242    if ($affiliate_plus_cfg['affp_usrpage']){
  • affiliate-plus/trunk/affipsettings.php

    r186562 r193530  
    66    'affp_trkpar'           => '',
    77    'affp_usrpage'          => '',
    8     'affp_land'             => ''
     8    'affp_land'             => '',
     9    'affp_showid'           => ''
    910);
    1011$ol_flash = '';
     
    1617    $affiliate_plus_cfg['affp_usrpage'] = $_POST['affp_usrpage'];
    1718    $affiliate_plus_cfg['affp_land'] = $_POST['affp_land'];
     19    $affiliate_plus_cfg['affp_showid'] = $_POST['affp_showid'];
    1820    update_option('affiliate_plus_cfg',$affiliate_plus_cfg);
    1921    $ol_flash = "Your settings have been saved.";
     
    6264</tr>
    6365<tr valign="top">
     66<th scope="row">show referral ID on signup page</th>
     67    <td><input name="affp_showid" type="checkbox" value="1" <?php if($affiliate_plus_cfg['affp_showid']){echo"checked";}?>></td>
     68    <td>select to show referral ID on the signup form.</td>
     69</tr>
     70<tr valign="top">
    6471<th scope="row">show affiliate details on user page </th>
    6572    <td><input name="affp_usrpage" type="checkbox" value="1" <?php if($affiliate_plus_cfg['affp_usrpage']){echo"checked";}?>></td>
  • affiliate-plus/trunk/readme.txt

    r186562 r193530  
    55Requires at least: 2.8.4
    66Tested up to: 2.9
    7 Stable tag: 1.3
     7Stable tag: 1.3.1
    88
    99Affiliate Plus lets your registered users get credit for new users they recruit
     
    2424== Changelog ==
    2525
     26= 1.3.1 =
     27* 13-01-2010
     28* added the option to hide the affiliate parameter on the signup form
     29
    2630= 1.3 =
    2731* 23-12-2009
    28 *added landingpage parameter to the settings page to redirect all incomming affiliate links to a certain page
     32* added landingpage parameter to the settings page to redirect all incomming affiliate links to a certain page
    2933
    3034= 1.2.1 =
Note: See TracChangeset for help on using the changeset viewer.