@x00, which HQ / mailing lists do you mean, Google or Vanilla?
I have patched library/core/class.format.php starting at line 513 as follows:
if ($Format == '') {
if ($Html) {
// If this is about a HTML date, use our custom format for Google Data Highlighter to work
$Format = T('Date.CustomFormat', '%e %B %Y %I:%M%p');
} else if (date('Y m d', $Timestamp) == date('Y m d', $Now)) {
// If the timestamp was during the current day, use the time format
$Format = T('Date.DefaultTimeFormat', '%l:%M%p');
} else if (date('Y', $Timestamp) == date('Y', $Now)) {
// If the timestamp is the same year, show the month and date
$Format = T('Date.DefaultDayFormat', '%B %e');
} else if (date('Y', $Timestamp) != date('Y', $Now)) {
// If the timestamp is not the same year, just show the year
$Format = T('Date.DefaultYearFormat', '%B %Y');
} else {
// Otherwise, use the date format
$Format = T('Date.DefaultFormat', '%B %e, %Y');
}
}
That way it shows the full date/time format whenever "html" as passed as format to the Date function, leaving the display of the "In this Discussion" and "Who's Online" side-panel boxed unaffected.
I know it's the wrong way to patch core files, but I already have applied a patch to library/core/class.format.php for the hashtag search to work properly so this is just an extension to the patch file I have already in place.
I'll now have to wait for Google to pass by again to see if this is now working for the Google Data Highlighter as supposed to.
Just to let you know, after applying the shown modifications Google Data Highlighter indeed auto-detects the publishing date/time.
The only problem now is that most discussions are still stored with the old date format in their index, which means starting the article marking still brings up old pages with the old date format the Data Highlighter can not interpret. No idea how long it takes now for Google to re-index all discussions, and not quite sure what to do now. I've deleted all the formerly marked discussions from the Data Highlighter (which were incomplete due to the missing publishing date), but I guess it does not make sense to let it learn how to interpret forum discussions as articles as long as it's still showing pages with the old date format. Of course this has nothing to do with Vanilla so I'm gonna shut up now...
Comments
like I say it probably best to ask at HQ
grep is your friend.
@x00, which HQ / mailing lists do you mean, Google or Vanilla?
I have patched
library/core/class.format.php
starting at line 513 as follows:That way it shows the full date/time format whenever "html" as passed as format to the
Date
function, leaving the display of the "In this Discussion" and "Who's Online" side-panel boxed unaffected.I know it's the wrong way to patch core files, but I already have applied a patch to
library/core/class.format.php
for the hashtag search to work properly so this is just an extension to the patch file I have already in place.I'll now have to wait for Google to pass by again to see if this is now working for the Google Data Highlighter as supposed to.
better idea that to modify the core file is to pre-load an alternate Gdn_Format class.
grep is your friend.
You need to ask Google or people who know about this.
grep is your friend.
Just to let you know, after applying the shown modifications Google Data Highlighter indeed auto-detects the publishing date/time.
The only problem now is that most discussions are still stored with the old date format in their index, which means starting the article marking still brings up old pages with the old date format the Data Highlighter can not interpret. No idea how long it takes now for Google to re-index all discussions, and not quite sure what to do now. I've deleted all the formerly marked discussions from the Data Highlighter (which were incomplete due to the missing publishing date), but I guess it does not make sense to let it learn how to interpret forum discussions as articles as long as it's still showing pages with the old date format. Of course this has nothing to do with Vanilla so I'm gonna shut up now...