Responses (8)
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
0All you'd need to do to display the buy link to registered users only would be to check if the user is logged in using the Joomla user object. To do this, add the following code into the view '/[view_type]/tmpl/default.php' file, right before the button is rendered;
$user =& JFactory::getUser();
$myid = $user->id;
// Check if user logged in...
if(is_numeric($myid) && $myid >0){
// Put the if allowsongdownload bit in here... //
}
// End - You could add an else {block} to give a different link to users not logged in
Hope this helps!
Gez
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 »