Forum Replies Created
-
AuthorPosts
-
July 30, 2013 at 8:15 am in reply to: CSS to color tribe-events-button works on one page but not on another #57759snortonParticipant
By the way, did you know there are two comment boxes on your event details page? I noticed that when I visited your link earlier. 🙂
July 30, 2013 at 8:02 am in reply to: CSS to color tribe-events-button works on one page but not on another #57757snortonParticipantI agree with you, the Tribe classes are supposed to be overridden, but the styles that are applied on the second are more specific than your code.
For your css, try below (adds .single-tribe_events class selector for your declaration. A higher level of specificity overrides more general selectors. You can add !important to your property value to see your style applied regardless of specificity, but it is often times bad practice to leave important in your css. So tribe-events.css WILL override the other tribe styles that have equal or lesser specificity):
/* ~~~~~~~~ Added color focus, visited, and hover actions to ical button ~~~~~~~~ */
a.tribe-events-ical, a.tribe-events-gcal, .single-tribe_events a.tribe-events-ical, .single-tribe_events a.tribe-events-gcal {
color: #fff;
background-color: #5f9ea0; // green
}.tribe-events-calendar td.tribe-events-present div[id*=”tribe-events-daynum-“], .tribe-events-calendar td.tribe-events-present div[id*=”tribe-events-daynum-“] > a, #tribe_events_filters_wrapper input[type=”submit”], .tribe-events-button, .tribe-events-button.tribe-inactive, .tribe-events-button:hover, .tribe-events-button.tribe-active:hover, .single-tribe_events .tribe-events-calendar td.tribe-events-present div[id*=”tribe-events-daynum-“], .single-tribe_events .tribe-events-calendar td.tribe-events-present div[id*=”tribe-events-daynum-“] > a, #tribe_events_filters_wrapper input[type=”submit”], .single-tribe_events .tribe-events-button, .single-tribe_events .tribe-events-button.tribe-inactive, .single-tribe_events .tribe-events-button:hover, .single-tribe_events .tribe-events-button.tribe-active:hover {
color: #fff;
/* background-color: #21759b; // turquoise blue */
background-color: #005ea1; // blue
}July 30, 2013 at 7:03 am in reply to: CSS to color tribe-events-button works on one page but not on another #57742snortonParticipantThis is due to specificity. Look at your body classes on either page and see that on the actual event description page you have tribe classes on the body. So, the way that ECP applies styles will override yours because it is more specific. You will want to rewrite your CSS to target the tribe-events-ical and tribe-events-gcal classes more specifically.
snortonParticipantCould you utilize jQuery to disable those links? This targets the organizer link on a single event’s page, but can be probably be expanded further. You can add this code to a script tag in the Advanced Template Settings ‘Before HTML’ text editor for Events Calendar (found on the Display tab from Events Calendar Settings)
jQuery(“.fn.org”).click(function(e) {
e.preventDefault();
});snortonParticipantI’m not able to reproduce this 404 you’re getting. These forums have a tendency to screw up posted code, can you use pastebin or similar to paste the content of your single-event.php file?
snortonParticipantSorry for jumping in here without offering help, but I noticed Tribal Seeds and thought of Josh Heinrichs playing with them — that dude has some talent! /end aside
July 25, 2013 at 8:13 am in reply to: tribe_get_start_date() not working (or it was working in v2 and it’s not in v3) #57084snortonParticipantChange this line:
echo mysql2date(‘D, d M Y H:i:s -0004’, tribe_get_start_date($post->ID, true, ‘Y-m-d H:i:s -0004’), false);
to:
echo tribe_get_start_date($post->ID, false, ‘Y-m-d H:i:s -0004’);snortonParticipantWhat version of ECP are you running? In the latest version, you’ll actually want to modify the single-day.php file found in views/month/single-event.php, by making a copy to wp-content/[your theme]/tribe-events/month/single-event.php
Depending on how you want to display the picture, you’ll want to modify this a bit, but you should add this code after line 27 of single-event.php (which is after the title of each event on the month view):
snortonParticipantchange the boolean to false (which will display just the date without not the time) and just echo the time format (http://php.net/manual/en/function.date.php) you’d prefer. If you just want the start time/finish time for an event in the 6:30 PM – 8:30 PM format, use:
echo tribe_get_start_date($post, false, $format = ‘g:i A’ ) . ‘—’ . tribe_get_end_date($post, false, $format = ‘g:i A’);
or if you want the Event Date with start and end time (5 DEC 6:30 PM – 8:30 PM) then:
echo tribe_get_start_date($post, false, $format = ‘d M g:i A’) . ‘—’ . tribe_get_end_date($post, false, $format = ‘g:i A’);snortonParticipant@gracebiblechurch, you will need to create a copy of wp-content/plugins/the-events-calendar/views/widgets/single-event.php in a wp-content/(your theme)/tribe-events/widgets/ directory so that you can customize the view without modifying the original files.
So you want to check if there’s a featured image and display it, otherwise display a generic image as a placeholder. The Events Calendar has a template tag for calling a featured image (with html and link to the event if used within the loop) if there is one.
This tag is:
tribe_event_featured_image()
you can use ‘thumbnail’ as a parameter here for the $size string: tribe_event_featured_image(null,’thumbnail’);
So, what we want now is to check if that featured image is there and display it or otherwise display a generic image (this all goes within your list-widget.php file wherever you’re wanting this displayed:
http://pastebin.com/vwefeucJKeep in mind, there are no classes assigned to the div or img tags, so you may want to consider adding that if desired for ease in styling. Hope this helps. I’m learning php, so there may be a more efficient implementation but this works for me.
snortonParticipantNo problem. I know the people that work these forums are swamped right now, and this is something I have worked on that I know worked for me.
For future reference, I have found http://docs.tri.be/ to be a tremendous asset for the free version and the pro version of the Events Calendar Plugin…. especially when I can’t get a response as quick as I’d like.snortonParticipantThe basic premise of this is to use WP’s template tag to display an arbitrary widget.
Here’s the syntax for the php:
the_widget($widget, $instance, $args);The Events List widget is called TribeEventsListWidget, so you would do something basically like this:
the_widget(‘TribeEventsListWidget’);
You can throw some $args in there to adjust the display of your widget if you’re trying to add it to a template or by some other means, but this will basically get you what you need.snortonParticipantsuh-weet. Thank you, Jonah. That works for me.
snortonParticipantAh, sorry, cannot edit the above post. The jQuery example above turns into this:
jQuery(& #039;body& #039;) <– obviously without the space between the ampersand and the pound symbol.
snortonParticipantYes, my jQuery is wrapped in a script tag. Executing the script is not the issue though. After saving changes in the Display settings the single quotation marks in the WYSIWYG editor get translated/encoded as html entities.
For example:
jQuery(‘body’) turns into this: jQuery('body') -
AuthorPosts