Your Account/User Options/Watermarks when integrating

kmulder

Joined: 2007-07-18
Posts: 6
Posted: Wed, 2007-07-25 18:49

i have embedded Gallery2 within a simple php authentication page of my own.
In general everything seems to be working.

I have set the system to allow the users to upload their own watermarks, but then they can't find any way to delete some that they don't like.

The User administration of watermarks seems to be within the "Your Account/User Options", which doesn't show up within my embedding. I don't want the users to be able to change password, name, or email address, but letting them set Language might be useful, and i definetly want them to be able to get at the Watermarks admin screen.

Could this be done by building a different template?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2007-07-28 22:52

try putting <a href="{g->url arg1="view=core.UserAdmin" arg2="subView=watermark.UserWatermarks"}">link</a> somewhere in your theme's tpl files and see how the direct link works. the sidebar there may then show too many links, not sure.. you could also try just {g->url arg="view=watermark.UserWatermarks"} but I don't know if that even works.

 
kmulder

Joined: 2007-07-18
Posts: 6
Posted: Mon, 2007-07-30 14:57

i created a themes/matrix/templates/local directory and copied,modded the sidebar.tpl to have the "<a href" inside the "gsSidebar" div, as the last thing in the div

the "<a href..." method shows up on the bottom of every sidebar and seemed to work the first time i tried it. i got the watermark management screen and it showed me the one watermark that i had uploaded, and gave me the option to upload another...

but then i went into someone elses gallery and clicked on the link at the bottom of the sidebar, and i get the watermark "upload" page, but it doesn't show any of the watermarks that i or the other user have. I also clicked on view as "guest" and i get the option to go into the watermark control screen.

Is there a way to limit the inclusion of the option to an "authenticated" user?
What controls the user that the "watermark" screen is working on?

the "{g->url..." method caused the text "index.php" to be included in the page. Just that text, by itself on a line. Not as a link <a> or anything else. So no go on that one...

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2007-07-30 15:30

See http://codex.gallery2.org/Gallery2:Themes:Reference:Variables

{if $user.isRegisteredUser} ..stuff here.. {/if}

The UserWatermarks screen shows watermarks for the current user. In Site Admin / Watermarks an admin can add watermarks usable by all users. When users add images in UserWatermarks then they are usable only by that user.

 
kmulder

Joined: 2007-07-18
Posts: 6
Posted: Mon, 2007-07-30 16:04

that if query worked great for keeping it off of the guest displays! thanks

is there a query to determine that the album being shown belongs to the $user?

i would like the watermark management link to show up only in the sidebar if i am working on my own albums.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2007-07-30 18:15

{if $user.id == $theme.item.ownerId} ... {/if}

 
kmulder

Joined: 2007-07-18
Posts: 6
Posted: Mon, 2007-07-30 19:01

that did it! great. thanks