Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter zipadee

    (@zipadee)

    Fantastic, thank you. That appears to have fixed the problem.

    When the new update is released, should I switch back to using the old plugin?

    Thread Starter zipadee

    (@zipadee)

    <script>
      if(google && google.maps && google.maps.event) {
    	google.maps.event.addDomListener(window, 'load', function() {
    		var mapOptions = {
    			zoom: <?php the_field('map_zoom','option'); ?>,
    				center: new google.maps.LatLng(<?php the_field('latitude','option');?>,<?php the_field('longitude','option');?>),
    			disableDefaultUI: true,
    			zoomControl: true,
    			styles: [{"featureType":"all","elementType":"labels.text.fill","stylers":[{"saturation":36},{"color":"#333333"},{"lightness":40}]},{"featureType":"all","elementType":"labels.text.stroke","stylers":[{"visibility":"on"},{"color":"#ffffff"},{"lightness":16}]},{"featureType":"all","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#fefefe"},{"lightness":20}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#fefefe"},{"lightness":17},{"weight":1.2}]},{"featureType":"administrative","elementType":"labels.text.fill","stylers":[{"color":"#003264"}]},{"featureType":"administrative","elementType":"labels.text.stroke","stylers":[{"color":"#ffffff"}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#f5f5f5"},{"lightness":20}]},{"featureType":"landscape.man_made","elementType":"geometry.fill","stylers":[{"color":"#ebebeb"}]},{"featureType":"landscape.man_made","elementType":"labels","stylers":[{"visibility":"on"}]},{"featureType":"landscape.natural","elementType":"geometry.fill","stylers":[{"color":"#e5e4e4"}]},{"featureType":"landscape.natural.terrain","elementType":"geometry.fill","stylers":[{"color":"#ffffff"}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#f5f5f5"},{"lightness":21}]},{"featureType":"poi.park","elementType":"geometry","stylers":[{"color":"#dedede"},{"lightness":21}]},{"featureType":"road","elementType":"all","stylers":[{"visibility":"on"}]},{"featureType":"road","elementType":"labels.text","stylers":[{"visibility":"on"}]},{"featureType":"road","elementType":"labels.text.fill","stylers":[{"visibility":"on"}]},{"featureType":"road","elementType":"labels.icon","stylers":[{"hue":"#00c4ff"}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"lightness":17},{"color":"#ffffff"},{"visibility":"on"}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#ffffff"},{"lightness":29},{"weight":0.2}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#ffffff"},{"lightness":18}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#ffffff"},{"lightness":16}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#f2f2f2"},{"lightness":19}]},{"featureType":"transit","elementType":"geometry.fill","stylers":[{"color":"#ffffff"}]},{"featureType":"transit","elementType":"labels.text","stylers":[{"visibility":"on"}]},{"featureType":"transit.station","elementType":"geometry","stylers":[{"visibility":"off"}]},{"featureType":"transit.station","elementType":"labels","stylers":[{"visibility":"on"}]},{"featureType":"transit.station","elementType":"labels.text.fill","stylers":[{"color":"#003264"}]},{"featureType":"transit.station","elementType":"labels.text.stroke","stylers":[{"color":"#ffffff"},{"visibility":"on"}]},{"featureType":"transit.station","elementType":"labels.icon","stylers":[{"visibility":"simplified"},{"saturation":"0"}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#e9e9e9"},{"lightness":17}]},{"featureType":"water","elementType":"geometry.fill","stylers":[{"color":"#293681"}]},{"featureType":"water","elementType":"labels.text","stylers":[{"color":"#737373"}]}]};
    			
    
    		// Get the HTML DOM element that will contain your map 
    		// We are using a div with id="map" seen below in the <body>
    		var els = document.getElementsByClassName('map');
    		if(els.length) {
    			var mapElement = els[0];
    
    			// Create the Google Map using our element and options defined above
    			var map = new google.maps.Map(mapElement, mapOptions);
    
    			var image = {
    				url: '<?php echo get_field('pin_icon','option'); ?>',
    				scaledSize: new google.maps.Size(60, 60)
    			};	
    			
    			// Let's also add a marker while we're at it
    			var marker = new google.maps.Marker({
    				position: new google.maps.LatLng(<?php the_field('latitude','option');?>,<?php the_field('longitude','option');?>),
    				map: map,
    				icon: image,
    			});
    		}
    	});
      }
    </script>

    There is one mu-plugin active, called wp-stack-cache.php. It’s installed by default by my hosting provider and can only be temporarily disabled, but not removed. I have tried disabling it but it doesn’t seem to fix the problem.

    Thread Starter zipadee

    (@zipadee)

    Service integrations:
    Facebook
    YouTube
    Twitter

    Plugin integrations:
    Smash Balloon Facebook Feed
    WP Forms

    Thanks.

    Thread Starter zipadee

    (@zipadee)

    Hi Aert,

    Thanks for getting back to me. I’ve deactivated the Google Maps integration, plus the ACF one. The script centre is empty.

    Many thanks.

    zipadee

    (@zipadee)

    Got it working in the Bible Text plugin by replacing the existing function with the following in bible-text.php.

    function mbbt_add_esv_text($reference, $heading) {	
      $url = 'https://api.esv.org/v3/passage/html/?q='.urlencode($reference).'&include-headings=false&include-footnotes=false';
    
      $curl = curl_init();
    
      curl_setopt_array($curl, array(
        CURLOPT_URL => $url,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => "",
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 30,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => "GET",
        CURLOPT_HTTPHEADER => array(
          "authorization: Token ######",
          "cache-control: no-cache"
        ),
      ));
    
      $response = curl_exec($curl);
      $err = curl_error($curl);
    
      curl_close($curl);
    
      $json = json_decode($response, true);
      $passage = $json["passages"][0];
      
    	return ("<span class=\"esv-scripture\">" . $passage . "</span>");
    }
    
    zipadee

    (@zipadee)

    I’m pretty sure v2 is deprecated and we need to use v3 now. It’s just getting this to work that I’m struggling with!

    zipadee

    (@zipadee)

    The new API key I’ve signed up for is for v3. I haven’t shared a link – maybe you were looking at somebody else’s?

    zipadee

    (@zipadee)

    Hi, I’m struggling with this one too. I’m using a plugin called Bible text and the current function is:

    function mbbt_add_esv_text ($reference, $heading) {
        $esv_url = 'https://www.esvapi.org/v2/rest/passageQuery?key=IP&passage='.urlencode($reference).'&include-headings=false&include-footnotes=false';
        if ($heading === FALSE || strtolower($heading) == 'span')
            $esv_url .= '&include-passage-references=false&include_audio_link=false&include-first-verse-numbers=false';
        return wp_remote_retrieve_body(wp_remote_get($esv_url));
    }

    I’ve signed up for an API key and have tried replacing with the function someone supplied above but I’m getting nothing.

    I’d be really really grateful for help!

    • This reply was modified 7 years ago by zipadee.
    Thread Starter zipadee

    (@zipadee)

    I gave up and used a different plugin! Although, to be fair, I didn’t follow up with the support, so they may have been able to help.

    Thread Starter zipadee

    (@zipadee)

    I’ve tried adding in the following line before the if(is_search()):

    if(is_admin()){
            return $where;
        }

    This doesn’t seem to make any difference though.

Viewing 10 replies - 1 through 10 (of 10 total)