Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#2601 Re: CE4 Cart » Easy cookie warning popup? » 2015-03-01 06:42:13

Ben

Hi Martin, 

I'm not aware of a more general way of doing this that would interrupt the page loading prior to TTG pages creating a session (and hence creating a cookie).  You could say that the solution I provided works in 'the spirit' of the law.  The cookie may exist but it's not matched to any data.

A robust solution would be to interrupt the page flow before any TTG PHP pages have even begun to load.  Thinking aloud here, one idea I had:

1) Create an .htaccess file that checks for the existence of a cookie (call it the 'AllowCookies' cookie)
2) If the cookie doesn't exist, redirect to a new page that prompts the user to proceed with cookies or not
3) If proceeding, add the AllowCookies cookie and take the user back to the page at 1)
4) The .htaccess would see that the AllowCookies cookie is there and not interrupt the flow to the originally requested page

The .htaccess could be added to whichever directory makes sense as an entry point, for example galleries/ in your case.

Such a system would consist of two files:

An .htaccess file
A php file to prompt the customer and redirect to the originally requested page or not

These two files would not interfere with any TTG code.

#2602 Re: CE4 Client Response Gallery » How To Log In To Gallery » 2015-02-28 08:55:32

Ben

IF you're looking for more a more obvious way to submit feedback, the submission form can be launched by any control with the class "submit-large".  So you could add a prominent link to your Page Copy.  For example, this code adds a link named "Submit Feedback" in the page copy:

<a href="#" class="submit-large">Submit Feedback</a>

Similarly, for client-managed galleries, the following will provide an alternative logout link:

<a href="#" class="logout-large">Save and Logout</a>

#2603 Re: CE4 Client Response Gallery » Form at bottom of gallery » 2015-02-28 08:45:37

Ben

Something undocumented: The submission form can be launched by any control with the class "submit-large".  So you could add a prominent link to your Page Copy.  For example, this code adds a link named "Submit Feedback" in the page copy:

<a href="#" class="submit-large">Submit Feedback</a>

Similarly, for client-managed galleries, the following will provide an alternative logout link:

<a href="#" class="logout-large">Save and Logout</a>

#2604 Re: CE4 Cart » Easy cookie warning popup? » 2015-02-27 11:28:20

Ben

That somehow needs to integrate with the cart functionality to disable it if the user opts out.

#2605 Re: CE4 Publisher » Still Use Ftp? » 2015-02-27 06:27:21

Ben

There isn't.  Am I right that you are publishing from high res or raw files?  One workaround would be to only publish from smaller res files (which may require an export and re-import before creating your published collections).  If you're using smart previews, then disconnecting your computer from the source of the original files, such as external hard drive, will force the published renditions to be made from the smaller smart previews, which should be considerably faster.

#2606 Re: CE4 Client Response Gallery » Accidental delete of feedback. OH NO! » 2015-02-27 06:23:59

Ben

Ah okay.  I had assumed you were using the standalone mode, in which the only way to view unsubmitted responses would be by accessing the database directly. 
In any case, I'm afraid that the feedback is now lost.

#2607 Re: CE4 Client Response Gallery » Accidental delete of feedback. OH NO! » 2015-02-27 06:18:06

Ben

Were you accessing the database with phpliteadmin? If so I think you're out of luck.

#2608 Re: CE4 Cart » Easy cookie warning popup? » 2015-02-27 06:09:26

Ben

The cart JS has its own hooks mechanism that we had previously used to adapt the code for various types of galleries, in particular Highslide.  This is handled via a file within your template or gallery at lib/js/ttgcart.hooks.js.  This is a good spot to add page functionality.

I've written a bit of code that pops up an alert when the customer clicks on a buy button.  If the customer clicks 'cancel' then the page reloads.  This isn't particularly graceful but the cart hooks don't provide a mechanism to prevent further actions.

The extra code includes two functions to handle cookies so that the browser can remember that a customer has allowed cookies, and code within the ttgCart.pre_open_modal function.  ttgCart.post_populate_buy_buttons  would be a more ideal location, except that the use of page reloading as an exit mechanism would continually bombard the user with the popup until choosing 'ok'.

To use this code, copy and paste it into lib/js/ttgcart.hooks.js in your gallery or template.  You may want to change the message.

/*
    Functions do not need to exist here - jquery.ttgcart.js checks for functions before trying to call them.
    However this file should exist, as the browser will get a 404 otherwise.
 */

function setCookie(cname, cvalue, exdays) {
    var d = new Date();
    d.setTime(d.getTime() + (exdays*24*60*60*1000));
    var expires = "expires="+d.toUTCString();
    document.cookie = cname + "=" + cvalue + "; " + expires;
}

function getCookie(cname) {
    var name = cname + "=";
    var ca = document.cookie.split(';');
    for(var i=0; i<ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1);
        if (c.indexOf(name) == 0) return c.substring(name.length,c.length);
    }
    return "";
}

if ("ttgCart" in window) {
    ttgCart.post_populate_buy_buttons = function() {}

    ttgCart.post_get_pricing = function() {}

    ttgCart.pre_open_modal = function() {
        var message = "We use cookies to ensure that we give you the best experience on our website. If you continue without changing your settings, we'll assume that you are happy to receive all cookies from this website. \n\nIf you would like to change your preferences you may do so by following the instructions at http://www.aboutcookies.org/Default.aspx?page=1";
        
        var cookiesAllowed = getCookie("cookiesAllowed");
        
        if (cookiesAllowed == undefined || !cookiesAllowed) {
            if (confirm(message)) {
                 setCookie("cookiesAllowed", 1, 7);
            } else {
                 location.reload();
            }        
        }
    }

    ttgCart.post_open_modal = function() {}

    ttgCart.add_success = function() {}

    ttgCart.add_error = function() {}

    ttgCart.post_cancel_modal = function() {}

    ttgCart.pre_load_widget = function() {}

    ttgCart.post_load_widget = function() {}

    ttgCart.post_click_add_button = function() {}
}

#2609 Re: CE4 Client Response Gallery » Accidental delete of feedback. OH NO! » 2015-02-27 04:57:00

Ben

You and your client should have received the feedback in emails. Can you get hold of either one of those emails?

Otherwise, the database is backed up upon each version upgrade. If you had upgraded to CRG since receiving the feedback but prior to deleting the feedback then the data should be retrievable.

#2610 Re: CE4 Publisher » Publisher Upload Crashing » 2015-02-25 13:28:17

Ben

That's interesting. So was it failing at the same point every time?

#2611 Re: CE4 Client Response Gallery » Master log in & Assigning all album in a set to a client » 2015-02-25 13:22:14

Ben

Hi Jon, see my email about these two that I sent on Monday.

#2612 Re: CE4 Client Response Gallery » How To Log In To Gallery » 2015-02-25 05:44:48

Ben

Bluehost does not allow the sending of emails via SMTP, however sending using the 'mail' method on Bluehost is reliable.  It seems that blocking 'smtp' is the norm rather than the exception and isn't in itself a reflection of how good or reliable a host is.

After configuring TTG BE to use 'mail', I suggest that you set up the email address you've configured as the Vendor email in TTG Be settings within the Bluehost control panel.  In that way, Bluehost will be aware of the address you are attempting to send from and then correctly use that email address when the emails go out.  Such emails should successfully get through to your receiver and not be marked as spam.

If you are using a service other than Bluehost for that email address then the above step won't cause any issues.  Your other provider can still serve to send and receive emails.  Adding an email address in the control panel only makes Bluehost aware of it.

#2614 Re: CE4 Publisher » publisher instances for two different websites on the same server » 2015-02-22 20:07:07

Ben

Hi Bernhard,  the first thing to try is authenticating with the default API Key, which is ttg9999.  If that works then it means that your chosen API Key hasn't been set of saved properly.
If that's not the case, please send me a PM or Email (via the links under my name) with the TTG BE admin login details on the site that you can't authenticate to.

#2615 Re: CE4 Publisher » Error Uploading Rendition » 2015-02-22 06:35:45

Ben

We can go back and forth on this till the cows come home.  This is an issue with GoDaddy and not something we can fix on our end. The reason you can't visit your site after attempting to use Publisher is because GoDaddy incorrectly interprets valid requests from your PC as a denial-of-service attack and blocks all requests from your IP for a set period of time.   TTG absolutely does not have a mechanism to alert your ISP that something is amiss.  (why would it?) 

Also, if you are using a proxy then you are still going through your ISP.  However GoDaddy will think you're coming from a different IP address, so the block they have imposed on you will be bypassed.

Your options are to 1) Convince GoDaddy to fix their firewall rules (not likely), 2) Request that your site be migrated to a server that does not suffer from these rules (which several TTG customers have successfully done), or 3) Move to a different host.

#2616 Re: CE4 Publisher » Moving directories with Publisher » 2015-02-22 06:28:05

Ben

You should be able to move everything within test to the level above.  I have something similar, moving the galleries, lib and ttg-be directories from /ttg/pages_ce4/ to /.  A gallery that had resided at http://mysite.com/ttg/pages_ce4/album-one/ then functioned fully at http://mysite.com/album-one/

I then changed the Publisher API URL from http://mysite.com/ttg/pages_ce4/ttg-be/ to http://mysite.com/ttg-be/ and was able to publish albums to the new location.

#2617 Re: CE4 Publisher » Moving directories with Publisher » 2015-02-21 13:41:00

Ben

Hi, can you provide a link to your site? What kinds of errors are you getting?

#2618 Re: CE4 Client Response Gallery » How To Log In To Gallery » 2015-02-21 11:09:07

Ben

Hi, that's caused by your host not allowing SMTP mail from site.  I suggest trying the 'mail' send type instead.

I am a little perplexed as to why that error is coming back to the browser.  The email function has been coded in a way that emails be only sent out after responding to the client that the feedback has been submitted.  So whether the mail goes out or not, the client should not receive an error.

#2619 Re: CE4 Client Response Gallery » Feedback Email » 2015-02-21 07:36:45

Ben

We're sorry that it sucks but CE4 CRG is new and can not be all things to all people on launch.  I'll look to add an option to only include images that include other feedback such as provided by textfields.

#2620 Re: CE4 Client Response Gallery » Client Field Problem » 2015-02-21 07:27:49

Ben

Hi Marc-André, your client fields all look properly configured and are being read properly by the form.
I think this is caused by a bug in CRG failing to handle the four grid items that are empty.  Specifically, since the four cells don't have thumbnails, the JavaScript is failing to find "id" attributes.

For testing, can you try editing Test2/index.php and commenting out these items?  That just means adding <!-- before and --> after, so that in index.php you'll have:

<!--
    <div class="gridcell cell-empty clearfix">
    <div class="griditem">

    </div><!-- .griditem -->
    </div><!-- .gridcell -->
    <div class="gridcell cell-empty clearfix">
    <div class="griditem">

    </div><!-- .griditem -->
    </div><!-- .gridcell -->
    <div class="gridcell cell-empty clearfix">
    <div class="griditem">

    </div><!-- .griditem -->
    </div><!-- .gridcell -->
    <div class="gridcell cell-empty clearfix">
    <div class="griditem">

    </div><!-- .griditem -->
    </div><!-- .gridcell -->
-->

If that solves the submission form issue, then options to work around this are to either make sure their are no empty cells (Rod or Matt, do you know how to do this?), and for us to add a fix to the CRG Javascript.

#2621 Re: CE4 Publisher » Unable to change album set slug » 2015-02-20 20:32:33

Ben

Thanks for your time in helping to solve this.  There was a bug that crept into the most recent version of Publisher that prevented the renaming of Album Set slugs for Album Sets that resided within other Album Sets.

I have this and one other, minor, fix in Publisher 2.2.1 which is now available.  I don't consider this an urgent update, so others may choose to wait for a more significant Publisher update before upgrading files.

#2622 Re: CE4 Publisher » Gallery not working on mobile » 2015-02-20 20:22:53

Ben

Hi Chris, are you having success with the *-single.php pages now?

If you do find missing files in published galleries (such as .htaccess) then you may want to try clicking on the link 'Update Album Files' on the Publisher admin dashboard.  That link re-copies the stub files that should be found in each of the galleries, such as index.php, single.php and .htaccess.

(The actual intention of that function is to give customers way of upgrading the stub files should we ever need to change those files or put bug fixes in them.  So far we haven't needed to change them.)

#2623 Re: CE4 Publisher » Gallery not working on mobile » 2015-02-20 12:55:01

Ben

Hi Chris,  it may be that mod-rewrite is not enabled on your server.  Can you try editing the file burma/.htaccess so that it reads like this:

RewriteEngine On
RewriteRule ^(.*)-single.*php$ single.php?id=$1 [L]

instead of this:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*)-single.*php$ single.php?id=$1 [L]
</IfModule>

If the Burma gallery no longer loads after that change, then it implies that mod-rewrite is not enabled (and hence those two Rewrite lines aren't available on the server).  If that is the case then immediately go back to the prior version of .htaccess so that your gallery does work, and contact your host to request that mod-rewrite be enabled.

#2624 Re: CE4 Publisher » Gallery not working on mobile » 2015-02-20 06:26:27

Ben

You may need to enable the display of hidden files within your FTP program.

#2625 Re: CE4 Publisher » Gallery not working on mobile » 2015-02-20 05:21:09

Ben

Hi Chris, the single pages for published galleries use .htaccess files to map URLs in the form of image-id-single.php to single.php?id=image-id.  In that way, there is only one file (single.php) that handles the requests.
As an example, when viewing http://www.chrishammondphotography.com/ … ingle.php, what you should be seeing is a page that looks like http://www.chrishammondphotography.com/ … ?id=142856 (but with the browser still indicating that you're looking at 124856-single.php)

Can you check via FTP that there is an .htaccess file within galleries/home/burma?  Have you provided your own .htaccess files at any levels above that?  (i.e. at /.htaccess, /galleries/.htaccess or /home/.htaccess).  If so, try disabling them to see whether that fixes the issue.

Board footer

Powered by FluxBB