Kiran

Forum Replies Created

Viewing 15 posts - 1,351 through 1,365 (of 6,022 total)
  • Author
    Posts
  • in reply to: transfering places to a new site #510303

    Kiran
    Moderator
    Post count: 7069

    Hi Peter,

    It looks like there was an illegal new character that was raises error.

    I have fixed it. Please try copy again PHP snippet from here #509955

    Let us know.

    Regards,
    Kiran

    in reply to: Event photos not diaplaying intermittently #510302

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: RSS Feed not working #510172

    Kiran
    Moderator
    Post count: 7069

    Hi David,

    I have done some debugging and it seems rewrite rules fails to identify feed page for category urls.

    We have opened a task to fix https://github.com/AyeCode/geodirectory/issues/938

    It will be implemented in future version.

    Kiran

    in reply to: Places are not importing correctly from csv file #510160

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: After conversion to V2 issues #510120

    Kiran
    Moderator
    Post count: 7069

    Hi Vlad,

    Issue is fixed and patch applied on your site. Please try now after clearing your browser cache.

    Kiran

    in reply to: Display number of favourites for listing #510106

    Kiran
    Moderator
    Post count: 7069

    Hello,

    I have added some changes to update button text on favorite/unfavorite action.

    Apply patch on your site from here https://github.com/AyeCode/geodirectory/commit/0cc94e6c4df78c183dd83efc6fbdb357caa10c9a and update PHP snippet from here https://wpgeodirectory.com/support/topic/display-number-of-favourites-for-listing/#post-509905

    Kiran

    in reply to: Disable HTML Editor — Strip tags #509969

    Kiran
    Moderator
    Post count: 7069

    Hi There,

    Some times File Manager plugin breaks the site when a file that being updated is used by other plugins or it is used in background actions. So we recommend file access via FTP instead of WP File Manager.

    Kiran

    in reply to: Entry description #509968

    Kiran
    Moderator
    Post count: 7069

    Hi Kai,

    Issue has been fixed. I have re-saved add listing page contents by switching editors.

    Please check and let us know.

    Kiran

    in reply to: Scrolling on mobile device (IOS apple) not smooth. #509966

    Kiran
    Moderator
    Post count: 7069

    Fix is included in Supreme Directory theme. So don’t worry about future updates.

    Kiran

    in reply to: Categories not showing listings #509962

    Kiran
    Moderator
    Post count: 7069

    Hi Danielle,

    It looks like you have mixed GDv1 & GDv2 and also there was conflict with country & category.
    I have fixed this both issues and now seems pages are working fine.

    Please check and let us know.

    Thanks,
    Kiran

    in reply to: WP Easy Updates Problem #509949

    Kiran
    Moderator
    Post count: 7069

    Thanks for letting us know.

    Kiran

    in reply to: Images (other than the first) doesn't load #509941

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: WP Easy Updates Problem #509940

    Kiran
    Moderator
    Post count: 7069

    Hi Mark,

    To fix conflict i have created one mu-plugin (under /mu-plugins/wp_easy_updates_fix.php) as provided solution at here https://wpgeodirectory.com/support/topic/fatal-error-after-updating/#post-469107

    Now plugins manager show licence key option and also it shows updates available for GeoDirectory [plugins.

    Let us know.

    Thanks,
    Kiran

    in reply to: transfering places to a new site #509935

    Kiran
    Moderator
    Post count: 7069

    Hi Peter,

    We have added new hook to force specific API to retrieve address & GPS. It will be in next release.

    Patch available at here: https://github.com/AyeCode/geodirectory/commit/89b9d7ea96686a5f389ee04b6cdfc25ea5210b33

    You can use following PHP snippet to force specific API for Geocode service during import listing & insert dummy data.

    
    
    /**
     * Filter Geocode API used to get GPS from post address.
     */
    function gd_snippet_post_gps_from_address_api( $api ) {geodir_error_log( $api, 'gd_snippet_post_gps_from_address_api', __FILE__, __LINE__ );
    	$api = 'google'; // google or osm
    
    	return $api;
    }
    add_filter( 'geodir_post_gps_from_address_api', 'gd_snippet_post_gps_from_address_api', 20, 1 );
    
    /**
     * Filter Geocode API used to get address from post GPS.
     */
    function gd_snippet_post_address_from_gps_api( $api ) {geodir_error_log( $api, 'gd_snippet_post_address_from_gps_api', __FILE__, __LINE__ );
    	$api = 'google'; // google or osm
    
    	return $api;
    }
    add_filter( 'geodir_post_address_from_gps_api', 'gd_snippet_post_address_from_gps_api', 20, 1 );

    See for more info https://github.com/AyeCode/geodirectory/issues/826#issuecomment-534458373

    Regards,
    Kiran

    in reply to: Display number of favourites for listing #509905

    Kiran
    Moderator
    Post count: 7069

    Hi,

    Try following PHP snippet.

    
    
    function gd_snippet_get_post_favs_count( $post_id ) {
    	global $wpdb;
    
    	$count = 0;
    	if ( empty( $post_id ) ) {
    		return $count;
    	}
    
    	$meta_key = 'gd_user_favourite_post';
    	$meta_value = 'i:' . (int) $post_id . ';';
    
    	if ( is_multisite() ) {
    		$blog_id = (int) get_current_blog_id();
    
    		if ( $blog_id && $blog_id != 1 ) {
    			$meta_key = '_' . $blog_id;
    		}
    	}
    
    	$count = (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->usermeta} WHERE meta_key = %s AND meta_value LIKE %s", array( $meta_key, '%' . $wpdb->esc_like( $meta_value ) . '%' ) ) );
    
    	return $count;
    }
    
    /**
     * Favorite
     */
    function geodir_favourite_text_callback( $label ) {
    	global $gd_post;
    
    	$post_id = wp_doing_ajax() && ! empty( $_REQUEST['pid'] ) ? absint( $_REQUEST['pid'] ) : ( ! empty( $gd_post ) ? $gd_post->ID : NULL );
    
    	if ( ! empty( $post_id ) ) {
    		$count = gd_snippet_get_post_favs_count( $post_id );
    
    		$label = '<span>' . $count . '</span> Favorites';
    	}
    
        return $label;
    }
    add_filter( 'geodir_favourite_text', 'geodir_favourite_text_callback', 20, 1 );
    
    /**
     * Unfavorite
     */
    function geodir_unfavourite_text_callback( $label ) {
    	global $gd_post;
    
    	$post_id = wp_doing_ajax() && ! empty( $_REQUEST['pid'] ) ? absint( $_REQUEST['pid'] ) : ( ! empty( $gd_post ) ? $gd_post->ID : NULL );
    
    	if ( ! empty( $post_id ) ) {
    		$count = gd_snippet_get_post_favs_count( $post_id );
    
    		$label = '<span>' . $count . '</span> Favorites';
    	}
    
        return $label;
    }
    add_filter( 'geodir_unfavourite_text', 'geodir_unfavourite_text_callback', 20, 1 );

    Regards,
    Kiran

Viewing 15 posts - 1,351 through 1,365 (of 6,022 total)
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount