Advertisement:

Author Topic: Is it possible to remove the 'on' before the posting-date?  (Read 311 times)

Offline Dwev

  • Jr. Member
  • **
  • Posts: 259
Is it possible to remove the 'on' before the posting-date?
« on: February 17, 2021, 07:36:53 AM »
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.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 60,210
  • Gender: Male
    • Kindred-999 on GitHub
Re: Is it possible to remove the 'on' before the posting-date?
« Reply #1 on: February 17, 2021, 09:27:33 AM »
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
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."

Offline Dwev

  • Jr. Member
  • **
  • Posts: 259
Re: Is it possible to remove the 'on' before the posting-date?
« Reply #2 on: February 17, 2021, 09:44:21 AM »
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?

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 60,210
  • Gender: Male
    • Kindred-999 on GitHub
Re: Is it possible to remove the 'on' before the posting-date?
« Reply #3 on: February 17, 2021, 10:12:25 AM »
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)
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."

Offline Gary

  • Sorceress's Knight
  • Lead Customizer
  • SMF Super Hero
  • *
  • Posts: 18,425
  • Gender: Male
  • So this is the luck of the draw...
    • Gazmanafc on Facebook
    • garygadsdon on LinkedIn
    • @Gazmanafc on Twitter
    • Dissidia Opera Omnia Helper
Re: Is it possible to remove the 'on' before the posting-date?
« Reply #4 on: February 17, 2021, 10:14:27 AM »
It'd be in this section:

Code: [Select]
<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.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 60,210
  • Gender: Male
    • Kindred-999 on GitHub
Re: Is it possible to remove the 'on' before the posting-date?
« Reply #5 on: February 17, 2021, 10:23:16 AM »
thanks Gary.


Dwev,  it would be this colon   ':</strong> '
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."

Offline Dwev

  • Jr. Member
  • **
  • Posts: 259
Re: Is it possible to remove the 'on' before the posting-date?
« Reply #6 on: February 17, 2021, 10:45:43 AM »
I just removed the following from Display.template.php

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

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

Thanks a lot!  :D

Offline Antechinus

  • SMF Friend
  • SMF Master
  • *
  • Posts: 25,655
  • Master of BBC Abuse
Re: Is it possible to remove the 'on' before the posting-date?
« Reply #7 on: February 17, 2021, 02:16:29 PM »
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:
Code: [Select]
', $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>