Warning: include(.../cache/template/template63867.php): failed to open stream: No such file or directory in /home/codingta/public_html/includes/vb5/template.php on line 328 Warning: include(): Failed opening '.../cache/template/template63867.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/codingta/public_html/includes/vb5/template.php on line 328 show all playlists in the admin panel SE4 Music Plugin - Coding-Talk

show all playlists in the admin panel SE4 Music Plugin

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to show all playlists in the admin panel SE4 Music Plugin

    I found that there is a bug in the socialengine 4 music plugin, not all playlists were visible in admin panel, specially those where the site search was disabled.
    Here is a fix how to show all playlists in the admin panel:

    open: /application/modules/Music/controllers/AdminLevelController.php
    find:

    PHP Code:
    $this->view->paginator Engine_Api::_()->music()->getPlaylistPaginator(); 
    its around ‚Äčline 42,
    and replace by:
    PHP Code:
    $this->view->paginator Engine_Api::_()->music()->getPlaylistPaginator(array('admin'=>1)); 
    save changes.

    open: /application/modules/Music/Api/Core.php
    find (around 87 line):
    PHP Code:
    $select->where('1')
    // prevent empty playlists from showing
    ->joinLeft($ps_name"$p_name.playlist_id = $ps_name.playlist_id"'')
    ->
    where("$ps_name.song_id IS NOT NULL")

    and replace with:
    PHP Code:
    if( !empty($params['admin']) ) {
    $select->where('1')
    // prevent empty playlists from showing
    ->joinLeft($ps_name"$p_name.playlist_id = $ps_name.playlist_id"'')
    ->
    where("$ps_name.song_id IS NOT NULL")
    ;
    }
    else
    {
    $select->where('search = 1')
    // prevent empty playlists from showing
    ->joinLeft($ps_name"$p_name.playlist_id = $ps_name.playlist_id"'')
    ->
    where("$ps_name.song_id IS NOT NULL")
    ;

    Done!
Working...
X