Stiofan O'Connor

Forum Replies Created

Viewing 15 posts - 526 through 540 (of 13,774 total)
  • Author
    Posts
  • in reply to: GD v2.0.0.55: Business Hours issue #486887

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Adrien,

    1. The default should be +1, it looks like for some reason it is defaulting to the DST version, i have fixed this and it will be in the next release.

    2. The class should be added to the widget which should only affect that widget, not sure how exactly you are adding it?

    Thanks,

    Stiofan

    in reply to: Conditional Tabs #486851

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Paul,

    The below example would remove the tab “more_details” for all posts that are not in the cat with ID = 100.

    Its best to use the tab key rather than the name (the tab key is what appears after the # when u click the tab).

    add_filter('geodir_tab_settings','_my_tabs_edit',10,2);
    function _my_tabs_edit($tabs,$post_type){
      global $gd_post;
      
      if(!empty($tabs) && !empty($gd_post->post_category)){
    	$cats = array_filter(explode(",",$gd_post->post_category));
    	$cat_id = 100; // set id here
    	$remove_tab_key = "more_details"; // set tab key here
    	if( !in_array($cat_id,$cats) ){
    	  foreach($tabs as $key => $tab){
    	  	if($tab->tab_key==$remove_tab_key){
    		 unset($tabs[$key]);// remove the tab
    		}
    	  }
    	}
    	
      }
    
      return $tabs;
    }

    Hope this helps.

    Thanks,

    Stiofan

    in reply to: Widget code to embed for listing owners #486654

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    This should be release this week.

    Thanks,

    Stiofan

    in reply to: Error when editing with Elementor #486612

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    The update should be out today or tomorrow at latest.

    Thanks,

    Stiofan


    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Adrien,

    For emails we already have basic JS obfuscation.

    Every custom field has a filter to be able to override the content, the email one is here: https://github.com/AyeCode/geodirectory/blob/master/includes/custom-fields/output-functions.php#L1333

    (not tested but this would prob be how i would do it:

    /**
     * Get the html output for the custom field: email
     *
     * @param string $html The html to be filtered.
     * @param string $location The location to output the html.
     * @param array $cf The custom field array details.
     * @param string $output The output string that tells us what to output.
     * @since 2.0.0 $output param added.
     * @since 1.6.6
     *
     * @return string The html to output for the custom field.
     */
    function _my_custom_geodir_cf_email($html,$location,$cf,$p='',$output=''){
    
        // check we have the post value
        if(is_numeric($p)){$gd_post = geodir_get_post_info($p);}
        else{ global $gd_post;}
    
        if(!is_array($cf) && $cf!=''){
            $cf = geodir_get_field_infoby('htmlvar_name', $cf, $gd_post->post_type);
            if(!$cf){return NULL;}
        }
    
        // Block demo content
        if( geodir_is_block_demo() ){
            $gd_post->{$cf['htmlvar_name']} = '[email protected]';
        }
    
        $html_var = $cf['htmlvar_name'];
    
        // Check if there is a location specific filter.
        if(has_filter("geodir_custom_field_output_email_loc_{$location}")){
            /**
             * Filter the email html by location.
             *
             * @param string $html The html to filter.
             * @param array $cf The custom field array.
             * @param string $output The output string that tells us what to output.
             * @since 2.0.0 $output param added.
             * @since 1.6.6
             */
            $html = apply_filters("geodir_custom_field_output_email_loc_{$location}",$html,$cf,$output);
        }
    
        // Check if there is a custom field specific filter.
        if(has_filter("geodir_custom_field_output_email_var_{$html_var}")){
            /**
             * Filter the email html by individual custom field.
             *
             * @param string $html The html to filter.
             * @param string $location The location to output the html.
             * @param array $cf The custom field array.
             * @param string $output The output string that tells us what to output.
             * @since 2.0.0 $output param added.
             * @since 1.6.6
             */
            $html = apply_filters("geodir_custom_field_output_email_var_{$html_var}",$html,$location,$cf,$output);
        }
    
        // Check if there is a custom field key specific filter.
        if(has_filter("geodir_custom_field_output_email_key_{$cf['field_type_key']}")){
            /**
             * Filter the email html by field type key.
             *
             * @param string $html The html to filter.
             * @param string $location The location to output the html.
             * @param array $cf The custom field array.
             * @param string $output The output string that tells us what to output.
             * @since 2.0.0 $output param added.
             * @since 1.6.6
             */
            $html = apply_filters("geodir_custom_field_output_email_key_{$cf['field_type_key']}",$html,$location,$cf,$output);
        }
    
        // If not html then we run the standard output.
        if(empty($html)){
    
            global $preview;
            if ($cf['htmlvar_name'] == 'geodir_email' && !(geodir_is_page('detail'))) {
                return ''; // Remove Send Enquiry from listings page
            }
    
    
            if ($gd_post->{$cf['htmlvar_name']}) {
    
                $field_icon = geodir_field_icon_proccess($cf);
                $output = geodir_field_output_process($output);
                if (strpos($field_icon, 'http') !== false) {
                    $field_icon_af = '';
                } elseif ($field_icon == '') {
                    $field_icon_af = '';
                } else {
                    $field_icon_af = $field_icon;
                    $field_icon = '';
                }
    
                $is_elementor_preview = class_exists( 'GeoDir_Elementor' ) && GeoDir_Elementor::is_elementor_view() ? true : false; // Check if elementor preview
                $email = $gd_post->{$cf['htmlvar_name']} ;
                $value = '';
                if ( ! empty( $email ) && ( $email != '[email protected]' ) && ( $e_split = explode( '@', $email ) ) && ! defined( 'REST_REQUEST' ) && ! $is_elementor_preview ){
               $value .= eeb_email($email,"Mail me");   
    } elseif ( ! empty( $email ) && ( ( defined( 'REST_REQUEST' ) && REST_REQUEST ) || $is_elementor_preview ) ) {
                    $value .= "$email";
                } else {
                    $value .= $email;
                }
    
                $html = '';
            }
    
    
    
        }
    
        return $html;
    }
    add_filter('geodir_custom_field_output_email','_my_custom_geodir_cf_email',11,5);

    Stiofan

    in reply to: Using Font Awesome Pro #486599

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Johannes,

    I am not sure how the pro works, licence key? I would be happy to work with you to add settings to get it working.
    I can’t find much info about setting it up on their site.
    If you want i can add you to our slack group or skype and we can get it working for you.

    Thanks,

    Stiofan

    in reply to: GD v2.0.0.55: Business Hours issue #486462

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    UTC = Universal Time Coordinated
    DST = daylight saving time

    France offset is +1 from UTC (not accounting for DST), the input on the add listing page expects this, the calculation for DST is done on the output function not the input function. The input expects the standard +/- offset so that you never have to change it.

    I have updated the text to read:

    Timezone offset from UTC (not including daylight savings time This is set automatically when address is set)

    All times should be +1 if in France, you can use the import/export to bulk update this if you have many listings that need changed.

    Thanks,

    Stiofan

    in reply to: GD v2.0.0.55: Business Hours issue #486387

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Adrien,

    The Timezone field is in relation to UTC and does not need to be adjusted for DST (daylight savings time), so i think it should be +1 for France?
    I will add a note in the input settings for this.

    For the business hours to have it expanded if you are using the post meta widget under advanced settings you can add the extra class “gd-bh-expanded” which will show it as expanded by default.

    If i can help further just let me know.

    Thanks,

    Stiofan

    in reply to: Slider on details pages #486314

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Maud,

    This has been fixed and will be in the next release (likely tomorrow).
    If you need the fix sooner please replace this file in your plugin https://github.com/AyeCode/geodirectory/blob/master/assets/js/geodirectory.min.js

    Thanks,

    Stiofan

    in reply to: Flexslider shows only first image #486313

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Bernward,

    I found the reason but not sure the actual cause, something that should have been returning a number was not, i added a check for this and it all seems to be working now. This fix will be in the next release so no need to worry about it on next update 🙂

    Thanks,

    Stiofan

    in reply to: Published date in Export #486283

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    This has been added and will be in the next release.

    Thanks,

    Stiofan

    in reply to: Social Importer doesn't work anymore on FB #486215

    Stiofan O’Connor
    Site Admin
    Post count: 22956
    This reply has been marked as private.
    in reply to: Published date in Export #486214

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Mark,

    I have added a a task for this to be added back to export.
    I suspect (but not tested) that it would work with import already.

    Thanks,

    Stiofan

    in reply to: Issues with V2 #486176

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi kerry,

    You have much more control over everything now.

    A. Do you mean the breadcrumbs? We have removed our own breadcrumbs functionality as this is more theme territory. We do however support the Yoast breadcrumbs, this is usually added to your theme template.

    B. The tabs are now drag and drop, you can have any info you want there, go to the CPT>Settings>Tabs. You can also put info inside other tabs if you make them sub items.

    C. Again there are many ways to show things here, you can use the v1 way of adding it to the details sidebar output location in the field settings OR you can add individual items via widgets, you can use the GD > post meta, GD > Post images, post address etc…

    You can also adjust everything on the actual details page via the Details page template, you can add/remove or move any info, v2 requires a little setup but is 100x more powerful and you can have any info anywhere 🙂

    Thanks,

    Stiofan

    in reply to: unsaved changes endless loop #486157

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Jeff,

    I have made some changes and done some testing and it all apears to be working fine on my local site, some of the login details no page 1 were not working for me (wp-admin) can you double check all details and i’ll upload the changes for you to test.

    Thanks,

    Stiofan

Viewing 15 posts - 526 through 540 (of 13,774 total)
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount