T&C for viewing albums

picdude

Joined: 2006-06-13
Posts: 176
Posted: Tue, 2011-07-19 16:29

Gallery URL = http://www.photosbybailini.com/g2/main.php
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.9 cgi-fcgi
Webserver = Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Database = mysqlt 5.0.92-community, lock.system=flock
Toolkits = Gd, ImageMagick
Acceleration = partial/3600, partial/3600
Operating system = Linux server1.photosbybailini.com 2.6.18-028stab089.1 #1 SMP Thu Apr 14 13:46:04 MSD 2011 x86_64
Default theme = carbon
gettext = enabled
Locale = en_GB
Browser = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1

Hello,

I'm surprised not to find a previous thread for this.
Poaching of my proofs has become rampant. Before I implement a "pay to view" system, I thought I would give this a try, but can't figure out how to do it.

My question is: Is there a way to require viewers to accept a "terms and conditions" page before viewing the albums? I can't wrap my head around how that would be done.

Thanks.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2011-07-19 19:03

it would be easy to do w/ javascript.

  • css set #gallery { display:none; }
  • check for a cookie
  • if cookie exists set #gallery { display:block; }
  • if cookie does not exist popup your "terms and conditions"
  • if they accept your "terms and conditions" set #gallery { display:block; } and write your cookie
  • if not then send them to disney.com or hell.com

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
picdude

Joined: 2006-06-13
Posts: 176
Posted: Sun, 2011-08-14 22:50

hey, thanks suprsidr!
sorry for the late reply.

sounds like you've got a grip on this. so, my next question is.... how much?
in other words, can I hire your service to implement this since my java code skills are somewhat lacking?

this sounds very promising!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2011-08-15 02:26
 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2011-08-15 12:43

BTW, in my sample, I set the cookie to expire in 30 days, you can set it however long you wish.
$.cookie('t_and_c', 'accepted', { expires: 30, path: '/', domain: 'flashyourweb.com', secure: false });
And in the future if you decide to update your T&C just rename the cookie and everyone will get prompted again.
2 instances:
($.cookie('t_and_c')

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
picdude

Joined: 2006-06-13
Posts: 176
Posted: Mon, 2011-08-15 14:43

That's the stuff!
So, is this ready to go (more or less)?
I think I need to create a .php file of my t&c that it can read from (since there's no actual text in the code)?
I would also need to have it point to my gallery.

If I were to implement this, it would be all trial and error and I'm not even sure where to start.
Still willing to hire you to implement it. Let me know.

Thanks suprsidr!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2011-08-15 14:57

Sure, I'll need gallery admin access and ftp access.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
picdude

Joined: 2006-06-13
Posts: 176
Posted: Mon, 2011-08-15 16:14

sweet!

I have no problem sharing that info with you.
I'll get back to you when I have the t&c written out properly.

Thanks again!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2011-08-15 16:17

I can give you my terms for now, and you can edit at your leisure.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Tue, 2011-08-16 05:56

The magic of jquery.

To the OP, consider changing all instances of the potentially conflicting "$" in the js code to the non conflicting "jQuery" and hopefully coders like suprsidr will also type the few extra characters each time.

Haven't looked at the specific code so suprsidr may have taken care of potential conflicts.

--
dakanji.com

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2011-08-16 12:08

@Dayo
You can remap jQuery to the dollar($) and make it a private variable by wrapping it like:

            (function($){
                $(document).ready(function(){
                    if($.cookie('t_and_c') == 'accepted'){
                        $('#gallery').show();
                        $('#terms-container').empty().hide();
                    }else{
                        $('#terms-container').empty().load('http://www.yourdomain.com/terms.php #terms', function(){
                            if($('#terms-container').html()){
                                $('#terms-container').show().append('<input type="button" value="Accept" name="Accept" />&nbsp;<input type="button" value="Cancel" name="Cancel" />');
                            }else{
                                $('#terms-container').html('<h2>Error fetching terms.</h2>');
                            }
                        });
                    }
                });
                $('input[name="Accept"]').live('click', function(e){
                    e.preventDefault();
                    $.cookie('t_and_c', 'accepted', { expires: 30, path: '/', domain: 'yourdomain.com', secure: false });
                    $('#gallery').show();
                    $('#terms-container').empty().hide();
                });
                $('input[name="Cancel"]').live('click', function(e){
                    e.preventDefault();
                    window.location = 'http://disney.com';
                });
            })(this.jQuery);

and it won't interfere w/ other scripts.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
picdude

Joined: 2006-06-13
Posts: 176
Posted: Fri, 2011-08-26 23:54

Hey suprsidr,

I haven't abandoned your T&Cs. Just haven't had time to go through and edit them to my needs. Still planning on doing so, though. Will get back to you (soonish?) with that.

I've been in conversation with another photog who is also a code hobbiest and we came up with something that I'd like to bounce off you:
Can you think of any way to have Flash prevent a screen capture or render the info captured useless? He thinks there may be a way to have flash detect a screen capture (print screen/grab) and block the output or, when a screen capture is performed, to send false info to the clipboard.

Thoughts...?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2011-08-27 14:36

javascript can detect keyup/keydown events, although accessing the clipboard can be problematic.
I have never tried.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2011-09-04 11:54

@picdude, I've been playing w/ a possible way to obscure your images.
Strip the <img /> elements and replace them w/ html5's <canvas />
http://www.flashyourweb.com/gallery2/embed_samples/canvas.php

Most browser's don't have a "save as" for canvas although the popular firefox does.
But I took the opportunity to also watermark the images during the replacement.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
picdude

Joined: 2006-06-13
Posts: 176
Posted: Tue, 2011-09-06 13:11

Hey, thanks Suprsidr!
I went to your link there and to be honest, I'm not sure what the difference is. I'm on a mac and using the "grab" app I was able to do a screen cap of any of the images.
Could you explain in layman's terms what the benefit of replacing the img/ elements with canvas/ elements is?
I already have the Flash mod installed in my gallery so that no one can "save as". It's the screen cap that killing me, but there may not be any way around that....

 
picdude

Joined: 2006-06-13
Posts: 176
Posted: Tue, 2011-09-06 13:18

I'm kind of liking this watermark....
http://www.tattoojohnny.com/product/DFF-00109/c5375d8df5b8ca94a86ea12b1ddddb69/searchpage/1/image/8/prods/DBF-00359,AAF-02639,BWF-00070,DPF-00407,LLF-00236,CCF-00861,DBF-00331,DFF-00109,AUF-00067,BWF-00132,BWF-00387,HAF-00148,

I can still do a screen cap of it, but with so much of the image obscured at any one time it could defeat the purpose of stealing.

I have about 90,000 proofs in my gallery now. How server intensive do you think this type of image protection would be on me? And do you have any idea how it's done...?

I'm just looking at what options are out there...

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2011-09-06 23:53

I'm also just showing options.
You can use any image for watermarking.
The beauty of my solution is that the watermarking is done client side so no strain on the server.

My solution would need further tweaking in the theme to present Data URIs instead of image urls, but that's trivial.
Notice I've also disabled the context menu for the canvas/images

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2