News:

Join the Facebook Fan Page.

Main Menu

Backwards Calendar Dates

Started by Shades., January 17, 2022, 06:53:16 PM

Previous topic - Next topic

Shades.

2.1RC4

I just added this event to my calendar and the dates off to the right top of the post shows "April 10,2022April 06, 2022" all bunched up and backwards. It should read "April 06, 2022 - April 10, 2022".

How can I fix this?
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

ozp

Look in Display.template.php in your theme.

Search for foreach ($context['linked_calendar_events'] as $event)
Then you have the code for displaying the dates a bit further down.
This is the code from the default theme

if (!empty($event['allday']))
{
echo '<time datetime="' . $event['start_iso_gmdate'] . '">', trim($event['start_date_local']), '</time>', ($event['start_date'] != $event['end_date']) ? ' &ndash; <time datetime="' . $event['end_iso_gmdate'] . '">' . trim($event['end_date_local']) . '</time>' : '';

You have probably got the start and end date mixed up

Shades.

#2
Just took a look and my code is exactly the same as what you posted! :o

Here is my Display.template file...

Edit: Also just uploaded a fresh/clean Display.template.php file and no change. Dates are still reversed!

Also by looking at a default install the dates are on the left so I don't have a clue how they got moved to the right. I guess one of my mods changed something. :(
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Shades.

I have concluded that it is the Ehportal mod that caused this because when I uninstalled it everything displayed as it should by default so I will try and post over at that site and will post a fix here if I get one. Otherwise I may have to switch to another portal as bad as I don't want to! ???

Edit: Apparently I don't have permission to post over there soooo....(scratching head)!
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Aleksi "Lex" Kilpinen

Quote from: Shades. on January 18, 2022, 01:23:26 PMEdit: Apparently I don't have permission to post over there soooo....(scratching head)!
Interesting. Just took a look at their support board and it seems kinda quiet, latest post is an unanswered complain about broken layout with shout box block made in september 21.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Shades.

Is there any css or some codes I can put in place to keep anything from changing that part of the dates in display.php or display.template.php or any other file?

@Chen Zhen can you provide any help on this? O:)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

@rjen

Well, it is caused by the portal_shoutbox.css that applies a float to the ' time' element...

time{
font: 11px 'lucida grande', tahoma, verdana, arial, sans-serif;
font-weight: normal;
float:right;
color: #D5D5D5;
}

I would say that's not good practice, because an element named 'time' will most likely also exist outside the portal...

So there you are...

You can add this at the end of your css to undo it, but it would be better it the portal would not change this generic element..

div.information time {
    float: none;
}
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Shades.

ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

@rjen

Just an FYI. Your site looks quite funky on mobile. Not sure what's going on there but this cannot be good...
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Shades.

Thanks yeah I'm working on that! I think a lot of it has to do with the ehportal so I'm testing now with ezportal. ;)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Shades.

Quote from: @rjen on January 19, 2022, 01:58:31 PMJust an FYI. Your site looks quite funky on mobile. Not sure what's going on there but this cannot be good...
I switched to ezportal...let me know how it looks to you now. ;)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

@rjen

On mobile I am not seeing any evidence of a portal. If that's what you were aiming for (?) it looks better...

Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Shades.

#12
Yes thanks! :)  I have the ezportal turned off for mobile...couldn't do that with ehportal. :'(

Edit: Just discovered that its not the ehportal mod alone, ehportal and the curve2 color changer mod do not work together on mobile. :(
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

@rjen

Don't know.

I am a long-time Tinyportal user, so I have not tried other portals recently...
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Diego Andrés

I doubt the color curve mod is in any way related to mobile problems

SMF Tricks - Free & Premium Responsive Themes for SMF.

Shades.

I'm not sure about anything lol here's all I know: :-\

I know it's gotta be in css somewhere but I cant find the problem!

I have several 2.1RC4 test sites and all of them have Ehportal and Curve Color Changer and work fine on mobile. But for some reason when I try to use my main sites backup sql for a freshly installed test set and install the mentioned mods (with no other mods installed) and it comes out like @rjen pointed out on mobile. But I don't have that problem with EZportal and the Color Changer, they work just fine together on mobile!

Something weird going on here! :o
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Advertisement: