graham barnes

Forum Replies Created

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • in reply to: widget not linking to event #1092592
    graham barnes
    Participant

    Hi hunter,
    No your mis understanding I am referring to the mini calendar grid, I have tracked it down to this function: tribe_events_the_mini_calendar_day_link() in src/widgets/template-tags/widgets.php

    function tribe_events_the_mini_calendar_day_link() {
    	$day  = tribe_events_get_current_month_day();
    	$args = tribe_events_get_mini_calendar_args();
    
    	if ( $day['total_events'] > 0 ) {
    		// there are events on this day
    		if ( $args['count'] > 0 ) {
    			// there is an event list under the calendar
    			$html = '<a href="#" data-day="' . $day['date'] . '" class="tribe-mini-calendar-day-link">' . $day['daynum'] . '</a>';
    		} else {
    			// there are no events under the calendar
    			if ( tribe_events_is_view_enabled( 'day' ) ) {
    				// day view is enabled
    				ob_start();
    				tribe_the_day_link( $day['date'], $day['daynum'] );
    				$html = ob_get_clean();
    			} else {
    				// day view is disabled, just show that there are events on the day but don't link anywhere
    				$html = '<a href="javascript:void(0)">' . $day['daynum'] . '</a>';
    			}
    		}
    	} else {
    		$html = '<span class="tribe-mini-calendar-no-event">' . $day['daynum'] . '</span>';
    	}
    
    	echo apply_filters( 'tribe_events_the_mini_calendar_day_link', $html );
    }

    Note this bit: $html = ‘<a href=”#” data-day=”‘ . $day[‘date’] ‘#’ I want it to link to the actual event, so how can i modify the code to do this?

    For now I have just modified the code to be:

    function tribe_events_the_mini_calendar_day_link() {
    	$day  = tribe_events_get_current_month_day();
    	$args = tribe_events_get_mini_calendar_args();
    
    	if ( $day['total_events'] > 0 ) {
    		// there are events on this day
    		if ( $args['count'] > 0 ) {
    			// there is an event list under the calendar
    			ob_start();
    				tribe_the_day_link( $day['date'], $day['daynum'] );
    			$html = tribe_the_day_link();
    			//$html = '<a href="'.tribe_the_day_link().'" data-day="' . $day['date'] . '" class="tribe-mini-calendar-day-link">' . $day['daynum'] . '</a>';
    		} else {
    			// there are no events under the calendar
    			if ( tribe_events_is_view_enabled( 'day' ) ) {
    				// day view is enabled
    				ob_start();
    				tribe_the_day_link( $day['date'], $day['daynum'] );
    				$html = ob_get_clean();
    			} else {
    				// day view is disabled, just show that there are events on the day but don't link anywhere
    				$html = '<a href="javascript:void(0)">' . $day['daynum'] . '</a>';
    			}
    		}
    	} else {
    		$html = '<span class="tribe-mini-calendar-no-event">' . $day['daynum'] . '</span>';
    	}
    
    	echo apply_filters( 'tribe_events_the_mini_calendar_day_link', $html );
    }

    showing the link to that date using: tribe_the_day_link();

    • This reply was modified 10 years, 1 month ago by graham barnes. Reason: found a suitable solution for now
    in reply to: widget not linking to event #1092226
    graham barnes
    Participant

    Hi,
    Thanks for your reply, I don’t know if its a bug or not that is why I came here, I checked the console but no errors there, do you know what the template is that displays the grid and then I can look?

    in reply to: Events Location not showing in PHP shortcode #1059688
    graham barnes
    Participant

    Great that helped loads, thanks.

    in reply to: Events not showing and error #945176
    graham barnes
    Participant

    I managed to fix it, there was only 1 event which was in draft format, i have now published this and changed the view to show all the months events, and it all shows fine for me, I will show it to the client as this isn’t my website and she will know more about it than me, thank you for taking the time to look at it.

    I have updated to both versions now, when i first posted about the issue although it said 3.9.1, if i clicked on update at the top in the black bar it said it needed updating.

    Graham

    in reply to: Events not showing and error #945079
    graham barnes
    Participant

    This reply is private.

    in reply to: Events not showing and error #945078
    graham barnes
    Participant

    This reply is private.

    in reply to: Events not showing and error #944977
    graham barnes
    Participant

    I forgot to mention, even by deactivating all the other plugins, the events calendar still displays no events.

    in reply to: Events not showing and error #944973
    graham barnes
    Participant

    Hi George,
    I can only leave the website like that for the next 3 hours.

    No errors show as I have deactivated all the plugins except events calendar and events calendar pro, however when the other plugins are activated, the following errors show:

    Notice: Undefined variable: addr in /home/ispeakwi/public_html/wp-content/plugins/byrev-gallery-pagination-for-wordpress/byrev-gallery-pagination.php on line 262

    Notice: Use of undefined constant WPRBLVERSION – assumed ‘WPRBLVERSION’ in /home/ispeakwi/public_html/wp-content/plugins/wp-render-blogroll-links/WP-Render-Blogroll.php on line 19

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method IvyCatTestimonials::start() should not be called statically in /home/ispeakwi/public_html/wp-includes/plugin.php on line 496

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method IvyCatTestimonials::register_widgets() should not be called statically in /home/ispeakwi/public_html/wp-includes/plugin.php on line 496

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method IvyCatTestimonials::init() should not be called statically in /home/ispeakwi/public_html/wp-includes/plugin.php on line 496

    and lots more on the site.

    Graham

    in reply to: Events not showing and error #944732
    graham barnes
    Participant

    Hi George,
    Unfortunately I have tried those but still no events show on the frontend.

    thanks
    Graham

    in reply to: Events not showing and error #944718
    graham barnes
    Participant

    Hi George,
    In order of the questions you asked:

    1. The exact problems is no events are showing on the page, there are events in the system so I am unsure why they are showing, this is why I went and created a events page (ant it allowed me to create one with the same slug).
    2. The plugin versions are: The Events Calendar – 3.9.1, The Events Calendar Pro – 3.9.1
    3. Yes there are lots of events which can be seen from the admin, do you want access to it?

    Shall I delete the page I made – despite it having the same slug /events/

    Thanks
    Graham

    in reply to: Events not showing and error #944576
    graham barnes
    Participant

    I just saw when I went to the updates the plugin was out of date so managed to update it despite before it was saying it was up-to-date, that has since resolved the errors on the events page in the admin and the message:

    The following plugins are out of date: Events Calendar PRO 3.0.5. All add-ons contain dependencies on The Events Calendar and will not function properly unless paired with the right version. Learn More.

    No longer shows 🙂 my main issue is the events are not showing in the calendar on the events page and also it says page not found despite me making a events page: http://www.italkwithspirits.com/events/

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