News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Is it possible to remove the 'on' before the posting-date?

Started by Dwev, February 17, 2021, 07:36:53 AM

Previous topic - Next topic

Dwev

Standard SMF shows the on before the date and time of a posting.

Is it possible to remove this, and if yes, how?

I tried to remove it in the translation of our forum, but that only removes the word, and not the the colon.

Any help, as always, greatly appreciated.

Kindred

it would require a code edit -- the exact template(s) to edit would depend on where you want to remove that, since it's used in half a dozen places...

display.template.php
boardindex.template.php
messageindex.template.php
recent.template.php

probably some others
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Dwev

I would like it to disappear just above postings (like right here, where it says "Reply #2 on:"), nowhere else.

Is it doable to explain how that can be done?

Kindred

that's in Display.template.php

not certain exactly where off the top of my head (on phone, can't pull up the actual file at this moment)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Gary

It'd be in this section:

<div class="smalltext">« <strong>', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ':</strong> ', $message['time'], ' »</div>


remove the ', $txt['on'], ' part.
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

Kindred

thanks Gary.


Dwev,  it would be this colon   ':</strong> '
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Dwev

I just removed the following from Display.template.php


$txt['on'], ': ',


And that did exactly what I wanted, it removed the on and the : (colon).

Thanks a lot!  :D

Antechinus

That code doesn't exist in that template. Just to save confusion, for anyone else who wants to so it, what you would actually remove is this:
', $txt['on'], ':

In other words:
Code (Find) Select
<div class="smalltext">« <strong>', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ':</strong> ', $message['time'], ' »</div>


Code (Replace) Select
<div class="smalltext">« <strong>', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', '</strong> ', $message['time'], ' »</div>

Advertisement: