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?
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]
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
0I 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);
}
?> -
Accepted Answer
-
Accepted Answer
0It 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.
Your Reply
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »