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.

How to add the time in blog view?

3 posters

Page 1 of 2 1, 2  Next

Go down

Solved How to add the time in blog view?

Post by TheCrow 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!


How to add the time in blog view? Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: How to add the time in blog view?

Post by Guest 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
Guest
Guest


Back to top Go down

Solved Re: How to add the time in blog view?

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

Also there is a current time button in the editor.


How to add the time in blog view? Slgray10

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

Male Posts : 51572
Reputation : 3525
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: How to add the time in blog view?

Post by Guest 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
Guest
Guest


Back to top Go down

Solved Re: How to add the time in blog view?

Post by TheCrow 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.


How to add the time in blog view? Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: How to add the time in blog view?

Post by TheCrow July 19th 2017, 10:57 am

Bump.


How to add the time in blog view? Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: How to add the time in blog view?

Post by Guest 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
Guest
Guest


Back to top Go down

Solved Re: How to add the time in blog view?

Post by TheCrow 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.


How to add the time in blog view? Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: How to add the time in blog view?

Post by TheCrow July 20th 2017, 10:59 pm

Bump.


How to add the time in blog view? Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: How to add the time in blog view?

Post by Van-Helsing 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>
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How to add the time in blog view?

Post by TheCrow 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


How to add the time in blog view? Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: How to add the time in blog view?

Post by Van-Helsing 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.
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How to add the time in blog view?

Post by TheCrow July 24th 2017, 2:30 am

Bump


How to add the time in blog view? Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: How to add the time in blog view?

Post by Guest 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
Guest
Guest


Back to top Go down

Solved Re: How to add the time in blog view?

Post by TheCrow July 25th 2017, 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.


How to add the time in blog view? Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: How to add the time in blog view?

Post by Van-Helsing July 25th 2017, 10:22 pm

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

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How to add the time in blog view?

Post by TheCrow July 25th 2017, 11:25 pm

Yes i have..


How to add the time in blog view? Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: How to add the time in blog view?

Post by Van-Helsing July 25th 2017, 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?
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How to add the time in blog view?

Post by TheCrow July 25th 2017, 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


How to add the time in blog view? Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: How to add the time in blog view?

Post by Guest July 26th 2017, 6:49 pm

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:
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..
avatar
Guest
Guest


Back to top Go down

Solved Re: How to add the time in blog view?

Post by Van-Helsing July 26th 2017, 10:04 pm

Hello @Luffy,
Can you post your forum link to try debug your javascript?
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How to add the time in blog view?

Post by TheCrow July 27th 2017, 10:52 am

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..


How to add the time in blog view? Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: How to add the time in blog view?

Post by Guest July 27th 2017, 4:17 pm

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.
avatar
Guest
Guest


Back to top Go down

Solved Re: How to add the time in blog view?

Post by TheCrow July 28th 2017, 12:55 am

@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


How to add the time in blog view? Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: How to add the time in blog view?

Post by Guest July 28th 2017, 6:57 am

It should be solved now, @Luffy.
avatar
Guest
Guest


Back to top Go down

Solved Re: How to add the time in blog view?

Post by TheCrow July 28th 2017, 12:12 pm

@Wolfuryo, the edits you did for /h4-page is now the problem because now we cannot make any new posts now..


How to add the time in blog view? Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: How to add the time in blog view?

Post by Guest July 28th 2017, 12:20 pm

Hi again,

The problem should be fixed now.
avatar
Guest
Guest


Back to top Go down

Solved Re: How to add the time in blog view?

Post by TheCrow July 29th 2017, 11:52 am

@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.


How to add the time in blog view? Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: How to add the time in blog view?

Post by Guest July 29th 2017, 12:52 pm

All of the topics in blogs are posted through /h4-page? If so, there shouldn't be any problem.
avatar
Guest
Guest


Back to top Go down

Solved Re: How to add the time in blog view?

Post by TheCrow July 30th 2017, 12:01 am

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.


How to add the time in blog view? Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Page 1 of 2 1, 2  Next

Back to top

- Similar topics

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