Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Why so many "Hard Coded" dates in forum .php files?

Asked Modified Viewed 2,979 times
J
Joe Kriz
J
  • Senior Member, joined since
  • Contributed 281 posts on the community forums.
  • Started 39 threads in the forums
  • Started this discussions
asked
Senior Member

I don't understand why there are so many hard coded .php files in the forum folder.

Shouldn't a CMS be easier than having all of the site admins having to go in and change the hard coded files?

There is one file in the forum folder that utilizes the ".showdate("forumdate" properly and that is the viewforum.php file.

There are too many other files in the forum folder that are hard coded in my opinion. Shouldn't these use the "forumdate" instead of being hard coded to European date format like it is now ".showdate(" %d.%m.%y" ????
The US does not use this type of format so we here have to go in and change the hard coding to something else on all the files below to something like %m/%d/%y

Here are the files that are hard coded with European style dates.
1. postnewthread.php
2. postreplay.php
3. viewthread.php
4. postedit.php

Certainly I can change this but every time there is an upgrade to this files, we all have to go in again and change the hard coding.
This gets to be a pain in the neck and really should not be necessary if these files were NOT hard coded.

Again, I think a CMS should be easy to use and the less hard coding of these files the better.
0 replies

7 posts

R
rob
R
rob 10
  • Junior Member, joined since
  • Contributed 25 posts on the community forums.
  • Started 1 thread in the forums
answered
Junior Member

Look man, if you go out this way. you will get a heart attack.

and this can establish you already. in Time and Date Settings institutions

Enjoy :d
0 replies
K
KEFF
K
KEFF 10
Member of Executive Committee. No sites running.
  • Veteran Member, joined since
  • Contributed 797 posts on the community forums.
  • Started 32 threads in the forums
answered
Veteran Member

There are 21 different ways of displaying time and date in Forums, subheader, short date and long date. Even US style, unless I'm mistaken.

If you have more ways you wanna display dates on, feel free to make a suggestion.
0 replies
W
WEC
W
WEC 10
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 5 threads in the forums
answered
Veteran Member

Sure the options are there in Time and Date Settings, but they are not used when the date format is hard coded. Thats the point.

viewthread.php as example:

Post edit time use date format from settings:

showdate("forumdate", $data['post_edittime'])

Joined date does not:

showdate("%d.%m.%y", $data['user_joined'])

It's a matter on simply going through the forum related files and exchanging the hard coded date formats with "forumdate".

Agree with Joe that it should be cleaned up, but i won't get a heart attack if it's not. lol


0 replies
K
KEFF
K
KEFF 10
Member of Executive Committee. No sites running.
  • Veteran Member, joined since
  • Contributed 797 posts on the community forums.
  • Started 32 threads in the forums
answered
Veteran Member

Well, as a non-coder I should have better sense than to speak up about them things, sorry.

And I agree, anything hardcoded that doesn't have to be should go, after all it's supposed to be simple to maintain the system.
0 replies
J
Joe Kriz
J
  • Senior Member, joined since
  • Contributed 281 posts on the community forums.
  • Started 39 threads in the forums
  • Started this discussions
answered
Senior Member

That is all I am asking.

Why are these dates hard coded when they really don't need to be....????

I, like many others, are running multiple sites. When PHP Fusion is updated and the files above are updated, then I have to go into all my sites and change those hard coded dates again. This can be a royal pain... Let alone trying to remember which files have the hard coded dates that need to be changed.

Wec, I won't get a heart attack either if it isn't changed in the next update.
However, the one file in the forum folder has been changed to use the "forumdate"... Why haven't the other files?
Consistency of web design falls into play here.... Especially with a CMS in my opinion... A CMS is supposed to make it easier for the admin. I think we would all agree on that point like KEFF mentions above...

Just my suggestion for future clean up of the code for PHP Fusion....
Take it or leave it.....

Thanks for the responses....
0 replies
W
WEC
W
WEC 10
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 5 threads in the forums
answered
Veteran Member

I guess the developers are only humans and they miss things as well at times.

Best you can do is to post bugs like this in the bug tracker. This way they will eventually be fixed by the dev. team even though it may take a while.
0 replies
J
Joe Kriz
J
  • Senior Member, joined since
  • Contributed 281 posts on the community forums.
  • Started 39 threads in the forums
  • Started this discussions
answered
Senior Member

Thanks WEC, I will do that.

The hard coded dates have been there since version 5 that I am aware.
I never thought too much about reporting it until version 7 came along and it still wasn't fixed or reported.

Anything to make the CMS easier and better to use is a good thing.
0 replies

Category Forum

User Administration - 8

Labels

None yet

Statistics

  • Views 0 views
  • Posts 7 posts
  • Votes 0 votes
  • Topic users 4 members

4 participants

K
K
KEFF 10
Member of Executive Committee. No sites running.
  • Veteran Member, joined since
  • Contributed 797 posts on the community forums.
  • Started 32 threads in the forums
J
J
  • Senior Member, joined since
  • Contributed 281 posts on the community forums.
  • Started 39 threads in the forums
  • Started this discussions
W
W
WEC 10
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 5 threads in the forums
R
R
rob 10
  • Junior Member, joined since
  • Contributed 25 posts on the community forums.
  • Started 1 thread in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet