Download After Login Code Issue

0
This code works on our old site in the default.php file allowed users only to be able to download after login. However, in the new update, this same code will not recognize after a user has updated. Can you see as to why this would not register?


params->get('showzip') && $user->id){
if($this->album->format_id != '2'){
echo MusColHelper::zip_download($this->album->id);
} else {
echo '';}
} else {
//echo '


'; //old link
echo '';
//calling module in component
//jimport('joomla.application.module.helper');
//$moduless = JModuleHelper::getModule('mod_bt_sociallogin','BTSL');
//echo JModuleHelper::renderModule($moduless);

}

?>
[/code]
Responses (3)
  • Accepted Answer

    Tuesday, August 09 2016, 12:19 AM - #Permalink
    0
    I wish we were allowed to edit our posts.

    This is the code I was trying to paste, please assist:


    params->get('showzip') && $user->id){ //&& $user->id
    if($this->album->format_id != '2'){
    echo MusColHelper::zip_download($this->album->id);
    } else {
    echo '';}
    } else {
    //echo '


    '; //old link
    echo '';
    //calling module in component
    //jimport('joomla.application.module.helper');
    //$moduless = JModuleHelper::getModule('mod_bt_sociallogin','BTSL');
    //echo JModuleHelper::renderModule($moduless);

    }

    ?>
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, August 09 2016, 10:51 AM - #Permalink
    0
    you can adjust this setting in the PERMISSIONS tab of music collection. you can choose who can download...
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, August 09 2016, 12:47 PM - #Permalink
    0
    It only shows who can download SONGS not albums in the permissions tab. I want the download button to show as "Log In For Instant Download" prior to logging in. After user logs in, then show the "Download" button. The code below works just fine with the older version of muscol.

    Why won't this code work in the new muscol update? I feel it has something to do with the user id. How to I authorize user via code? Please assist.

    Does this code look correct to you and should it work in the default_details.php in the new muscol 3.0?

    php if($this->params->get('showzip') && $user->id){
    echo MusColHelper::zip_download($this->album->id);


    I've also attached screenshots below.
    The reply is currently minimized Show
Your Reply