Change modify "Quote" title/ heading?

Started by Wellwisher, December 31, 2016, 06:35:52 PM

Previous topic - Next topic

Wellwisher

Hope everyones geared up for New Years and had a merry x-mas.

2x questions:

1. How do I remove the semicolon shown in picture
2. Wish to remove the "time" from quote title/ heading.



Much respect <3

Arantor

Interesting, I'd always found that actually useful information in posts especially as people don't always quote nearby posts. But given our previous conversations, you clearly know best about everything.

There are actually two sets of quote tags, both of which contain the unwanted colon. Find this in Subs.php and replace:


array(
'tag' => 'quote',
'type' => 'parsed_equals',
'before' => '<div class="quoteheader"><div class="topslice_quote">' . $txt['quote_from'] . ': $1</div></div><blockquote>',
'after' => '</blockquote><div class="quotefooter"><div class="botslice_quote"></div></div>',
'quoted' => 'optional',
// Don't allow everything to be embedded with the author name.
'parsed_tags_allowed' => array('url', 'iurl', 'ftp'),
'block_level' => true,
),
array(
'tag' => 'quote',
'parameters' => array(
'author' => array('match' => '([^<>]{1,192}?)'),
'link' => array('match' => '(?:board=\d+;)?((?:topic|threadid)=[\dmsg#\./]{1,40}(?:;start=[\dmsg#\./]{1,40})?|action=profile;u=\d+)'),
'date' => array('match' => '(\d+)', 'validate' => 'timeformat'),
),
'before' => '<div class="quoteheader"><div class="topslice_quote"><a href="' . $scripturl . '?{link}">' . $txt['quote_from'] . ': {author} ' . $txt['search_on'] . ' {date}</a></div></div><blockquote>',
'after' => '</blockquote><div class="quotefooter"><div class="botslice_quote"></div></div>',
'block_level' => true,
),


with this:

array(
'tag' => 'quote',
'type' => 'parsed_equals',
'before' => '<div class="quoteheader"><div class="topslice_quote">' . $txt['quote_from'] . ' $1</div></div><blockquote>',
'after' => '</blockquote><div class="quotefooter"><div class="botslice_quote"></div></div>',
'quoted' => 'optional',
// Don't allow everything to be embedded with the author name.
'parsed_tags_allowed' => array('url', 'iurl', 'ftp'),
'block_level' => true,
),
array(
'tag' => 'quote',
'parameters' => array(
'author' => array('match' => '([^<>]{1,192}?)'),
'link' => array('match' => '(?:board=\d+;)?((?:topic|threadid)=[\dmsg#\./]{1,40}(?:;start=[\dmsg#\./]{1,40})?|action=profile;u=\d+)'),
'date' => array('match' => '(\d+)', 'validate' => 'timeformat'),
),
'before' => '<div class="quoteheader"><div class="topslice_quote"><a href="' . $scripturl . '?{link}">' . $txt['quote_from'] . ' {author}</a></div></div><blockquote>',
'after' => '</blockquote><div class="quotefooter"><div class="botslice_quote"></div></div>',
'block_level' => true,
),

Wellwisher

Quote from: Arantor on January 01, 2017, 05:37:13 AM
Interesting, I'd always found that actually useful information in posts especially as people don't always quote nearby posts. But given our previous conversations, you clearly know best about everything.

There are actually two sets of quote tags, both of which contain the unwanted colon. Find this in Subs.php and replace:



Hello Arantor,

I only wish to remove the *time* only (aka the 24hr clock info). The date is needed ofc.  ;D Is it possible to just do that?

And thanks for providing me with the location. I was looking in a number of places, i.e messageindex, index.template, display, languages etc. I was getting maff, thinking where's this sonofa colon. xD I would have never guessed it would be in Subs.  :P

Hope you had a merry x-mas and new year. <3

Arantor

Removing the time is infinitely more complicated because the BBC parser says 'convert this to a time' and the bowels of parse_bbc do it, except there's no 'date only' option in there, nor is there a way to obtain only the date since the internal date format is stored as time + date, so unless you want only the date everywhere, or you do some seriously creative string parsing to convert the datetime format into a date format, it's not going to happen. And this multiplies upwards in complexity if you have multiple languages.

Advertisement: