anotheruserhere
Forum Replies Created
-
Forum: Plugins
In reply to: [Use Client's Time Zone] Displaying times according to user TZHere is the code for my shortcode
‘/**
- The [date] shortcode.
* - Accepts a date and displays it with the current TZ
* - @param array $atts Shortcode attributes. Default empty.
- @param string $content Shortcode content. Default null.
- @param string $tag Shortcode tag (name). Default empty.
- @return string Shortcode output.
*/
function date_shortcode( $atts = [], $content = null, $tag = ” ) {
// override default attributes with user attributes
$atts = shortcode_atts(
array(
‘date’ => date(“h:i A d F Y”),
), $atts, $tag
);$date=$atts['date']; $o = '<span class="event-date">'.date("g:i A, j M Y (e)", strtotime("$date")).'</span>'; // $o= $o . "<br>Input date: $date"; return $o;}
add_shortcode( ‘date’, ‘date_shortcode’ );’
And the test page (implemented at https://encounterevents.uk/test-page/) is
‘This event is at “11:00 AM 1/6/23 CST” or [date date=”11:00 AM 1/6/23 CST” ]’
I looked at the code and I can’t see why it’s not working as expected. I am wondering if the JS function you call isn’t working. I took a look at that, too, but it’s way beyond me. Or, of course, it could be (and perhaps more probably is) a bug in my code that I can’t see.
Any help you can offer would be greatly appreciated. Thanks
- This reply was modified 2 years, 10 months ago by anotheruserhere.
- This reply was modified 2 years, 10 months ago by anotheruserhere.
Forum: Plugins
In reply to: [Use Client's Time Zone] Displaying times according to user TZI’m going to be away for the next two weeks and the code looks beyond my knowledge so if you can take a look I’d appreciate it. Once I’m back I can help debug as it seems to work for me in Arc Browser (displaying ‘Europe/London’ as my TZ) but not in Safari (displaying ‘GMT’, the server TZ).
Forum: Plugins
In reply to: [Use Client's Time Zone] Displaying times according to user TZThat’s very odd as it’s not picking up your TZ. Is there any way I can debug it or see what is happening?
Forum: Plugins
In reply to: [Use Client's Time Zone] Displaying times according to user TZHi,
Thanks for your prompt response.
I think I have found a solution using a short code to take a date string (with a specified TZ) and redisplay it using the current TZ (using your plugin to set the client TZ).
However, I got someone in Chicago to test it but they saw the time as GMT not CST as I’d have expected. If I test it here I get ‘Europe/London’ as TZ using Arc Browser but ‘GMT’ using Safari. My Chicago friend also uses a Mac so I’m wondering if it’s Safari not passing on the info you need. Is this something you have experienced?
I have a test page at https://encounterevents.uk/test-page/ and wonder what time you see.
Forum: Plugins
In reply to: [Media Library Assistant] Incompatibility with SVG SupportI found the solution here: https://ww.wp.xz.cn/support/topic/svg-animation-not-working-in-wordpress-how-to-troubleshoot/page/2/
The uploads tab has a set of permitted types and activating SVG there worked, and allowed me to remove SVG Support.
Forum: Plugins
In reply to: [SVG Support] SVG Not Uploading due to security reasonsI am having this problem, too. I tried the test SVG you supplied and the problem persists. it appears (in my case at least) to be an incompatibility with the Media Library Assistant plugin by David Lingren.
Any ideas?
Forum: Plugins
In reply to: [LiteSpeed Cache] Page broken on Apple devicesIt still happens.
Forum: Plugins
In reply to: [LiteSpeed Cache] Page broken on Apple devicesThe report number is GSXIIIAK
- This reply was modified 5 years, 11 months ago by anotheruserhere.
Forum: Plugins
In reply to: [Easy Table of Contents] Disable TOC on some pagesA bit more info…
I had been including the TOC by inserting the [toc] shortcode on the pages I wanted it on, which was working fine and the contents of the TOC reflect the contents of the page. However, when it appeared on the page I didn’t want it (Our Team) it showed an entry for each H2 on the page (ie each team member) AND the H2s on the sidebar (Recent Posts, Recent Comments). This does not happen where I manually inserted the TOC.
- The [date] shortcode.