Append "Favorites" into list

This topic contains 26 replies, has 2 voices, and was last updated by  Michele 7 years, 7 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #367528

    Michele
    Expired Member
    Post count: 54

    I have created a new tab called “Attendees” within my Geodirectory events. I am currently using “WTI Like Post Pro” which is a simple “Like” button, to allow users to add themselves as “Going” to an event. Although this appears to work, I’d much rather utilize the Geodirectory “Favorite” button since this ties to the users buddypress profile.

    How would I modify the “Favorite” button so it will retrieve the users “Nice_name” and Avatar and append them in a list under the event’s tab? Even if you could just point me to where the “Favorite” button code lives that would be a big help.

    Thank you! You guys have been really great!
    Michele

    Here is my current code:
    add_filter(‘geodir_detail_page_tab_list_extend’, ‘geodir_detail_page_tab_list_extend’);

    function geodir_detail_page_tab_list_extend($tab_array) {
    if ( ‘gd_event’ == get_post_type() )
    $tab_array[‘my_new_tab’] = array(
    ‘heading_text’ => __(‘Attendees’,GEODIRECTORY_TEXTDOMAIN),
    ‘is_active_tab’ => false,
    ‘is_display’ => apply_filters(‘geodir_detail_page_tab_is_display’, true,’my_new_tab’),
    ‘tab_content’ => ”);
    return $tab_array ; }

    add_action(‘geodir_after_tab_content’ ,’geodir_my_new_tab_content’);
    function geodir_my_new_tab_content($tab_index)
    {
    if($tab_index ==’my_new_tab’)
    {GetWtiLikePost();}
    }

    #367650

    Giri
    Expired Member
    Post count: 3155

    I think you are looking for a RSVP feature.

    See “Are You Interested?” widget here.

    https://wpgeodirectory.com/docs/whoop-theme-available-widgets/#ayi-widget

    If yes, then we moved it to a new addon. So it supports all themes now.

    Let me know if thats what you are looking for.

    Thanks

    #367767

    Michele
    Expired Member
    Post count: 54

    Yes that is exactly what I am looking for!!!! How do I go about getting the new addon???

    Michele

    #367769

    Giri
    Expired Member
    Post count: 3155
    This reply has been marked as private.
    #367773

    Michele
    Expired Member
    Post count: 54

    Works beautifully! Thank you so much! This is a God Send!

    Michele

    #367774

    Giri
    Expired Member
    Post count: 3155

    You are welcome 🙂

    #367785

    Michele
    Expired Member
    Post count: 54

    Quick Question…
    If I wanted to still add the list of “I’m in” attendees to my attendees tab on the details page, what piece of code would I extract from the widget to have the list appear in the tab area as well.

    I tried this code but nothing happened…
    add_filter(‘geodir_detail_page_tab_list_extend’, ‘geodir_detail_page_tab_list_extend’);

    function geodir_detail_page_tab_list_extend($tab_array) {
    if ( ‘gd_event’ == get_post_type() )
    $tab_array[‘my_new_tab’] = array(
    ‘heading_text’ => __(‘Attendees’,GEODIRECTORY_TEXTDOMAIN),
    ‘is_active_tab’ => false,
    ‘is_display’ => apply_filters(‘geodir_detail_page_tab_is_display’, true,’my_new_tab’),
    ‘tab_content’ => ”);
    return $tab_array ; }

    add_action(‘geodir_after_tab_content’ ,’geodir_my_new_tab_content’);
    function geodir_my_new_tab_content($tab_index)
    {
    if($tab_index ==’my_new_tab’)
    {geodir_ayi_rsvp_users_for_a_post($post->ID, “event_rsvp_yes”, $no_of_users, $gde);}

    #367788

    Giri
    Expired Member
    Post count: 3155

    Use the shortcode

    [ayi]
    #367789

    Giri
    Expired Member
    Post count: 3155

    In your case it should be

    
    
    
    if ($tab_index ==’my_new_tab’) {
        echo do_shortcode('[ayi]');
    }
    #367792

    Michele
    Expired Member
    Post count: 54

    hmmm…nope crashed the site…

    #367794

    Michele
    Expired Member
    Post count: 54

    Nevermind..Got it! THANK YOU!!! 🙂

    #367795

    Giri
    Expired Member
    Post count: 3155

    Thats because the quote converted I guess in my last snippet. Use correct quotes for my_new_tab

    #367796

    Giri
    Expired Member
    Post count: 3155

    You are welcome.

    #367805

    Michele
    Expired Member
    Post count: 54

    Just one more thing for you guys to note perhaps for the development of the addon..

    I noticed that “Events” tab in the users’ buddypress profile is not syncing to the RSVP the user made when they click “I’m in”.

    In other words, when you go to a user’s profile, click events, the attending tab just says “Sorry, No events just yet.” Even though they rsvp for an event.

    See Image Attached…

    #367808

    Giri
    Expired Member
    Post count: 3155

    It must be a bug. I’ll fix that tomorrow.

    Thanks for reporting

Viewing 15 posts - 1 through 15 (of 27 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