The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
4 posters

    Removing Words From Post's Date and Time Section

    Sienna
    Sienna
    Forumember


    Female Posts : 93
    Reputation : 6
    Language : English

    Solved Removing Words From Post's Date and Time Section

    Post by Sienna May 26th 2016, 5:00 pm

    Technical Details

    Forum version : #phpBB3
    Position : Administrator
    Concerned browser(s) : Google Chrome
    Screenshot of problem : http://image.prntscr.com/image/8746901a29354e81b9a0a57fcde183b3.png
    Who the problem concerns : All members
    When the problem appeared : When it began.
    Forum link : http://www.ardentartforum.com/

    Description of problem

    Hello! So, I was wondering if there's a way to remove words from the area on a post that says

    (Small Post Image) by Kelso on Mon May 23, 2016 11:00 am

    What I would like to remove is the image and the words "by Kelso on" and just keep the day, date, and time.

    Thanks for any help!


    Last edited by Kelso on May 29th 2016, 8:05 pm; edited 1 time in total
    Sienna
    Sienna
    Forumember


    Female Posts : 93
    Reputation : 6
    Language : English

    Solved Re: Removing Words From Post's Date and Time Section

    Post by Sienna May 27th 2016, 8:29 pm

    Bump! Very Happy
    Rhino.Freak
    Rhino.Freak
    Helper
    Helper


    Male Posts : 1248
    Reputation : 104
    Language : English
    Location : Mumbai, India

    Solved Re: Removing Words From Post's Date and Time Section

    Post by Rhino.Freak May 27th 2016, 8:42 pm

    You have to do some template editing for this Smile

    Go to
    Code:
    Admin Panel > Display > Templates > General
    and edit viewtopic_body
    Find
    Code:
    <p class="author"><img src="{postrow.displayed.MINI_POST_IMG}" alt="{postrow.displayed.L_MINI_POST_ALT}" title="{postrow.displayed.L_MINI_POST_ALT}" />&nbsp;{L_TOPIC_BY}&nbsp;{postrow.displayed.POSTER_NAME} {postrow.displayed.POST_DATE_NEW}</p>
    And replace it by
    Code:
    <p class="author">{postrow.displayed.POST_DATE_NEW}</p>

    Hit save and don't forget to publish the template! Very Happy
    Sienna
    Sienna
    Forumember


    Female Posts : 93
    Reputation : 6
    Language : English

    Solved Re: Removing Words From Post's Date and Time Section

    Post by Sienna May 29th 2016, 6:14 pm

    @Rhino.Freak

    Thank you!! It worked amazingly. Also, I apologize for the delay on the reply. I've been working a lot this weekend!

    I was wondering if there was a way to take out the word "on"? I know I sound very picky, haha. If not, this looks really good either way.
    Rhino.Freak
    Rhino.Freak
    Helper
    Helper


    Male Posts : 1248
    Reputation : 104
    Language : English
    Location : Mumbai, India

    Solved Re: Removing Words From Post's Date and Time Section

    Post by Rhino.Freak May 29th 2016, 7:01 pm

    Actually
    Code:
    {postrow.displayed.POST_DATE_NEW}
    is hardcoded.
    It automatically gets replaced by:
    "on 29.05.2016" or whatever the time was.

    Some JavaScript might be able to slice initial 3 characters but I don't know how to do it Razz
    Sienna
    Sienna
    Forumember


    Female Posts : 93
    Reputation : 6
    Language : English

    Solved Re: Removing Words From Post's Date and Time Section

    Post by Sienna May 29th 2016, 8:04 pm

    That's perfectly fine! Thank you for that, I didn't know that at all, haha.

    Solved!

    Big thanks to Rhino.Freak, always saving my life on here. :-)
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: Removing Words From Post's Date and Time Section

    Post by Ange Tuteur May 29th 2016, 11:27 pm

    Rhino.Freak wrote:Actually
    Code:
    {postrow.displayed.POST_DATE_NEW}
    is hardcoded.
    It automatically gets replaced by:
    "on 29.05.2016" or whatever the time was.

    Some JavaScript might be able to slice initial 3 characters but I don't know how to do it Razz
    Liiiiike this ?
    Code:
    <noscript>{postrow.displayed.POST_DATE_NEW}</noscript>
    <script type="text/javascript">document.write('{postrow.displayed.POST_DATE_NEW}'.replace(/^on /, ''));</script>
    Razz

    Well, I wouldn't recommend that in this case, because you can remove "on " by removing "_NEW" from the variable. Like this :
    Code:
    {postrow.displayed.POST_DATE}
    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19432
    Reputation : 2010
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: Removing Words From Post's Date and Time Section

    Post by Ape May 30th 2016, 3:04 pm

    Problem solved & topic archived.
    Please read our forum rules: ESF General Rules



    add time  date to posts - Removing Words From Post's Date and Time Section Left1212add time  date to posts - Removing Words From Post's Date and Time Section Center11add time  date to posts - Removing Words From Post's Date and Time Section Right112
    add time  date to posts - Removing Words From Post's Date and Time Section Ape_b110
    add time  date to posts - Removing Words From Post's Date and Time Section Ape1010

      Current date/time is November 11th 2024, 10:48 pm