Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define date format in templates instead of index.php #169

Closed
wants to merge 1 commit into from

Conversation

ArthurHoaro
Copy link
Member

It allows theme creators to display dates the way they want to by playing with strftime function parameter.

cf #144

@nodiscc nodiscc added enhancement cleanup code cleanup and refactoring please test labels Mar 12, 2015
@nodiscc nodiscc self-assigned this Mar 12, 2015
@nodiscc nodiscc modified the milestone: 0.9beta Mar 13, 2015
@ArthurHoaro
Copy link
Member Author

@alexisju You're right, I need to look more at my IDE's log. Also I forgot the time in QRCode title.

I can do this

 {function="strftime('%c', htmlspecialchars($value.timestamp))"}

However, what is the point to htmlspecialchars a generated value such as timestamp? I'd like to get @nodiscc opinion on that.

@nodiscc
Copy link
Member

nodiscc commented Mar 18, 2015

Mind that the QR code will be moved as a plugin (part of #164)

@ArthurHoaro
Copy link
Member Author

@alexisju comment has disappeared because it was probably a commit comment, and I rebased the commit. But the warning are gone, and I've removed htmlspecialchars on timestamps since they're not even user input.

@nodiscc it might be, but since the plugin system is not merged I've to assume the QRCode is still in core templates.

@nodiscc
Copy link
Member

nodiscc commented Mar 27, 2015

I've to assume the QRCode is still in core templates.

Sure.

@nodiscc
Copy link
Member

nodiscc commented Mar 27, 2015

Mostly ok to merge, @ArthurHoaro are you sure it's ok removing function linkdate2Locale() from index.php? Some templates in #163 may still use it.

Maybe it's safer to at least warn them, some time before this change?

@ArthurHoaro
Copy link
Member Author

Well, that's actually the point of this PR: switch date formatting from index.php to templates. So yes, third party templates will have to make an update.

I don't see this as an issue because those themes support are in a separate milestone. But we can obviously warn them.

@nodiscc
Copy link
Member

nodiscc commented Mar 31, 2015

Merged in bec1870

@nodiscc nodiscc closed this Mar 31, 2015
@virtualtam virtualtam modified the milestones: 0.9.0, 0.5.0 Jul 30, 2015
@ArthurHoaro ArthurHoaro deleted the tpldate branch September 2, 2015 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup code cleanup and refactoring enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants