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.

How to add the time in blog view?

View previous topic View next topic Go down

How to add the time in blog view?

Post by Luffy on July 16th 2017, 11:50 pm

Hello everyone,

So i am trying to add the time of which the posts were made in the topic preview within the category. The problem is that the categories are blogs and the date is there but the time is not. If possible, i would like the time to be displayed in the topics preview within the blog category and in the blog posts and comments as well.

Forum Version: Phpbb3
Forum link: will be sent if needed.

Thanks a lot in advance!





avatar
Luffy
Manager
Manager

Male Posts : 4631
Reputation : 467
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Re: How to add the time in blog view?

Post by Wolfuryo on July 17th 2017, 7:10 pm

Hi,

By default, the date is not shown in the blog posts. The only option to show the date would be to add the date to the post when posting it. Basically if you post a topic with this content:
Code:
Content
and it's 08:35, then, just before you post the topic, my code would transform the post content to something like this:
Code:
Content<ddated>08:35</ddated>
The
Code:
<ddated>08:35</ddated>
would be hidden when someone looks at the topic. The script would get the data and insert it in the blog list. Also note that the old topics would not have the date in them and there's nothing anyone can do about it(maybe hack FM's database and get the date from there. Just kidding Razz ). If this sounds good to you, let me know and I'll start working on the code.
avatar
Wolfuryo
Forumember

Posts : 352
Reputation : 92
Language : Romanian and English

http://board.realmsn.com

Back to top Go down

Re: How to add the time in blog view?

Post by SLGray on July 17th 2017, 8:08 pm

Also there is a current time button in the editor.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.

avatar
SLGray
Administrator
Administrator

Male Posts : 39198
Reputation : 2628
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Re: How to add the time in blog view?

Post by Wolfuryo on July 17th 2017, 8:22 pm

@SLGray wrote:Also there is a current time button in the editor.
Good to know. I'll be using JS's Date() for the code, so no need for that button. Cool
avatar
Wolfuryo
Forumember

Posts : 352
Reputation : 92
Language : Romanian and English

http://board.realmsn.com

Back to top Go down

Re: How to add the time in blog view?

Post by Luffy on July 18th 2017, 8:10 am

@Wolfuryo yes please that would be amazing thank you.
@SLGray, i know that but i cannot make it show the time someone posted using that button because members have to press it before posting.. But thanks a lot.





avatar
Luffy
Manager
Manager

Male Posts : 4631
Reputation : 467
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Re: How to add the time in blog view?

Post by Luffy on July 19th 2017, 10:57 am

Bump.





avatar
Luffy
Manager
Manager

Male Posts : 4631
Reputation : 467
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Re: How to add the time in blog view?

Post by Wolfuryo on July 19th 2017, 1:07 pm

@Luffy, I'm on vacation with my family for about a week so I won't be able to assist you with this till next week. Please bump this topic from time to time so I won't forget about it and it won't be garbaged.
avatar
Wolfuryo
Forumember

Posts : 352
Reputation : 92
Language : Romanian and English

http://board.realmsn.com

Back to top Go down

Re: How to add the time in blog view?

Post by Luffy on July 19th 2017, 2:27 pm

@Wolfuryo wrote:@Luffy, I'm on vacation with my family for about a week so I won't be able to assist you with this till next week. Please bump this topic from time to time so I won't forget about it and it won't be garbaged.
Okay @Wolfuryo, will do so! Smile Thanks a lot and enjoy your vacation.





avatar
Luffy
Manager
Manager

Male Posts : 4631
Reputation : 467
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Re: How to add the time in blog view?

Post by Luffy on July 20th 2017, 10:59 pm

Bump.





avatar
Luffy
Manager
Manager

Male Posts : 4631
Reputation : 467
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Re: How to add the time in blog view?

Post by Van-Helsing on July 20th 2017, 11:15 pm

Hello @Luffy,
Have you check if there is a php variable in the default template? You can identify php variable from symbols {} i.e php variables looks like this {BLOG_POST_TIME}. Please check in this template topics_blog_box if there are the date fields code:

Code:

         <div class="blog_cal-border">
            <div class="blog_cal-content">
               <span class="blog_cal-{topics_blog_box.row.FIRST_POST_DMY_CLASS0}">{topics_blog_box.row.FIRST_POST_DMY_VALUE0}</span>
               <span class="blog_cal-{topics_blog_box.row.FIRST_POST_DMY_CLASS1}">{topics_blog_box.row.FIRST_POST_DMY_VALUE1}</span>
               <span class="blog_cal-{topics_blog_box.row.FIRST_POST_DMY_CLASS2}">{topics_blog_box.row.FIRST_POST_DMY_VALUE2}</span>
            </div>
         </div>
avatar
Van-Helsing
Hyperactive

Male Posts : 2297
Reputation : 90
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Re: How to add the time in blog view?

Post by Luffy on July 21st 2017, 10:39 pm

I already tried all possible ways for that to work but they don't work. They should have the time displaying there.. Sad





avatar
Luffy
Manager
Manager

Male Posts : 4631
Reputation : 467
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Re: How to add the time in blog view?

Post by Van-Helsing on July 21st 2017, 10:58 pm

Hello @Luffy,
Yes as I was investigated last night this issue but I didn't find any php variables related with time displaying, also I didn't find the similar template like viewtopic_body for blog posts. I dont know if it is the same template with posts or if the blogs using different template for blog posts and is not accessible to us. It is better to ask someone from tech team about this.
avatar
Van-Helsing
Hyperactive

Male Posts : 2297
Reputation : 90
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Re: How to add the time in blog view?

Post by Luffy on July 24th 2017, 2:30 am

Bump





avatar
Luffy
Manager
Manager

Male Posts : 4631
Reputation : 467
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Re: How to add the time in blog view?

Post by Wolfuryo on July 24th 2017, 7:24 am

Hi,

@Luffy, the code was placed on your forum. I'm not going to put the code here because it will only work on Luffy's forum.
avatar
Wolfuryo
Forumember

Posts : 352
Reputation : 92
Language : Romanian and English

http://board.realmsn.com

Back to top Go down

Re: How to add the time in blog view?

Post by Luffy Yesterday at 8:41 am

@Wolfuryo this code only displays the time on your post and the post below your post.
I changed the after to before i there so i can style the time where i want it to be.

We have to see what's going on because this doesn't appear on every blog topic.





avatar
Luffy
Manager
Manager

Male Posts : 4631
Reputation : 467
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Re: How to add the time in blog view?

Post by Van-Helsing Yesterday at 10:22 pm

Ηello @Luffy,
Have you setup all blogs exactly with the same configuration?
avatar
Van-Helsing
Hyperactive

Male Posts : 2297
Reputation : 90
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Re: How to add the time in blog view?

Post by Luffy Yesterday at 11:25 pm

Yes i have..





avatar
Luffy
Manager
Manager

Male Posts : 4631
Reputation : 467
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Re: How to add the time in blog view?

Post by Van-Helsing Yesterday at 11:45 pm

scratch Very strange that means your code is not working correct, have you check your Js if it uses a random/randomize functions? Normally it mustn't shows different settings per blog. Have you setup your code to work on pre-selected blog-categories? Can you post your code here to check it?
avatar
Van-Helsing
Hyperactive

Male Posts : 2297
Reputation : 90
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Re: How to add the time in blog view?

Post by Luffy Yesterday at 11:59 pm

@Wolfuryo made the code. He didn't want to share the code because it only works on my forum.. I am not sure what to do.. :O





avatar
Luffy
Manager
Manager

Male Posts : 4631
Reputation : 467
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

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