artist_name = username

0
Hello.

I'm doing community for composers, so every user is himself Artist.

1. Help me, please, to modify the code your template \components\com_muscol\views\album\tmpl\form.php (55).
I need field New album > Basic details > Artist is assigned the value 'username' from Joomla's User Profile, by type
JFactory::getUser()->username;


2. I also need a user to upload his mp3-files in his folder: /

P.S. my MusCol settings:

  • Frontend users can add artists: NO
  • Frontend users can only add albums by artists they created: NO
Responses (8)
  • Accepted Answer

    Wednesday, November 25 2015, 04:00 PM - #Permalink
    0
    hello

    1. I don't understand.. you already have the file and the code you need... just put it there and it will work.

    2. well that requires a bit more coding.. we can do it through our Custom Coding Service if you're interested.
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, November 25 2015, 05:03 PM - #Permalink
    0
    1. I'm newbie in PHP. I understand, what I must replace this code (58-67), but I don't know how. I need to disable the ability to select artists.
    2. What are conditions of your Custom Coding Service?
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, November 26 2015, 09:57 AM - #Permalink
    0
    Hello.
    1. I don't understand meaning of this term (62):
    if($row->id == $this->album->artist_id)

    I replace it so:
    if($row->artist_name == $this->album->artist_id)

    And I add 'disabled' attribut for 'select' form.

    The name of current user display only now. As I wanted.

    2. What are conditions of your Custom Coding Service?
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, November 26 2015, 03:04 PM - #Permalink
    0
    Hello
    If I want a user to upload his mp3-files in his folder ( / ),
    I must to modify \components\com_muscol\helpers\helpers.php (397): static function create_file_link($song) and $dirname or $file_link?

    Do I understand right?
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, November 26 2015, 04:14 PM - #Permalink
    0
    Hello!

    1. No.. this replacement you put makes no sense, it won't serve you.

    2. For Custom Coding Service, please contact us directly at support@ joomlathat.com. You can email us your requirements and we can make a quote for you.

    3. No... that's not the file to modify, this only "gives back" the link, it does not create anything...
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, November 26 2015, 04:36 PM - #Permalink
    0
    1. No.. this replacement you put makes no sense, it won't serve you.

    However, before the replacement the condition didn`t work, and after the replacement - worked. But I don`t understand the meaning of the condition.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, November 27 2015, 03:01 PM - #Permalink
    0
    1. No.. this replacement you put makes no sense, it won't serve you.

    yes, you're right.
    I modify this code:
    if($row->artist_name == JFactory::getUser()->name) $selected = "selected" ;?>

    And it worked correctly.
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, November 29 2015, 07:38 PM - #Permalink
    0
    SOLVED
    The reply is currently minimized Show
Your Reply