ian bran

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 93 total)
  • Author
    Posts
  • in reply to: Custom Field Number 0 different than Null #438440

    ian bran
    Expired Member
    Post count: 122

    Sorry, just wanted to add I took the code for the table template from: https://wpgeodirectory.com/support/topic/customizing-the-profile-tab-of-the-details-page/
    Thank you

    in reply to: Custom Field Number 0 different than Null #438439

    ian bran
    Expired Member
    Post count: 122
    This reply has been marked as private.
    in reply to: Custom Field Number 0 different than Null #438363

    ian bran
    Expired Member
    Post count: 122
    This reply has been marked as private.
    in reply to: Custom Field Number 0 different than Null #438362

    ian bran
    Expired Member
    Post count: 122

    forgot to set private

    in reply to: Show Listing Website/Link /URL #438361

    ian bran
    Expired Member
    Post count: 122

    Hi Kor,

    thank you for your reply. It’s great to know about the “url | link text displayed”

    The anchor at the top part (screenshot) is not modified by this though 🙁

    But no worries, probably is for the best.

    * I wanted to show some text because if they don’t provide a phone (which is shown) the top part it looks empty
    ** for events I don’t think phone is very used

    Thank you

    in reply to: Custom Field Number 0 different than Null #438336

    ian bran
    Expired Member
    Post count: 122

    Hello Alex, I got it! just need add the equal >=
    in custom_fields_output_functions.php

    
    
    geodir_cf_multiselect {
    ...
    
     if (count($option_values) >= 1) {
                    $html .= '<ul>';
    ...

    I’ve copied the file and pasted it under supreme-directory/geodirectory (also tried supreme-directory/geodirectory/geodirectory-functions) and it’s preferring to grab the original template. Seems like only geodirecotry-templates can be replaced in this way.

    My attempt of a filter doesn’t work, maybe this is wrong:

    add_filter( 'geodir_custom_field_output_multiselect_var_geodir_cf_multiselect', '_gd_custom_multiselect_output', 10, 3 );

    whole filter:

    
    
    function _gd_custom_multiselect_output( $html, $location, $cf ) {
    	// If not html then we run the standard output.
        if(empty($html)){
    
            if (!empty($post->{$cf['htmlvar_name']})):
    
                if (is_array($post->{$cf['htmlvar_name']})) {
                    $post->{$cf['htmlvar_name']} = implode(', ', $post->{$cf['htmlvar_name']});
                }
    
                $field_icon = geodir_field_icon_proccess($cf);
                if (strpos($field_icon, 'http') !== false) {
                    $field_icon_af = '';
                } elseif ($field_icon == '') {
                    $field_icon_af = '';
                } else {
                    $field_icon_af = $field_icon;
                    $field_icon = '';
                }
    
                $field_values = explode(',', trim($post->{$cf['htmlvar_name']}, ","));
    
                if(is_array($field_values)){
                    $field_values = array_map('trim', $field_values);
                }
    
                $option_values = array();
                if (!empty($cf['option_values'])) {
                    $cf_option_values = geodir_string_values_to_options(stripslashes_deep($cf['option_values']), true);
    
                    if (!empty($cf_option_values)) {
                        foreach ($cf_option_values as $cf_option_value) {
                            if (isset($cf_option_value['value']) && in_array($cf_option_value['value'], $field_values)) {
                                $option_values[] = $cf_option_value['label'];
                            }
                        }
                    }
                }
    
                $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-select" style="' . $field_icon . '">' . $field_icon_af;
                $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : '';
                $html .= '</span>';
    
            //Comentario - Cambio
                if (count($option_values) >= 1) {
                    $html .= '<ul>';
            //Fin        
                    foreach ($option_values as $val) {
                        $html .= '<li>' . $val . '</li>';
                    }
    
                    $html .= '</ul>';
                } else {
                    $html .= __($post->{$cf['htmlvar_name']}, 'geodirectory');
                }
    
                $html .= '</div>';
            endif;
    
        }
    
        return $html; }
    add_filter( 'geodir_custom_field_output_multiselect_var_geodir_cf_multiselect', '_gd_custom_multiselect_output', 10, 3 );
    in reply to: Custom Field Number 0 different than Null #438312

    ian bran
    Expired Member
    Post count: 122

    Hello Kiran, thank you so much for sharing that code.

    It works great in More Info Tab fields, but not for my table, I know this is too far for support…

    The template for the table is inserted from:

    
    
    add_action('geodir_after_description_on_listing_detail', 'gd_profile_custom_content');
    function gd_profile_custom_content() {
    	global $post;
        if ($post->post_type=='gd_place') {
            get_template_part( 'cyctemplates/pagperfil', 'detalles' );
        }	
    }

    and the Table data like this:

    <td ><?php echo geodir_get_post_meta( $post->ID, 'geodir_min_asistentes_banquete', true ); ?></td>

    perhaps I should add something in the table data, but can’t think of what.

    Thank you and if you leave this topic here is completely understood

    in reply to: Custom fields in More Tab different html if 1 or 2+ #438200

    ian bran
    Expired Member
    Post count: 122

    Thank you for receiving this well! I hope I was clear.

    I spent lot of time designing and coding and hit a wall there 🙁

    in reply to: Disable Automatic Update #438189

    ian bran
    Expired Member
    Post count: 122

    Thank you for the great answers guys, really appreciate it.
    Kind regards

    in reply to: Some Translations not working #438188

    ian bran
    Expired Member
    Post count: 122

    Thank you Alex.
    This can be closed.

    Have a great day.

    in reply to: Custom Field Number 0 different than Null #438158

    ian bran
    Expired Member
    Post count: 122
    This reply has been marked as private.
    in reply to: Some Translations not working #438156

    ian bran
    Expired Member
    Post count: 122

    Hi Alex, yes it’s translated in location manager too…as I said, the string translates and after switching locations (clicking Country or Region or City) it looses the translation. Also “Select”.

    On the other hand, can you confirm if the above info is about one of your team was connecting to my site’s ftp? It says Manchester.

    Thank you

    in reply to: Some Translations not working #438042

    ian bran
    Expired Member
    Post count: 122

    Hello,
    are your trying to access ftp from Manchester?

    please see screenshot and tell me if its you!
    I’m not server expert so I’m afraid

    thanks!

    in reply to: Some Translations not working #438035

    ian bran
    Expired Member
    Post count: 122

    Thank you Alex,
    1) thanks, it was there!
    3) its also translated there, still not working…

    I’ve cleared cache and cookies, also checked DB and there’s nothing related to loco or other translation plugin.

    I think the problems relies in the GD LOCATION SWITCHER…also the “Select” string has this problem. I think it’s about the strings that gets reloaded when you click on Country, Region, or City…


    ian bran
    Expired Member
    Post count: 122

    Thank you Alex,

    That might work, I’ll take a shot at it.

    It would be an awesome feature for V2 to have the possibility to show non checked fields, please take a look at screenshot to understand my point that is valuable info for the user, especially when there are many options and your are comparing different listings.

    kind regards

Viewing 15 posts - 16 through 30 (of 93 total)