album action/ item action list customizations

barun019

Joined: 2005-06-08
Posts: 9
Posted: Wed, 2005-06-08 16:47

i have gallery2 beta3 (bingo) set up and have two questions:

(1) how do i make it so that the "album action" drop-down list is only viewable by an administrator, and not by a regular user or guest? i have read the thread at http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=129399 but i cannot get the tips given there to work -- do i need to install a newer version of the files (beyond the stable release, which is what i imagine i have now)? if so what specific files do i need to update?

(2) if i do want the drop-down menus to be visible, how can i customize what options appear within them? in albumBody.tpl, it just says "{foreach from=$child.itemLinks item=link}" -- but which code controls what is within child.itemLinks? for example, how could i customize my gallery so that the drop-down menu didn't have a specific option within it that appears by default (say, for example, the 'view comments' option)

any help at all on these two questions would be greatly appreciated!!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-06-08 17:20

1) in layouts/matrix/templates/: copy albumBody.tpl to layouts/matrix/templates/local/albumBody.tpl and edit this file.
around the drop down list, add a {if $user.isAdmin} {/if}

 
barun019

Joined: 2005-06-08
Posts: 9
Posted: Wed, 2005-06-08 18:12

great, thanks a lot -- that answered my frst question.

does anybody know the answer to my second question?
(2) if i do want the drop-down menus to be visible, how can i customize what options appear within them? in albumBody.tpl, it just says "{foreach from=$child.itemLinks item=link}" -- but which code controls what is within child.itemLinks? for example, how could i customize my gallery so that the drop-down menu didn't have a specific option within it that appears by default (say, for example, the 'view comments' option)

thanks again...

 
zelf

Joined: 2005-03-07
Posts: 37
Posted: Thu, 2005-06-09 02:05

Here is what I did. I am sure there are other ways, but this doesn't destroy the menu links list, which you want to keep if your an admin of course.

{if $user.isAdmin} // total access for admins

{foreach from=$child.itemLinks item=link}
<option label="{$link.text}" value="{$link.url}">{$link.text}</option>
{/foreach}

{else} // Limited access for everyone else

{foreach from=$child.itemLinks item=link}

// Add as many exclusions as you want from the menu.
{if $link.text != 'edit album' && $link.text != 'edit permissions'}
<option label="{$link.text}" value="{$link.url}">{$link.text}</option>
{/if}

{/foreach}

{/if}

 
zelf

Joined: 2005-03-07
Posts: 37
Posted: Thu, 2005-06-09 03:25

Just a follow up. It may be easier to say:

{if $link.text == 'this' && $link.text == 'that'}

Then show it. Options on menus sometimes change depending on which screen your on.

 
sambritt
sambritt's picture

Joined: 2007-04-14
Posts: 28
Posted: Sat, 2007-09-15 06:43

And How Do we do this in G2?

I am needing the delete/edit the "album actions" list menu that is named the "item actions" under the "edit album" Theme Link.

I want to edit the list menu under "album actions" the that says "RSS Feed for this Album" as this link does not work. But the other custom RSS Feeds work that are separate from the as the one found in the "album actions" list menu.

I would like to know how to edit the link pointing to the "RSS Feed for this Album" inside the list menu found under the "album actions" feature.

I am searching under the themes directory and looking at the files called, theme.tpl and sidebar.tpl and can't find any clues on how to change this.

/themes/matrix/templates/theme.tpl

I have also search the /themes/matrix/theme.inc and still nothing

Thank you for your support, sb :-)