Knut23
Forum Replies Created
-
Thank you very much Brian! I have completely missed that! Will this affect/calculate old events as well? I can’t tell since I’ve already changed all events by hand. Could be good to know for someone else…
Also, don’t you want this to be automatically filled in when you have chosen, for example, soccer in the settings/general? Or maybe this is done on new installs? Mine has been installed since about this plugin hit the web. ?? Thanks again for the plugin!Same here. ??
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] shortcode event-listI agree, completely! Could really use it, like, right now! ??
@kgzv: Found your idea. You got my votes!
/Richard
Hello Brian!
Thanks for a swift reply!
/Richard
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Calendar for friendly games?Not sure if this has any implication on any statistics, but here goes: On the top of my head: Add new competition “Friendlies”. Add new calendar, show only competitions “Friendlies”. Keep the radiobutton on Competition. Create events with”Friendlies” selected on Competiton.
@kerwood1: I guess subigya is referring to the settings/permalinks in admin. Have a look here: https://www.wpexplorer.com/change-permalinks-wordpress/
Forum: Plugins
In reply to: [Media Library Assistant] How to get metadata from pdf's?Hi David!
Thanks!!! I have sent you an email with links to the pdf’s.
Regards,
RichardDrinkbaar, You are welcome!
I think you will be better off starting a new thread with your player list problem. Write a good description of your problem as subject. You will probably get more help than burying it in this thread. If you haven’t solved it by now, that is… ??/Richard
You can delete the row that reads
$show_maps = get_option( 'sportspress_event_show_maps', 'yes' ) == 'yes' ? true : false;
/Richard
Hi Drinkbaar!
Give this a try:
<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly $defaults = array( 'team' => null, 'id' => null, 'live' => get_option( 'sportspress_enable_live_countdowns', 'yes' ) == 'yes' ? true : false, ); if ( isset( $id ) ): $post = get_post( $id ); else: $args = array(); if ( isset( $team ) ) $args = array( array( 'key' => 'sp_team', 'value' => $team ) ); $post = sp_get_next_event( $args ); endif; extract( $defaults, EXTR_SKIP ); if ( ! isset( $post ) ) return; $id = $post->ID; $teams = get_post_meta( $id, 'sp_team' ); ?> <div class="upcoming-match-item-wrapper gdlr-item" style="margin-bottom: 0px;"> <div class="upcoming-match-overlay"></div> <div class="gdlr-upcoming-match-team-wrapper"> <span class="gdlr-upcoming-match-team gdlr-left"><?php echo get_the_title( $teams[0] ); ?></span> <span class="gdlr-upcoming-match-versus">VS</span> <span class="gdlr-upcoming-match-team gdlr-right"><?php echo get_the_title( $teams[1] ); ?></span> </div> <span class="match-result-info-wrapper"> <span class="upcoming-match-info-overlay"></span> <span class="match-result-info"> <i class="icon-location-arrow"></i> <?php /* Begin venue*/ if ( get_option( 'sportspress_event_show_venue', 'yes' ) === 'no' ) return; if ( ! isset( $id ) ) $id = get_the_ID(); $venues = get_the_terms( $id, 'sp_venue' ); if ( ! $venues ) return; $show_maps = get_option( 'sportspress_event_show_maps', 'yes' ) == 'yes' ? true : false; $link_venues = get_option( 'sportspress_link_venues', 'no' ) == 'yes' ? true : false; foreach( $venues as $venue ): $t_id = $venue->term_id; $meta = get_option( "taxonomy_$t_id" ); $name = $venue->name; if ( $link_venues ) $name = '<a href="' . get_term_link( $t_id, 'sp_venue' ) . '">' . $name . '</a>'; echo $name; /* Echoes venue name*/ ?> <?php endforeach; /* End venue*/ if ( isset( $show_league ) && $show_league ): $leagues = get_the_terms( $post->ID, 'sp_league' ); if ( $leagues ): foreach( $leagues as $league ): $term = get_term( $league->term_id, 'sp_league' ); echo $term->name; endforeach; endif; endif; ?> </span> <span class="match-result-info"> <i class="icon-calendar"></i><?php $now = new DateTime( current_time( 'mysql', 0 ) ); $date = new DateTime( $post->post_date ); $interval = date_diff( $now, $date ); $days = $interval->invert ? 0 : $interval->days; $h = $interval->invert ? 0 : $interval->h; $i = $interval->invert ? 0 : $interval->i; $s = $interval->invert ? 0 : $interval->s; ?><time datetime="<?php echo $post->post_date; ?>"<?php if ( $live ): ?> data-countdown="<?php echo str_replace( '-', '/', $post->post_date ); ?>"<?php endif; ?>><?php echo sprintf( '%02s', $days ); ?> <small><?php _e( 'days', 'sportspress' ); ?></small><?php echo sprintf( '%02s', $h ); ?> <small><?php _e( 'hrs', 'sportspress' ); ?></small><?php echo sprintf( '%02s', $i ); ?> <small><?php _e( 'mins', 'sportspress' ); ?></small><?php echo sprintf( '%02s', $s ); ?> <small><?php _e( 'secs', 'sportspress' ); ?></small></time></span> </span> </div>
Hope it works! I’ll leave the formatting to you. ??
Regards,
RichardThanks for chiming in!
You’re welcome, I try my best to give something back!
We recently added an API function to make it easier
:
If I just knew that before! ?? Since my php abilities are very undeveloped I spent maaany hours trying to get my solution to work! On the other hand I did learn quite a bit during my research. ?? So it was not all wasted.Do you perhaps have more “secret” functions you can share? Or a list of them on some page somewhere?
And then it struck me: They all live in sp-api-functions.php in the includes folder, don’t they!?
/Richard
Hi Symphasia!
I would like to begin with that I am far from good with php, so I leave no warranty on what I am about to give you here. But, it will print the score. ?? If someone out there (and I’m sure there is!) knows a better way to do it, please do!
$id = $post->ID; $teams = get_post_meta( $id, 'sp_team' );/*Array of teams data*/ $results = get_post_meta( $id, 'sp_results' );/*Array of result data*/ $home = $results['0'][$teams[0]]['goals'];/*Drills down in the array to get the value of goals for the home team*/ $away = $results['0'][$teams[1]]['goals'];/*Drills down in the array to get the value of goals for the away team*/ /* Show Score*/ print("<h3>".$home.' - '.$away. "</h3>"); /* End Show Score*/
Hi again ThemeBoy!
I only had the plugin “Admin in English with Switch” installed, so I deactivated that and voila. The live countdown is back! Sorry,should have tried that before! ??
It would be nice to be able to have both live countdown AND Admin in English installed at the same time. Could you point me in the right directions where to start looking for the conflict?
Link to Admin in English with switch here
Hi!
Sorry, I wont have access to the file until next Monday,june 16th. But I am pretty sure the headers are correct. From memory:Datum,siktdjup
date,number
6/5/2014,160
6/6/2014,150
aso…The column “siktdjup” (vertical axle) formats (1,60) just fine. But there is no option to change format for the horizontal axle.
Regards,
Richard