$submitted contains put publication date information and author information. Both need to be HTML5ifyed.

Also — $date and $name should be HTML5ifyed.

Comments

betz’s picture

Status: Active » Needs review
StatusFileSize
new1.4 KB

Following patch overrides $submitted with a custom theme function.
Does not work in Bartik for now, because Bartik overrides $submitted, without no reason as far as i can see.
I will create a patch for Bartik now

pontus_nilsson’s picture

StatusFileSize
new1.4 KB

Fixes typo in last patch (hook_preprocess_hook => hook_preprocess_node)

betz’s picture

I dont think there is a nice way to html5ify the $name variable.
is for citing works or persons, so something else.

Tthe RDF module already added extra metadata like typeof="sioc:UserAccount" and property="foaf:name"

betz’s picture

and the bartik patch http://drupal.org/node/1051164

amateescu’s picture

StatusFileSize
new1.46 KB

This is exactly what I was working on at DDD Brussels :)

Patch looks very good, I think we should also add a 'pubdate' variable which defaults to TRUE.

alanburke’s picture

StatusFileSize
new1.47 KB

Patch rerolled, with pubdate as per the HTML Doctor suggestion.
http://html5doctor.com/the-article-element/

ericduran’s picture

Status: Needs review » Needs work

We should probably prefix our theme functions with out module name, html5_* is way to generic and may be used somewhere else.

We could also provide our own hook_date_formats to set up the RFC format Instead of passing the custom flag to format_date.

Also should we used element_set_attributes and drupal_attributes instead of doing datetime="' . $variables['rfcdate'] . '". I know this is not an element but just curious. I haven't tested it but I think that should work.

amateescu’s picture

Status: Needs work » Needs review
StatusFileSize
new2.33 KB

Some work in this direction. The element and drupal_attributes parts are not done yet.

Also, changed rfcdate to isodate, because we have to provide the date in ISO 8601 format: http://html5doctor.com/the-time-element/

amateescu’s picture

StatusFileSize
new2.52 KB

I see what you mean with drupal_attributes, attached patch implements that and cleans a bit our theme function.

My example was theme_filter_guidelines() from core's filter.module.

ericduran’s picture

Status: Needs review » Needs work
+++ html5_tools.moduleundefined
@@ -84,3 +84,67 @@ function html5_tools_preprocess_html_tag(&$variables) {
+  return array(
+    'iso8601' => t('ISO 8601'),

The type name should probably be html5_tools_iso8601. Sadly we still need to worry about namespace collision and iso8601 might be a format a multiple modules will want to implement.

Besides that everything else looks good, we just have to change the type everywhere is mention.

Powered by Dreditor.

amateescu’s picture

Status: Needs work » Needs review
StatusFileSize
new2.58 KB

Done :)

ericduran’s picture

Status: Needs review » Reviewed & tested by the community

This looks good to me.

dave reid’s picture

We should probably add some kind of note if this functionality prevents modules like Submitted By from working.

amateescu’s picture

@Dave, we can't know (or fix) that until a 7.x release for that module is published.

ericduran’s picture

We probably should have a configuration screen where settings like these can be turn on or off. It is pretty uncool to just do stuff without telling people whats going on.

jensimmons’s picture

Yes, let's put everything in a config page. I opened an issue for this. #1063786: Create a configuration screen for HTML5 Tools options

ericduran’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for all the work amateescu. I committed the last attached patch since the other issue shouldn't hold this one up.

--
http://drupal.org/cvs?commit=501306

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.