[SOLVED] upload disclaimer

weiser

Joined: 2014-05-20
Posts: 7
Posted: Tue, 2014-05-20 10:14

Hey,
I would like to add a upload disclaimer to a gallery3 site.

Any way or module to to that with?

Thanks,

Kim

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2014-05-20 13:39

There is no module that I know of for this. I guess it depends where you want this disclaimer.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
weiser

Joined: 2014-05-20
Posts: 7
Posted: Tue, 2014-05-20 13:50

The best thing, I think, would be in the "Add photos to Gallery" where a text string could be viewed(maybe a link to detailed description) and a checkmark that should be selected to allow the upload to start.

Or else just show the text with out a checkmark on the same dialog.

Kim

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2014-05-21 02:07

1. Install the pages module and create a page called terms_and_conditions and add your terms and conditions you desire.
2. Create a copy of gallery3/modules/gallery/views/form_uploadify.html.php for backup.
3. Use the attached to replace the file saved in step 2 ensuring it has the same name and extension (remove _.txt).

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2014-05-21 04:12

Here is even a better version that remembers the user checkbox for 30 days

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
weiser

Joined: 2014-05-20
Posts: 7
Posted: Wed, 2014-05-21 18:06

Thanks,

that's really cool, it is exactly something like this, I wanted.

Although I have made a little modification to the first script (The one with out cookies):

It was still possible to click the "select upload files" botton, so I took some stuff from the last script and change this:

$("#g-add-photos-canvas").css("visibility", "hidden");
$('#agree').change(function() {
if ( $(this).is(':checked') ) {
$("#g-add-photos-canvas").css("visibility", "visible")
} else {
$("#g-add-photos-canvas").css("visibility", "hidden")

To this:

$("#g-add-photos-canvas").css("left", "-10000px");
$('#agree').change(function() {
if ( $(this).is(':checked') ) {
$("#g-add-photos-canvas").css("left", "0px")
} else {
$("#g-add-photos-canvas").css("left", "-10000px")

But the second script is not working, and I can't figure out why. But it never allows me to upload any files, and it do not seem to put any cookies on my computer.

Kim

 
weiser

Joined: 2014-05-20
Posts: 7
Posted: Wed, 2014-05-21 18:17

It seems like the problem with the cookie script is in the line where the cookie is created:

$.cookie($(this).attr("name"), $(this).prop('checked'), {
path: '/',
expires: 30
});

But I can't figure out the problem in it...

Kim

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2014-05-21 19:37

The attached seems to work for me.
Not sure when the jquery cookie.js file got added to what version or if it is installed by default. You can view the source of the combined JS file on your site and see if cookie.js is loaded. If not then see is adding a language makes that extra bit of JS get added.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2014-05-23 22:39

Let me know if it still a issue and I try to see how cookies are set and get without the jquery method.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
weiser

Joined: 2014-05-20
Posts: 7
Posted: Mon, 2014-05-26 13:37

I have tested the cookie version again, with an additional languish installed.
But the upload frame do not show, when clicking the checkmark.

I have looked in the pagesource, and I can see the g_locale cookie code, and also it is created in my browser.
But I can't see the checkmark cookiecode, also the cookie is not created in my browser.

Kim

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2014-05-26 15:20

I guess it is because I am using the experimantal version of G3 that has the jquery cookie plugin. I will have to rewite it to work without the plugin I guess.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2014-05-26 21:55

I think I got it sorted now. Try the attached.
I was using a different version of jquery and it did not have a function.
Let me know if it works and I can make it into a module.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
weiser

Joined: 2014-05-20
Posts: 7
Posted: Tue, 2014-05-27 06:27

Yes, that did fix it, it is now working.

To have it as a module would be a great idea.

Thanks for the help, it was really nice of you.

Kim

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2014-05-30 21:24
 
weiser

Joined: 2014-05-20
Posts: 7
Posted: Tue, 2014-06-03 06:48

Finally I had some time to test the module, and it work perfect.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2014-06-03 13:38

Great!

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team