solved Modifying Buttons on Album Pages

MySong
MySong
@mysong
10 years ago
155 posts
Applies to both audio and video

It is possible to modify (hide) button permissions on index page using
site.com/core/item_action_buttons/index/m=jrAudio

buttons on item pages can be modified using
site.com/core/item_action_buttons/detail/m=jrAudio

but not sure how to modify on album pages, as there is no configure button
both on the album index pages
ex: site.com/artist/audio/albums/
and on the album detail pages
ex: site.com/artist/audio/albums/album-name

Thanks,
updated by @mysong: 10/05/14 02:29:54PM
brian
@brian
10 years ago
10,148 posts
For this you need to modify the item_albums.tpl files for the jrAudio and jrVideo module to suit your needs - those are "custom" templates for those modules.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
MySong
MySong
@mysong
10 years ago
155 posts
Thanks, was able to find all the parts of code related to the buttons. Just wondering if instead of deleting them, if there was a way to have them just show for admins?

Let say the update button; instead of deleting this line of code.

{jrCore_item_update_button module="jrAudio" profile_id=$_items.0._profile_id action="`$murl`/update_album/`$_items.0.audio_album_url`" alt="60"}

Is there something that can be added to hide it from all users that are not admins.

Thanks
brian
@brian
10 years ago
10,148 posts
Yeah - change it to this:

{if jrUser_is_admin()}
{jrCore_item_update_button module="jrAudio" profile_id=$_items.0._profile_id action="`$murl`/update_album/`$_items.0.audio_album_url`" alt="60"}
{/if}

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
MySong
MySong
@mysong
10 years ago
155 posts
Works, thanks for the help :)