Disable Select Map View

This topic contains 7 replies, has 3 voices, and was last updated by  Paolo 10 years, 5 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #6126

    PSI
    Free User
    Post count: 68

    Hi,

    Is it possible to disable this selection in reg. process via functions.php?

    Thanks for your help.

    #6173

    Paolo
    Site Admin
    Post count: 31206

    Not it isn’t, the only way to hide it would be to move the add-listing.php template within your child theme and comment it out.

    Thx

    #6433

    PSI
    Free User
    Post count: 68

    Hi,

    I just want to deactivate Map View option cant find it in the file you mentioned.

    Thx for your help in advance

    PSI

    #6524

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    within that template, there is this action:

    
    
    
    do_action( 'geodir_add_listing_form');
    
    

    That is the part calling the form.

    Now go to geodirectory/geodirectory_template_actions.php

    and search : geodir_add_listing_form

    You will find this

    
    
    
    
    add_action( 'geodir_add_listing_form', 'geodir_action_add_listing_form',10);
    
    function geodir_action_add_listing_form(){
    // code of the function
    }
    
    

    The 1st line creates the action the 2nd line is the function called by the action.

    In your theme functions.php you can add this:

    
    
    
    // 1st you need to remove the default form with this
    remove_action( 'geodir_add_listing_form', 'geodir_action_add_listing_form',10);
    
    // 2nd add a new form changing the name of the function 
    add_action( 'geodir_add_listing_form', 'geodir_action_add_listing_form_custom',10);
    
    //3rd change you function as needed
    function geodir_action_add_listing_form_custom(){
    // copy the original function and modify it as you wish
    }
    
    

    Hope this helps… 🙂

    #6569

    purpleedge
    Expired Member
    Post count: 539

    Thanks Paolo, very useful.

    #6788

    PSI
    Free User
    Post count: 68

    Hi Paolo,

    Thanks for this… I am still looking for deactivating select map view :/ I am sorry but I cant find it… any hints?

    Thanks
    PSI

    #6789

    PSI
    Free User
    Post count: 68

    seems to be packed in this:

    <?php

    $package_info = array() ;

    $package_info = geodir_post_package_info($package_info , $post);

    geodir_get_custom_fields_html($package_info->pid,’all’,$listing_type);?>

    #6855

    Paolo
    Site Admin
    Post count: 31206

    Best way to proceed would have been to search in all file inside folder directory (dreamweaver has this option and many other editor do…) the function:

    geodir_get_custom_fields_html

    which is is custom_fields_functions.php

    It is not going to be easy to disable the selection and set antherone as default.

    I’m not 100% sure I would be able to do it… this is as far as I can help with this.

    Thx

Viewing 8 posts - 1 through 8 (of 8 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount