0
Do to the fact that any kind of permission feature as far as editing Artist, Albums or songs has been ignored...
1) What would I need to do to allow all registered users to be able to edit any and all music?
2) How would I remove the delete option from the MC front-end?
Thanks!
1) What would I need to do to allow all registered users to be able to edit any and all music?
2) How would I remove the delete option from the MC front-end?
Thanks!
Responses (13)
-
Accepted Answer
01) are you sure you want to allow this? ok..
open com_muscol/controller.php
line 64 and following, the variable $can_edit determines if the user can edit. if you set it always to TRUE that would do it.
hey, but.. I don't make responsible of what happens next!! it's up to you!
2) on helpers/helpers.php
fins the functions edit_button_album and edit_button_artist you will see they return EDIT and DELETE buttons. just crop out the delete button part...
AT YOUR OWN RISK!
Germi -
Accepted Answer
-
Accepted Answer
0germi wrote:
1)open com_muscol/controller.php
line 64 and following, the variable $can_edit determines if the user can edit. if you set it always to TRUE that would do it.
hey, but.. I don't make responsible of what happens next!! it's up to you!
I did this but is doesn't seem to be working... Below is the code...
else{ // registered
switch($view){
case "album":
$can_edit = TRUE;
$msg = JText::_('NOT_AUTHORIZED_ALBUM');
$link = JRoute::_('index.php?option=com_muscol&view=album&id='. $id . $itemid);
break;
case "song":
$can_edit = TRUE;
$msg = JText::_('NOT_AUTHORIZED_SONG');
$link = JRoute::_('index.php?option=com_muscol&view=song&id='. $id . $itemid);
break;
case "artist":
$can_edit = TRUE;
$msg = JText::_('NOT_AUTHORIZED_ARTIST');
$link = JRoute::_('index.php?option=com_muscol&view=artist&id='. $id . $itemid);
if(!$params->get('users_add_artists')){
$can_edit = false ;
$msg = JText::_('NOT_AUTHORIZED_ARTISTS');
$link = JRoute::_('index.php?option=com_muscol&view=artists' . $itemid);
} -
Accepted Answer
-
Accepted Answer
0germi wrote:
hmm.. do you still get the messages "you're not authorized".. ?
I guess you are trying to add album as a registered user... right?
No, users can add albums no problem... I want all users to be able to edit any album or artists or song throughout the collection (regardless of who initially added the album artist or song). -
Accepted Answer
0It turns out that your changes do allow any users to edit any album etc. However the edit button is not showing up. This can be changed by editing helpers/helpers.php
function edit_button_song($id){
$user =& JFactory::getUser();
if(!$user->id) return "";
$db =& JFactory::getDBO();
$query = ' SELECT user_id FROM #__muscol_songs WHERE id = ' .$id;
$db->setQuery( $query ) ;
$owner = $db->loadResult();
if($user->id != $owner) return "";
$params = &JComponentHelper::getParams( 'com_muscol' );
$itemid = $params->get('itemid');
if($itemid != "") $itemid = "&Itemid=" . $itemid;
return "" . JHTML::image('components/com_muscol/assets/images/page_white_edit.png', JText::_('Edit')) . "";
to
return "" . JHTML::image('components/com_muscol/assets/images/page_white_edit.png', JText::_('Edit')) . "";
Thanks for the help! -
Accepted Answer
0Hi,
About Editing Access... not exactly like Max Power (I dont want everyone to be able to edit !) but on the opposite, I don't want that the only user capable of editing is the user who added the artist/album/song.
I'd like myself and some Helpers to be able to edit everything in frontend...
I thought about this... if I set my user_id and my Helpers' user_ids under 50... Would it be possible to code something like :
$can_edit = user_id "who created it" AND/OR user_id "under50"
if yes, can you help me out with this code ??? -
Accepted Answer
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
0ViRulent wrote:
Hi,
About Editing Access... not exactly like Max Power (I dont want everyone to be able to edit !) but on the opposite, I don't want that the only user capable of editing is the user who added the artist/album/song.
I'd like myself and some Helpers to be able to edit everything in frontend...
I thought about this... if I set my user_id and my Helpers' user_ids under 50... Then, in com_muscol/controller.php would it be possible to code something like :
$can_edit = user_id "who created it" AND/OR user_id "under50"
if yes, can you help me out with this code ???
bump! -
Accepted Answer
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 »