Current Artist ID

0
Hello.

1. How can I get an ID actor whose name matches the name of the current user?

2. Is it possible to create a menu item with a link to such gotten ID (current user=artist)?
Responses (6)
  • Accepted Answer

    Tuesday, December 08 2015, 12:48 PM - #Permalink
    0
    SOLUTION as user's profile LINK, not menu item:

    <?php 
    $db = JFactory::getDBO();
    $query = ' SELECT id,artist_name FROM #__muscol_artists ';
    $db->setQuery( $query );
    $artist_list = $db->loadObjectList();

    for ($i=0, $n=count($artist_list);$i < $n; $i++) {
    $row = $artist_list[$i];

    if ($row->artist_name == JFactory::getUser()->name) {
    $id = $row->id;
    }
    }
    ?>
    <a href="/<?php echo JRoute::_('index.php?option=com_muscol&view=artist&id='. $id);?>">
    <span class="icon-user"></span><?php echo JText::_('Artist profile');?></a>
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, December 08 2015, 10:13 AM - #Permalink
    0
    $params->get('add_albums_own_artists')
    The reply is currently minimized Show
  • Accepted Answer

    Monday, December 07 2015, 07:44 PM - #Permalink
    0
    Which variable is responsible for this option:
    Music Collection configuration > Permission > Frontend users can only add albums by artists they created?
    The reply is currently minimized Show
  • Accepted Answer

    Monday, December 07 2015, 04:02 PM - #Permalink
    0
    there's no such option, you will need to code this customly (you are coding many things yourself, it is logical that this custom function that you want for your custom system is not built...)
    The reply is currently minimized Show
  • Accepted Answer

    Monday, December 07 2015, 02:43 PM - #Permalink
    0
    I need in user profile a link to his created artists.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, December 07 2015, 12:46 PM - #Permalink
    0
    1. where? how?

    2. no...
    The reply is currently minimized Show
Your Reply