Another detail sidebar question! Events date and time

This topic contains 11 replies, has 4 voices, and was last updated by  m forbes 7 years ago.

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

Open Support Ticket
  • Author
    Posts
  • #365004

    m forbes
    Full Member
    Post count: 338

    Hi, I added this snippet to functions:

    add_filter(‘geodir_detail_page_sidebar_content’, ‘geodir_detail_page_sidebar_content_order_myfix’,10,1);

    function geodir_detail_page_sidebar_content_order_myfix($sort){
    $elements_to_remove = array(‘geodir_detail_page_more_info’);
    $sort = array_diff($sort,$elements_to_remove);
    array_unshift($sort, “geodir_detail_page_more_info”);
    return $sort;
    }

    And it works well, EXCEPT the EVENTS date and time are at the bottom of sidebar info, whereas the “business listings” times are under the address.

    How do I go about getting the date and time of the event to show below the address? Or even in their own tab.

    I tried this snippet, found in forum:

    add_filter( ‘template_include’, ‘custom_geodir_event_template_loader’,0);
    function custom_geodir_event_template_loader($template) {

    if(geodir_get_current_posttype() == ‘gd_event’){
    remove_filter(‘geodir_detail_page_sidebar_content’, ‘geodir_event_detail_page_sitebar_content’, 2);
    add_action(‘geodir_before_show_post’, ‘geodir_event_show_shedule_date’);
    }
    }

    It removes it from the sidebar but does not add it anywhere on page, tab or otherwise.

    If I specify a location for the time field under GeoDirectory/Events/manage event custom fields, the “time” shows this: Time: 0. Either in the sidebar or in a tab.

    I have spent a couple of hours looking through the forum and have been unsuccessful finding a solution.

    Thanks!

    #365394

    m forbes
    Full Member
    Post count: 338

    Hi, is there some reason that this has not been answered? Thanks!

    #365445

    Kor
    Moderator
    Post count: 16516

    Hi Forbes,

    I’ve already notified a developer regarding this and he will look into this as soon as possible.

    Thanks!

    #365558

    Giri
    Expired Member
    Post count: 3155

    Hi there,

    Can you give me the site link and admin credentials to check?

    Thanks

    #365688

    m forbes
    Full Member
    Post count: 338
    This reply has been marked as private.
    #365923

    Giri
    Expired Member
    Post count: 3155

    Hi I don’t understand what is your problem.

    I see the calendar at the footer.

    https://www.dropbox.com/s/ckpb585709idlbd/Screenshot%202017-03-07%2020.12.16.png?dl=0

    I don’t see any event date in sidebar. can you link me to that page or show me screenshot?

    Not to distract from topic, but is there a way to hide tabs on detail if there is no info for one? I have not searched for this yet, but since I have you :).

    I guess that how it works. if the content is empty that tab won’t get displayed. let me know where you see this empty tabs.

    Thanks

    #365963

    m forbes
    Full Member
    Post count: 338

    Hi Giri,

    Nothing to do with calendar in footer, but I just removed it to help make things clearer…

    Attached: See in the event detail that the date and time of event is at the bottom of the sidebar, but the operating times for a listing are under the address in the sidebar.

    The “time” (drawing from the default field in events settings) in the event sidebar shows 0, and is under the address, but this is not the event date and time.

    I added the script in above post, to re-position the sidebar elements, but would like the event(s) date and time to be under the address, not at the bottom of the sidebar.

    Make sense??
    And thanks.

    PS You are correct, it does look like the tabs do not show if not populated, except the review one… sorry, my bad.

    #365986

    Giri
    Expired Member
    Post count: 3155

    Hi forbes, Event date is different from normal listings time field.

    Thats why you are having issues.

    Kiran is the one who has much knowledge about event addon. I’ll ask him tomorrow whether we can move the date to its own tab. If thats not possible, then i’ll help you with moving the event date to your preferred position.

    Thanks for your patience.

    #366064

    Kiran
    Moderator
    Post count: 7069

    Hi Forbes,

    The link https://YOURSITE.COM/listing/web-tech-printing/waimea-instant-printing/ giving error “IIS 7.5 Detailed Error – 404.0 – Not Found” even added ip & name to hosts file.

    Use this snippet code to display the event schedule as a tab on detail page. https://gist.github.com/kprajapatii/02be2d46a6b1b1740d511f7dedb778d6

    Let us know.

    Thanks,
    Kiran

    #366187

    m forbes
    Full Member
    Post count: 338

    Hi, Thank you, the snippet works well!

    Curious now though, how can I remove the calendar icon and the word date above the dates/times? Not a huge deal but kind of redundant now.

    Regarding the url giving error, there is no https:// 🙂 it’s http://.

    Thanks again, very much appreciated!

    #366273

    Kiran
    Moderator
    Post count: 7069

    Hi,

    You can hide calendar icon & date text via css. Add following style snippet in one of your .css file.

    
    
    
    #event_scheduleTab .geodir-company_info {
        overflow: hidden;
        position: relative;
    }
    #event_scheduleTab .geodir-company_info > .geodir-event-dates {
        display: block;
        margin-top: -2em;
    }
    #event_scheduleTab .geodir-company_info .fa-calendar {
        display: none;
    }
    

    Kiran

    #366485

    m forbes
    Full Member
    Post count: 338

    thank you so much! super cool :)!

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

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

Open Support Ticket