• Hi!

    Before I begin, I would like to request the modification asked by @gusc a while ago for SSL compatibility. Otherwise, this won’t work on my site when it’s live, and this Support Topic won’t be worth answering.

    Once the SSL issue is working, I’d also like to know if it’s possible to use “now” as a value for last_dtg in the Schedule Table shortcodes. It seems like using first_dtg=”now” works fine, showing upcoming games only, and last_dtg=”2017-01-01″ only shows games up to Jan 1, 2017, but I would like a table with the schedule of Upcoming games and a separate table with scores from recent games. Is this possible?

    Thank you! Once I learn PHP a little better, I might want to contribute.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mark O’Donnell

    (@markodonnell)

    Hi Peter,
    I know previous you could set last_dtg to now. I have to dig in and see how it works. This man page for League Manager might help.
    https://shoalsummitsolutions.com/lm-shortcodes/
    The S&S man pages need updating. ??

    As far as SSL, I could not find the post you referenced, but anyway, you are going to have to help me here. I don’t understand the plugin’s role in how your site communicates with the rest of the world. I hope I am staying out of that. But if you let me know what I’m doing wrong, I will try to fix it.

    -Mark

    Thread Starter Peter Arthur

    (@peterdarthur)

    Thanks for the reply, Mark.

    I tried setting last_dtg to “now” in a Schedules and Scoreboards table shortcode, but it resulted in a “break the page completely and don’t display anything” issue. The current page editor in WP dashboard also broke (white page) after setting last_dtg=now in the shortcode (thankfully I was able to log in again and deactivate the plugin, so I could return and remove =now before re-activating the plugin. Are you able to replicate the issue?

    As for SSL, here’s a link to the request by @gusc: https://www.ads-software.com/support/topic/mstw-doesnt-support-ssl/

    I can’t verify if this is true or not, since my website will not be SSL until this athletics portion is ready to go, but according to him, the fix would be a simple find-replace of all https:// -> // . I’m not sure what the correct syntax would be in the plugin, but as long as http requests are replaced with root-relative ones, it should work fine.

    The issue is that a site configured for https must only contain and operate with links that are also either https or root-relative. A resource loaded from an http link on an https site won’t work. Images, files, stylesheets, db queries, etc.

    I’m a front-end guy with zero plugin experience (yet), so I don’t know PHP/MySQL enough to pinpoint a plan of action. Thanks for such a great plugin!

    Plugin Author Mark O’Donnell

    (@markodonnell)

    Hey Peter,
    1. last_dtg = now. You have found a bug. Thanks. Don’t know if you looked in your debug.log file, but this is undoubtedly a PHP error. That should never happen. Unfortunately, I am in the middle of an inter-state move, so I won’t get back to it for at least a couple of weeks.

    2. SSL. Ah, yes. We received guidance on this from the WordPress plugin gurus a while back. Makes complete sense now. Not a hard fix, I’ve just been lazy. I’d rather add cool new features to League Manager for paying customers than do maintenance. Thanks for reminding me.

    Regards,
    Mark

    Thread Starter Peter Arthur

    (@peterdarthur)

    Mark,

    I totally understand – I’m still unpacking after a cross-country move in early August (AL to CA). I searched around in the plugin files and found where dtg_first and dtg_last are converted from “now” to timestamps: mstw-schedules-scoreboards/includes/mstw-ss-schedule-table.php, starting on line 98.

    I noticed that dtg_first is evaluated like this:

    if ( $atts['first_dtg'] == 'now' ) {
    	$first_dtg = current_time( 'timestamp' );
    }

    and dtg_last is missing the ‘timestamp’ string (on line 109), so I added it in the corresponding place, and now dtg_last="now" works (but only if dtg_first is also set, to a time in the past). This will work for me, but if you don’t mind checking this for yourself and including this in any updates, then I won’t have to worry about any future version issues. Thanks!

    Plugin Author Mark O’Donnell

    (@markodonnell)

    Hi Peter,
    Regarding the SSL fix. You might take a look at this post. You might be able to fix it in your theme for all your plugins. I will be implementing “relative protocols” in upcoming releases of all plugins. Thanks for pointing this out.

    -Mark

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘last_dtg=”now” (please?)’ is closed to new replies.