WordPress.org

Plugin Directory

Changeset 1650075


Ignore:
Timestamp:
05/03/17 05:01:30 (9 months ago)
Author:
codename065
Message:

2.9.50

  • Added new page template to show terms and conditions in a modal popup
  • Added new link template to show terms and conditions in a modal popup
  • Fixed issue with signup page
  • Fixed issue with page template dropdown
Location:
download-manager/trunk
Files:
8 edited
2 copied

Legend:

Unmodified
Added
Removed
  • download-manager/trunk/admin/menus/class.Templates.php

    r1580760 r1650075  
    2929        $html = "<select name='$name' id='$id' class='form-control template {$type}_template' {$css}><option value='$default'>Select ".ucfirst($type)." Template</option>"; 
    3030        $data = array(); 
     31 
    3132        foreach ($ctpls as $ctpl) { 
    3233            $tmpdata = file_get_contents($ltpldir . $ctpl); 
     
    3435            if (preg_match($regx, $tmpdata, $matches)) { 
    3536                $data[$ctpl] = $matches[1]; 
    36                 $selected = isset($selected) && $selected == $ctpl ? 'selected=selected':''; 
    37                 $html .= "<option value='{$ctpl}' {$selected}>{$matches[1]}</option>"; 
     37                $oselected = isset($selected) && $selected == $ctpl ? 'selected=selected':''; 
     38                $html .= "<option value='{$ctpl}' {$oselected}>{$matches[1]}</option>"; 
    3839            } 
    3940        } 
  • download-manager/trunk/assets/css/front.css

    r1629686 r1650075  
    18251825    width: 20px; 
    18261826} 
     1827.w3eden #loginform * , 
    18271828.w3eden #registerform * { 
    18281829    border-radius: 0; 
  • download-manager/trunk/download-manager.php

    r1630432 r1650075  
    55Description: Manage, Protect and Track File Downloads from your WordPress site 
    66Author: Shaon 
    7 Version: 2.9.48 
     7Version: 2.9.50 
    88Author URI: https://www.wpdownloadmanager.com/ 
    99Text Domain: download-manager 
     
    1818@session_start(); 
    1919 
    20 define('WPDM_Version','2.9.48'); 
     20define('WPDM_Version','2.9.50'); 
    2121 
    2222$content_dir = str_replace('\\','/',WP_CONTENT_DIR); 
  • download-manager/trunk/libs/class.Package.php

    r1629686 r1650075  
    208208            $data['terms_title'] = !isset($data['terms_title']) || $data['terms_title'] == ''?__("Terms and Conditions",'download-manager'):$data['terms_title']; 
    209209            $data['terms_check_label'] = !isset($data['terms_check_label']) || $data['terms_check_label'] == ''?__("You Must Agree With Terms and Conditions to Download",'download-manager'):$data['terms_check_label']; 
     210            $post_vars['download_link_popup'] = '<a href="#" data-toggle="modal" data-target="#termslockmodal"> 
     211                                                  '.$post_vars['link_label'].' 
     212                                                </a>                                                
     213                                                <div class="modal fade" id="termslockmodal" tabindex="-1" role="dialog" aria-labelledby="termslockmodalLabel"> 
     214                                                  <div class="modal-dialog" role="document"> 
     215                                                    <div class="modal-content"> 
     216                                                      <div class="modal-header"> 
     217                                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> 
     218                                                        <strong class="modal-title" id="termslockmodalLabel">'.$data['terms_title'].'</strong> 
     219                                                      </div> 
     220                                                      <div class="modal-body" style="max-height:300px;overflow:auto;"> 
     221                                                        '.$data['terms_conditions'].' 
     222                                                      </div> 
     223                                                      <div class="modal-footer text-left" style="text-align:left">                                                         
     224                                                        '."<label><input type='checkbox' onclick='jQuery(\".download_footer_{$post_vars['ID']}\").slideToggle();'> {$data['terms_check_label']}</label>".'                                                         
     225                                                      </div> 
     226                                                      '."<div class='modal-footer  download_footer_{$post_vars['ID']}' style='display:none;'>{$post_vars['download_link_extended']}</div>".' 
     227                                                    </div> 
     228                                                  </div> 
     229                                                </div>'; 
    210230            $post_vars['download_link'] = "<div class='panel panel-default terms-panel' style='margin: 0'><div class='panel-heading'>{$data['terms_title']}</div><div class='panel-body' style='max-height: 200px;overflow: auto'>{$data['terms_conditions']}</div><div class='panel-footer'><label class='eden-checkbox'><input type='checkbox' onclick='jQuery(\".download_footer_{$post_vars['ID']}\").slideToggle();'><span><i class='fa fa-check'></i></span> {$data['terms_check_label']}</label></div><div class='panel-footer download_footer_{$post_vars['ID']}' style='display: none'>{$post_vars['download_link']}</div></div>"; 
    211231            $post_vars['download_link_extended'] = "<div class='panel panel-default terms-panel' style='margin: 0'><div class='panel-heading'>{$data['terms_title']}</div><div class='panel-body' style='max-height: 200px;overflow: auto'>{$data['terms_conditions']}</div><div class='panel-footer'><label class='eden-checkbox'><input type='checkbox' onclick='jQuery(\".download_footer_{$post_vars['ID']}\").slideToggle();'><span><i class='fa fa-check'></i></span> {$data['terms_check_label']}</label></div><div class='panel-footer  download_footer_{$post_vars['ID']}' style='display:none;'>{$post_vars['download_link_extended']}</div></div>"; 
     232 
    212233 
    213234        } 
  • download-manager/trunk/libs/class.Pagination.php

    r1610186 r1650075  
    134134                function urlFriendly($value="%"){ 
    135135 
    136                                 if(eregi('^ *$',$value)){ 
     136                                if(preg_match('^ *$',$value)){ 
    137137 
    138138                                                $this->urlF=false; 
  • download-manager/trunk/readme.txt

    r1630432 r1650075  
    99   
    1010  
    11 This File Management & Digital Store plugin which will help you to control file downloads & sell digital products from your WP site. 
     11This File Management & Digital Store plugin will help you to control file downloads & sell digital products from your WP site. 
    1212    
    1313 
     
    143143== Changelog == 
    144144 
     145= 2.9.50 = 
     146* Added new page template to show terms and conditions in a modal popup 
     147* Added new link template to show terms and conditions in a modal popup 
     148* Fixed issue with signup page 
     149* Fixed issue with page template dropdown 
     150 
     151= 2.9.49 = 
     152* Fixed a compatibility issue with PHP7 
     153 
    145154= 2.9.48 = 
    146155* Fixed issue with direct download link 
  • download-manager/trunk/tpls/link-templates/link-template-button-popup.php

    r1581674 r1650075  
    1 <!-- WPDM Link Template: Only Link/Button --> 
    2 [download_link_extended] 
     1<!-- WPDM Link Template: Link/Button Popup --> 
     2[download_link_popup] 
  • download-manager/trunk/tpls/page-templates/page-template-popup.php

    r1351561 r1650075  
    1 <!-- WPDM Template: Default Template --> 
     1<!-- WPDM Template: Terms in Modal Popup --> 
    22 
    33<div class="row"> 
     
    1212<tr><td>File Size</td><td>[file_size]</td></tr> 
    1313<tr><td>Create Date</td><td>[create_date]</td></tr> 
    14 <tr><td colspan="2">[download_link_extended]</td></tr> 
     14<tr><td colspan="2">[download_link_popup]</td></tr> 
    1515</tr> 
    1616</tbody></table> 
  • download-manager/trunk/tpls/wpdm-login-form.php

    r1610186 r1650075  
    22 
    33if(!isset($redirect)) $redirect = get_permalink(get_the_ID()); 
    4 $redirect = isset($_GET['redirect_to']) ? $_GET['redirect_to'] : $redirect; 
     4$redirect = isset($_GET['redirect_to']) ? esc_attr(esc_url($_GET['redirect_to'])) : $redirect; 
    55$regurl = get_option('__wpdm_register_url'); 
    66if($regurl > 0) 
     
    7878            </div> 
    7979 
    80             <input type="hidden" name="redirect_to" value="<?php echo isset($redirect)?$redirect:$_SERVER['REQUEST_URI']; ?>" /> 
     80            <input type="hidden" name="redirect_to" value="<?php echo isset($redirect)?esc_attr(esc_url($redirect)):esc_attr($_SERVER['REQUEST_URI']); ?>" /> 
    8181 
    8282 
     
    9797                                $('#loginform-submit').html(llbl); 
    9898                            } else { 
    99                                 location.href = "<?php echo $log_redirect; ?>"; 
     99                                location.href = "<?php echo esc_attr(esc_url($log_redirect)); ?>"; 
    100100                            } 
    101101                        } 
  • download-manager/trunk/tpls/wpdm-reg-form.php

    r1616450 r1650075  
    1818 
    1919        <input type="hidden" name="phash" value="<?php echo isset($regparams)?$regparams:''; ?>" /> 
    20         <input type="hidden" name="permalink" value="<?php echo $loginurl; ?>" /> 
     20        <input type="hidden" name="permalink" value="<?php echo esc_attr($loginurl); ?>" /> 
    2121        <!-- div class="panel panel-primary"> 
    2222    <div class="panel-heading"><b>Register</b></div> 
     
    104104            <div class="col-md-<?php echo ($loginurl != '')?8:12; ?>"><button type="submit" class="btn btn-success btn-lg btn-block" id="registerform-submit" name="wp-submit"><i class="fa fa-user-plus"></i> &nbsp; <?php _e('Join Now!','download-manager'); ?></button></div> 
    105105            <?php if($loginurl != ''){ ?> 
    106                 <div class="col-md-4"><a href="<?php echo $loginurl;?>" class="btn btn-default btn-lg btn-block" id="registerform-submit" name="wp-submit"><i class="fa fa-lock"></i> &nbsp; <?php _e('Login','download-manager'); ?></a></div> 
     106                <div class="col-md-4"><a href="<?php echo esc_attr($loginurl);?>" class="btn btn-default btn-lg btn-block" id="registerform-submit" name="wp-submit"><i class="fa fa-lock"></i> &nbsp; <?php _e('Login','download-manager'); ?></a></div> 
    107107            <?php } ?> 
    108108        </div> 
     
    126126                        } else { 
    127127                            $('#registerform-submit').html("<i class='fa fa-check-circle'></i> <?php _e('Success! Redirecting...','download-manager'); ?>"); 
    128                             location.href = "<?php echo $loginurl; ?>"; 
     128                            location.href = "<?php echo esc_attr($loginurl); ?>"; 
    129129                        } 
    130130                    } 
Note: See TracChangeset for help on using the changeset viewer.