Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Watermark settings on images at album level
lug668
#1 Posted : Sunday, 4 May 2008 5:55:35 PM(UTC)
Rank: Member

Joined: 1/05/2008(UTC)
Posts: 10
Location: Melbourne, Australia

Currently I can apply watermark settings on images at site level only. Is it possible do this at album level? I'd like to apply watermark on some of albums but not all of them.

Regards,
George
Roger Martin
#2 Posted : Monday, 5 May 2008 7:29:35 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

For logged on users, you can use the role security to show/hide the watermark on a per album basis. Create a role named NoWatermark, give it the "Do not show watermark on image" permission, and assign it to all albums where the watermark should not appear. Then add your users to this role.

Since roles apply only when a user is logged on, this feature is not available for anonymous users. However, if you are handy with C#, you could write a couple lines in the session start event to automatically log on all users to an account you specify.

Roger Martin
Creator and Lead Developer of Gallery Server Pro
lug668
#3 Posted : Monday, 5 May 2008 4:50:51 PM(UTC)
Rank: Member

Joined: 1/05/2008(UTC)
Posts: 10
Location: Melbourne, Australia

Thank you Roger for quick response. I think what I want is to show/hide the watermark on a per album basis without users log on i.e. anonymous users. If this feature is not available at the moment, is it possible it will be available in the future?

Anyway, I'm a ColdFusion programmer and learned a little bit of C#. Do you have any example shown the coding as you've suggested?

Thanks,
George
Roger Martin
#4 Posted : Monday, 5 May 2008 10:29:23 PM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

I will add your request to the feature request list, but it is a pretty low priority unless others chime in wanting the feature, too.

Here is some sample code to automatically log in a user named admin:

Code:
string userName = "admin";
MembershipUser user = Membership.GetUser(userName);
if (Membership.ValidateUser(userName, user.GetPassword()))
{
FormsAuthentication.RedirectFromLoginPage(userName, false);
}


This technique won't work when the password is hashed, but Gallery Server does not hash the password by default.

You can put this code in the Init event or Page_Load event of the global.master master page, the base class for all pages (GspPage.cs), the code-behind for the main page default.aspx, or maybe the session start event in global.asax. Not sure which would work best, but I would probably start with the Init or Page_Load event of GspPage.cs.

You probably want to wrap the above code with an if test for IsAuthenticated so you only log on anonymous users.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
Rss Feed  Atom Feed
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.