Forum Replies Created

Viewing 15 replies - 16 through 30 (of 168 total)
  • Thread Starter pixelyzed

    (@pixelyzed)

    Hello Scott,

    Thank you so much! FWIW, I am truly impressed by the level of support you and Tobias give. That makes your tools so much better and powerful!

    Thanks again!

    Thread Starter pixelyzed

    (@pixelyzed)

    Hello,

    Got it for the order, works perfectly!

    For the header text I mean the actual column name in thead. My first column is the post title of the CPT and it says “Title” as the column name/heading. I need it to say “Companies”. Again this is using the Pods integration and maybe I should ask them but was wondering if DataTables has a way to do it.

    Thank you so much aghain!

    Thread Starter pixelyzed

    (@pixelyzed)

    Oh and last thing :), is there a similar way to change each column’s header text (as it’s a dynamic table I can’t edit this data in TablePress directly).

    Thanks!

    Thread Starter pixelyzed

    (@pixelyzed)

    Hello Tobias,

    Thank you very much for your quick reply. Good to know that the Alphabet search extension is still active, that is great news to me! I’m testing the custom commands and it works great for moving the length dropdown but I lost the alphabet search buttons. Is there a letter for that?

    Thanks again!

    And it does!! My shortcode does indeed only output a number calculated from the sum of Gravity Forms entries’ totals in several donation forms. It’s a moderately complex shortcode actually but the ouput is not ??

    I didn’t want the client to have to update this manually. So thank you so much! That really helps.

    • This reply was modified 4 years, 10 months ago by pixelyzed.

    Tried without the target attribute and that doesn’t work either:

    [thermometer raised=[total_dons]]

    This doesn’t seem to work for me. I have a shortcode [total_dons] that returns a donations total and I call your shortcode like this:

    [thermometer target=”50000″ raised=[total_dons]]

    It shows the thermometer with a 0 raised value and prints the last ] as text on the page.

    Do I have to do something special in my shortcode for this to work?

    Thanks!

    Any idea when this might be implemented? We are running into the same issue since a client site using your plugin is on Cloudways. I have to disable Varnish so it works normally.

    Also, will this require custom coding when it’s out of beta? Our use case for your plugin is on a 3 sites multisite network. One is for English Canada, one for Quebec (French) and one for he US. Unless a site visitor selects a language manually (we have links in a menu) I redirect them to the most appropriate site based on IP with a PHP function based on your plugin in my child theme.

    I’m far less comfortable with JavaScript so any pointers on reproducing the code below would be great.

    Thanks!

    add_action( 'template_redirect', 'zw3_build_user_redirect_url' );
    function zw3_build_user_redirect_url() {
    
    	$redirectURL = '';
    
    	if ( function_exists('geoip_detect2_get_info_from_current_ip' ) && !is_admin() && !is_user_logged_in() ) {
    
    		// Setup needed variables to determin where the user is and what site he's on
    		$userInfo = geoip_detect2_get_info_from_current_ip();
    		$userCountryCode = $userInfo->country->isoCode;
    		$userStateProvCode = $userInfo->subdivisions[0]->isoCode;
    		$userBrowserLang = substr( zw3_get_browser_language(), 0, 2 );
    		$currentSiteID = get_current_blog_id();
    		$currentSiteCountry = '';
    		$userSelectedSite = '';
    
    		//echo $userCountryCode;
    
    		// Check if user is on the correct site depending on 3 things :
    		// 1- They clicked a language link so are purposefully choosing a site
    		// 2- They clicked a language link in the last hour and a cookie was saved for that choice and exists
    		// 3- Neither of the above are true and the site choice is solely based on the user's location as determined by his IP IP
    
    		// First, if user has selected a site manually, save that in a cookie for one hour.
    		//  && !isset ( $_COOKIE[ 'user_selected_site' ] )
    		if( isset( $_GET[ 'noredirect' ] ) && sanitize_text_field( trim( $_GET[ 'noredirect' ] ) ) == 'en-CA' ) {
    
    			// User has selected the Canadian (root) site. Set the $userSelectedSite variable and user_selected_site cookie.
    			$userSelectedSite = 'CA';
    
    			if( !isset ( $_COOKIE[ 'user_selected_site' ] ) || $_COOKIE[ 'user_selected_site' ] != $userSelectedSite ) {
    
    				setcookie( 'user_selected_site', $userSelectedSite, time()+3600, COOKIEPATH, COOKIE_DOMAIN );
    
    			}
    
    			// Make sure $redirectURL is empty as we do not need to redirect the user since they just clicked the link to site they wanted.
    			$redirectURL = '';
    
    		} else if( isset( $_GET[ 'noredirect' ] ) && sanitize_text_field( trim( $_GET[ 'noredirect' ] ) ) == 'fr-CA' ) {
    
    			// User has selected the French Canadia (QC) site. Set the $userSelectedSite variable and user_selected_site cookie.
    			$userSelectedSite = 'QC';
    
    			if( !isset ( $_COOKIE[ 'user_selected_site' ] ) || $_COOKIE[ 'user_selected_site' ] != $userSelectedSite ) {
    
    				setcookie( 'user_selected_site', $userSelectedSite, time()+3600, COOKIEPATH, COOKIE_DOMAIN );
    
    			}
    
    			// Make sure $redirectURL is empty as we do not need to redirect the user since they just clicked the link to site they wanted.
    			$redirectURL = '';
    
    		} else if( isset( $_GET[ 'noredirect' ] ) && sanitize_text_field( trim( $_GET[ 'noredirect' ] ) ) == 'en-US' ) {
    
    			// User has selected the USA site. Set the $userSelectedSite variable and user_selected_site cookie.
    			$userSelectedSite = 'US';
    
    			if( !isset ( $_COOKIE[ 'user_selected_site' ] ) || $_COOKIE[ 'user_selected_site' ] != $userSelectedSite ) {
    
    				setcookie( 'user_selected_site', $userSelectedSite, time()+3600, COOKIEPATH, COOKIE_DOMAIN );
    
    			}
    
    			// Make sure $redirectURL is empty as we do not need to redirect the user since they just clicked the link to site they wanted.
    			$redirectURL = '';
    
    		} else if( isset ( $_COOKIE[ 'user_selected_site' ] ) && !isset( $_GET[ 'noredirect' ] ) ) {
    
    			if( !empty( $_COOKIE[ 'user_selected_site' ] ) ) {
    
    				$userSelectedSite = $_COOKIE[ 'user_selected_site' ];
    
    			}
    
    			// Make sure $redirectURL is empty as we do not need to redirect since the user has previously selected a site and the cookie is set.
    			$redirectURL = '';
    
    		}
    
    		// For users with no selection, set redirect URL based on user IP location
    		if( $currentSiteID == 1 && empty( $userSelectedSite ) ) {
    
    			// We're on the English Canadian site and user has no prior selection
    			$currentSiteCountry = 'CA';
    
    			if( $userCountryCode != $currentSiteCountry ) {
    
    				// We're on English Canadian site but user is in USA or outside Canada
    				// Redirect to US site
    				$redirectURL = '/us/';
    			}
    
    			if( $userCountryCode == $currentSiteCountry && $userStateProvCode == 'QC' ) {
    
    				// We're on English Canadian site but user is in Quebec
    				// Redirect to root Quebec site
    				$redirectURL = '/fr/';
    			}
    
    		} else if( $currentSiteID == 2 && empty( $userSelectedSite ) ) {
    
    			// We're on the Quebec site and user has no prior selection
    			$currentSiteCountry = 'CA';
    
    			if( $userCountryCode != $currentSiteCountry ) {
    
    				// We're on French Canadian (QC) site but user is in USA or somewhere else outside Canada
    
    				// Redirect to US site unless user's browser is localized in French
    				if( $userBrowserLang == 'fr' ) {
    					$redirectURL = '';
    				} else {
    					$redirectURL = '/us/';
    				}
    
    			}
    
    			if( $userCountryCode == $currentSiteCountry  && $userStateProvCode != 'QC' ) {
    
    				// We're on French Canadian (QC) site but user is in Canada but not in Quebec
    
    				// Redirect to CA site
    				$redirectURL = '/';
    			}
    
    		} else if( $currentSiteID == 3 && empty( $userSelectedSite ) ) {
    
    			// We're on the US site and user has no prior selection
    			$currentSiteCountry = 'US';
    
    			if( $userCountryCode != $currentSiteCountry && $userCountryCode == 'CA' && $userStateProvCode != 'QC' ) {
    
    				// We're on USA site but user is in Canada but not in Quebec
    				// Redirect to root (English Canadian) site
    				$redirectURL = '/';
    			}
    
    			if( $userCountryCode != $currentSiteCountry && $userCountryCode == 'CA' && $userStateProvCode == 'QC' ) {
    
    				// We're on USA site but user is in Canada but not in Quebec
    				// Redirect to root (English Canadian) site
    				$redirectURL = '/fr/';
    			}
    
    		}
    
    		//$userSelectedSite = 'User selected site: ' . $userSelectedSite . '<br>User Country Code: ' . $userCountryCode . '<br>User State/Prov Code: ' . $userStateProvCode . '<br>User Browser Lang: ' . $userBrowserLang . '<br>Redirect URL: ' . $redirectURL;
    		//print_r( $userSelectedSite );
    
    	}
    
    	if( !empty( $redirectURL ) ) {
    
    		wp_safe_redirect( $redirectURL );
    		exit;
    
    	}
    
    }
    Thread Starter pixelyzed

    (@pixelyzed)

    Hi there,

    I upgraded the PHP version from 7.1 to 7.2 as the status report reminded me it wasn’t on 7.2 yet and that seems to have fixed the issue. Does that make sense?

    Thank you very much for the prompt reply!

    Thread Starter pixelyzed

    (@pixelyzed)

    Hi again!

    I was wondering if there’s a hook or other way to change the label of the Purchase Order Number field? An option would be even better ??

    Thanks!

    Thread Starter pixelyzed

    (@pixelyzed)

    Thank you for the prompt reply and actually fixing this so quick! I’m impressed! Didn’t have time today but I will test the new version tomorrow.

    Thank you so much!

    Thread Starter pixelyzed

    (@pixelyzed)

    My pleasure Tom. I really mean it.

    Might take you up on your offer of sending you an email. What email should I use? The generatepress.com site has presales and account related contact forms but no other mean to reach you directly I can see.

    Thank you!!

    Thread Starter pixelyzed

    (@pixelyzed)

    Hi!

    Yes, I just updated two sites from 1.1 to 2.0.3 without issue. In one case I uploaded the new code you provided first and in the other I put it after the update. No issues with either updates.

    Thank you very much!

    Thread Starter pixelyzed

    (@pixelyzed)

    Hi Dennis,

    I updated the code and it indeed fixed the missing language link in menus. Awesome!

    On the other hand, I’M still seeing issues in the admin and the linking between pages in different language sites.

    I updated the plugin then uploaded the changed code. In the pages’ list, the pages that were linked to their counterpart in the other language site show as linked (I mean the chain/pencil icon “Create a new translation/Modify the translation) but, in the front end, some language links point to the other site’s home page and not the actual translated page it should link to.

    I need to open the page to edit and, this time the selection drop down is populated. I then just save the page and the front en link works again.

    I will need to test this again when I update another site. I will upload the new code first, then update the plugin and then report back what I find out.

    Thank you VERY much for your quick help so far. It is much apreciated!

    Thread Starter pixelyzed

    (@pixelyzed)

    FWIW, one site is on the Genesis theme and the other on GeneratePress.

Viewing 15 replies - 16 through 30 (of 168 total)