BBPress Roland Stumpp : Replies Created

Forum Replies Created

Viewing 6 posts - 11 through 16 (of 16 total)
  • Author
    Posts
  • in reply to: function “Find the closest locations" #486580
    Roland Stumpp
    Participant

    Hi Steven,
    this is our snippet for the im- and export from our custom fields.
    the first one for the export and the second for the import.
    The field herden_name is a text field.
    The fields genussfleisch,biologisch and herdbuch_zuechter is a checkbox. The last one rinder_farbe is a checkboxgroup. Are the snippets ok?

    Regards
    Roland

    add_filter( 'cn_csv_export_fields', 'cn_register_text_field_header' );
    

    add_filter( ‘cn_csv_export_fields_config’, ‘cn_register_text_field_config’ );

    function cn_register_text_field_header( $fields ) {

    $fields['herden_name'] = 'Herdenname';
    $fields['genussfleisch'] = 'Genussfleischpartner';
    $fields['biologisch'] = 'Biobetrieb';
    $fields['herdbuch_zuechter'] = 'Herdbuchzucht';
    $fields['rinder_farbe'] = 'Farbschlag';
    
    return $fields;
    

    }

    function cn_register_text_field_config( $fields ) {

    $fields[] = array(
        'field'  => 'herden_name', 
        'type'   => 5,
        'fields' => '',
        'table'  => CN_ENTRY_TABLE_META,
        'types'  => NULL,
    );
    $fields[] = array(
        'field'  => 'genussfleisch', 
        'type'   => 5,
        'fields' => '',
        'table'  => CN_ENTRY_TABLE_META,
        'types'  => NULL,
    );
    $fields[] = array(
        'field'  => 'biologisch', 
        'type'   => 5,
        'fields' => '',
        'table'  => CN_ENTRY_TABLE_META,
        'types'  => NULL,
    );
    $fields[] = array(
        'field'  => 'herdbuch_zuechter', 
        'type'   => 5,
        'fields' => '',
        'table'  => CN_ENTRY_TABLE_META,
        'types'  => NULL,
    );
    $fields[] = array(
        'field'  => 'rinder_farbe', 
        'type'   => 5,
        'fields' => '',
        'table'  => CN_ENTRY_TABLE_META,
        'types'  => NULL,
    );
    
    return $fields;
    

    }

    add_filter( ‘cncsv_map_import_fields’, ‘cncsv_header_name’ );
    add_action( ‘cncsv_import_fields’, ‘cncsv_process_import’, 10, 3 );

    function cncsv_header_name( $fields ) {

    $fields['herden_name'] = 'Herdenname';
    $fields['genussfleisch'] = 'Genussfleischpartner';
    $fields['biologisch'] = 'Biobetrieb';
    $fields['herdbuch_zuechter'] = 'Herdbuchzucht';
    $fields['rinder_farbe'] = 'Farbschlag';
    
    return $fields;
    

    }

    function cncsv_process_import( $id, $row, $entry ) {

    $data = $entry->arrayPull( $row, 'herden_name', '' );
        $data = cnFormatting::maybeJSONdecode( stripslashes( $data ) );
        $data = $entry->arrayPull( $row, 'genussfleisch', '' );
        $data = cnFormatting::maybeJSONdecode( stripslashes( $data ) );
        $data = $entry->arrayPull( $row, 'biologisch', '' );
        $data = cnFormatting::maybeJSONdecode( stripslashes( $data ) );
        $data = $entry->arrayPull( $row, 'herdbuch_zuechter', '' );
        $data = cnFormatting::maybeJSONdecode( stripslashes( $data ) );
        $data = $entry->arrayPull( $row, 'rinder_farbe', '' );
        $data = cnFormatting::maybeJSONdecode( stripslashes( $data ) ); 
    
    cnEntry_Action::meta(
        'update',
        $id,
        array(
            array(
                'key'   => 'herden_name', 
                'value' => $data
            ),
        )
    );
    cnEntry_Action::meta(
        'update',
        $id,
        array(
            array(
                'key'   => 'genussfleisch', 
                'value' => $data
            ),
        )
    );
    cnEntry_Action::meta(
        'update',
        $id,
        array(
            array(
                'key'   => 'biologisch', 
                'value' => $data
            ),
        )
    );
    cnEntry_Action::meta(
        'update',
        $id,
        array(
            array(
                'key'   => 'herdbuch_zuechter', 
                'value' => $data
            ),
        )
    );
    cnEntry_Action::meta(
        'update',
        $id,
        array(
            array(
                'key'   => 'rinder_farbe', 
                'value' => $data
            ),
        )
    );
    

    }

    in reply to: Custom Fields in Cmap and rows #486443
    Roland Stumpp
    Participant

    Hi Steven,
    the template overrides are in the card.php in the plugin connections-tile-plus.
    After every update my changes are gone!

    Regards
    Roland

    in reply to: function “Find the closest locations" #486421
    Roland Stumpp
    Participant

    Hi Steven,

    it is possible to import and export a custom field. We include this for a custom field:

    But what we have to include in the import and export a custom checkbox and a custom checkbox group too?

    Do you have the code snippet for us please

    Regards

    Roland

    in reply to: Custom Fields in Cmap and rows #486348
    Roland Stumpp
    Participant

    Hi Steven,
    and by the way… we are using connections-tile-plus
    our override is in the card.php from the plugin.
    Is it possible to have the card.php in the child area?
    Regards
    Roland

    in reply to: Custom Fields in Cmap and rows #486347
    Roland Stumpp
    Participant

    Hi,
    meanwhile we have all the custom fields and boxes inside. Your documentation is very good!
    But one question is still open. Inside connections is the the class.geo.php. We would like to use the function “Find the closest locations”
    Are we have to buy a additional plugin?
    How is the way to use it?

    Regards
    Roland

    in reply to: Custom Fields in Cmap and rows #485035
    Roland Stumpp
    Participant

    Hi Steven,
    and which theme is the best to be used in a columnar format?
    We have to display 650 members.
    And it is not important to show a google map.
    For us it is important to have categories and to find the member for example within a radius of 100 kilometers of a location or postcode.

    Do you have a solution for this?

    Regards
    Roland

Viewing 6 posts - 11 through 16 (of 16 total)