How to add the time in blog view?
3 posters
Page 1 of 2
Page 1 of 2 • 1, 2
How to add the time in blog view?
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!
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!
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: How to add the time in blog view?
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:
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 ). If this sounds good to you, let me know and I'll start working on the code.
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
- Code:
Content<ddated>08:35</ddated>
|
Guest- Guest
Re: How to add the time in blog view?
Also there is a current time button in the editor.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: How to add the time in blog view?
Good to know. I'll be using JS's Date() for the code, so no need for that button.SLGray wrote:Also there is a current time button in the editor.
Guest- Guest
Re: How to add the time in blog view?
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: How to add the time in blog view?
Bump.
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: How to add the time in blog view?
@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.
Guest- Guest
Re: How to add the time in blog view?
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: How to add the time in blog view?
Bump.
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: How to add the time in blog view?
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:
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>
Re: How to add the time in blog view?
I already tried all possible ways for that to work but they don't work. They should have the time displaying there..
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: How to add the time in blog view?
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.
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.
Re: How to add the time in blog view?
Bump
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: How to add the time in blog view?
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.
@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.
Guest- Guest
Re: How to add the time in blog view?
@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.
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.
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: How to add the time in blog view?
Yes i have..
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: How to add the time in blog view?
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?
Re: How to add the time in blog view?
@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
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: How to add the time in blog view?
Hi,
@Luffy, the code only works for topics that are made after the code was installed. It's not possible to show the time everywhere, because there is no place on the forum where you can see that time.
@Van-Helsing, this is the code that deals with getting the time and placing it where it's supposed to be:
On Luffy's forum, there is a custom page that deals with topic posting in blogs. I have edited it a bit as well to add the date at the beginning of every blog topic..
@Luffy, the code only works for topics that are made after the code was installed. It's not possible to show the time everywhere, because there is no place on the forum where you can see that time.
@Van-Helsing, this is the code that deals with getting the time and placing it where it's supposed to be:
- Code:
$(document).ready(function(){
/*Code by Wolfuryo. Usage of this code without this notice will result in the destruction of the website using the code*/
var reg = /f\d+/;
var pth = location.pathname;
if( !reg.test(pth) || !$(".blog").length ) return;
var ddata = $("ddata"),
len = ddata.length,
i = 0,
bl_day = $(".blog_cal-year");
for(i;i<len;i++){
bl_day.eq(i+1).after('<span class="timeTime" id="bl_time"> - ' + ddata.eq(i).text() + '</span>');
}
});
On Luffy's forum, there is a custom page that deals with topic posting in blogs. I have edited it a bit as well to add the date at the beginning of every blog topic..
Guest- Guest
Re: How to add the time in blog view?
My forum link is https://inforumgr.com
@Wolfuryo the code does not work for /f71-forum
I thought the code would word as you said so i checked some new topics on that category but it doesn't display the time anywhere..
@Wolfuryo the code does not work for /f71-forum
I thought the code would word as you said so i checked some new topics on that category but it doesn't display the time anywhere..
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: How to add the time in blog view?
Hi,
I have made edits to the page that you use for blog posting(https://www.inforumgr.com/h4-page). When I checked, the edits were not there. I don't know why that happened, but it should be solved now.
I have made edits to the page that you use for blog posting(https://www.inforumgr.com/h4-page). When I checked, the edits were not there. I don't know why that happened, but it should be solved now.
Guest- Guest
Re: How to add the time in blog view?
@Wolfuryo thanks a lot. One last thing. If for example it's 1 o'clock and 3 minutes the display time shows as 1:3 instead of 01:03. Can we fix that please. I am seeing an example now that says 21:1 instead of 21:01. http://prntscr.com/g16tl5
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: How to add the time in blog view?
@Wolfuryo, the edits you did for /h4-page is now the problem because now we cannot make any new posts now..
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: How to add the time in blog view?
@Wolfuryo this is not solved yet as my members tell me that they try to make some posts and some times it's ok and some other it shows the issue again.
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: How to add the time in blog view?
All of the topics in blogs are posted through /h4-page? If so, there shouldn't be any problem.
Guest- Guest
Re: How to add the time in blog view?
No for each page we have different blog. I had:
/h4-page which is for Greece News, /h5-page which is for World News, /h6-page for Sport News and so on. All the hmtl pages starting from /h4 and up are all new topic forms. Now though i have them all directing to /h1-page to avoid all those pages.
/h4-page which is for Greece News, /h5-page which is for World News, /h6-page for Sport News and so on. All the hmtl pages starting from /h4 and up are all new topic forms. Now though i have them all directing to /h1-page to avoid all those pages.
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Page 1 of 2 • 1, 2
Similar topics
» First time creating blog : Questions
» Show time in blog type forum
» How to make the likes display in topics blog list view
» Getting Rid of "current time," "view posts since last visit," etc.
» Difference between the desktop view and the mobile view of layout
» Show time in blog type forum
» How to make the likes display in topics blog list view
» Getting Rid of "current time," "view posts since last visit," etc.
» Difference between the desktop view and the mobile view of layout
Page 1 of 2
Permissions in this forum:
You cannot reply to topics in this forum