The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Removing Words From Post's Date and Time Section

View previous topic View next topic Go down

Solved Removing Words From Post's Date and Time Section

Post by Kelso on 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

Kelso
Forumember

Posts : 55
Reputation : 3
Language : English

http://liveandnet.forumotion.com/

Back to top Go down

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

Post by Kelso on May 27th 2016, 8:29 pm

Bump! Very Happy

Kelso
Forumember

Posts : 55
Reputation : 3
Language : English

http://liveandnet.forumotion.com/

Back to top Go down

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

Post by Rhino.Freak on 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

Rhino.Freak
Active Poster

Male Posts : 1243
Reputation : 105
Language : English
Location : Mumbai, India

http://freetest.forumotion.net/

Back to top Go down

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

Post by Kelso on 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.

Kelso
Forumember

Posts : 55
Reputation : 3
Language : English

http://liveandnet.forumotion.com/

Back to top Go down

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

Post by Rhino.Freak on 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

Rhino.Freak
Active Poster

Male Posts : 1243
Reputation : 105
Language : English
Location : Mumbai, India

http://freetest.forumotion.net/

Back to top Go down

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

Post by Kelso on 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. :-)

Kelso
Forumember

Posts : 55
Reputation : 3
Language : English

http://liveandnet.forumotion.com/

Back to top Go down

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

Post by Ange Tuteur on 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}

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

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

Post by APE on May 30th 2016, 3:04 pm

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





APE
Manager
Manager

Male Posts : 8319
Reputation : 716
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum