Sponsored Content
Top Forums Web Development MySQL Query to Build Mockup Vue.js UserCP Timeline Page Post 303031192 by Neo on Saturday 23rd of February 2019 08:14:35 AM
Old 02-23-2019
MySQL Query to Build Mockup Vue.js UserCP Timeline Page

Here is the query (and some sample results) I plan to use to build a new timeline page in the mockup vue.js usercp I am working on.

When the postid is the same as lastpostid, this means the timeline entry will be - "{{Member}} Started Discussion {{Thread Title}} at {{date and time}}" and when they are different, it means "{{Member}} Posted a Reply in {{Thread Title}} at {{date and time}":

Seem like this will make a nice timeline in the new usercp I'm working on:

Code:
mysql> select post.userid, post.username, thread.title, thread.dateline,post.postid, thread.lastpostid from thread inner join post ON post.threadid = thread.threadid  order by dateline desc limit 30;
+-----------+---------------+--------------------------------------------------------------------------------+------------+-----------+------------+
| userid    | username      | title                                                                          | dateline   | postid    | lastpostid |
+-----------+---------------+--------------------------------------------------------------------------------+------------+-----------+------------+
| 302061468 | newbie_01     | Need help with how to search a file for a variable string and delete that line | 1550899316 | 303031186 |  303031189 |
| 302122047 | RudiC         | Need help with how to search a file for a variable string and delete that line | 1550899316 | 303031189 |  303031189 |
| 302122727 | Don Cragun    | Need help with how to search a file for a variable string and delete that line | 1550899316 | 303031187 |  303031189 |
|         1 | Neo           | Vue.js UserCP Mockup Version 0.20 - Badge Notifications                        | 1550894775 | 303031184 |  303031188 |
|         1 | Neo           | Vue.js UserCP Mockup Version 0.20 - Badge Notifications                        | 1550894775 | 303031185 |  303031188 |
|         1 | Neo           | Vue.js UserCP Mockup Version 0.20 - Badge Notifications                        | 1550894775 | 303031188 |  303031188 |
| 302136317 | wisecracker   | Apple looking to switch to using in-house ARM chips for their HW.              | 1550864937 | 303031180 |  303031180 |
|     41441 | bakunin       | Combining multiple greps                                                       | 1550845443 | 303031164 |  303031191 |
| 302052697 | Scrutinizer   | Combining multiple greps                                                       | 1550845443 | 303031183 |  303031191 |
| 302116191 | MadeInGermany | Combining multiple greps                                                       | 1550845443 | 303031191 |  303031191 |
| 302170346 | stomp         | Combining multiple greps                                                       | 1550845443 | 303031163 |  303031191 |
| 302181753 | Xubuntu56     | Combining multiple greps                                                       | 1550845443 | 303031161 |  303031191 |
| 302181753 | Xubuntu56     | Combining multiple greps                                                       | 1550845443 | 303031177 |  303031191 |
| 302181753 | Xubuntu56     | Combining multiple greps                                                       | 1550845443 | 303031190 |  303031191 |
|     21292 | milhan        | Remove lines ending with a certain character                                   | 1550836350 | 303031150 |  303031157 |
| 302122047 | RudiC         | Remove lines ending with a certain character                                   | 1550836350 | 303031151 |  303031157 |
| 302122047 | RudiC         | Remove lines ending with a certain character                                   | 1550836350 | 303031154 |  303031157 |
| 302122727 | Don Cragun    | Remove lines ending with a certain character                                   | 1550836350 | 303031152 |  303031157 |
| 302122727 | Don Cragun    | Remove lines ending with a certain character                                   | 1550836350 | 303031156 |  303031157 |
| 302180382 | maya3         | Remove lines ending with a certain character                                   | 1550836350 | 303031145 |  303031157 |
| 302180382 | maya3         | Remove lines ending with a certain character                                   | 1550836350 | 303031153 |  303031157 |
| 302180382 | maya3         | Remove lines ending with a certain character                                   | 1550836350 | 303031157 |  303031157 |
|         1 | Neo           | Mtime or the equivalent for HP-UX                                              | 1550808466 | 303031143 |  303031165 |
| 302024200 | drl           | Mtime or the equivalent for HP-UX                                              | 1550808466 | 303031146 |  303031165 |
| 302122047 | RudiC         | Mtime or the equivalent for HP-UX                                              | 1550808466 | 303031144 |  303031165 |
| 302181968 | danielshell   | Mtime or the equivalent for HP-UX                                              | 1550808466 | 303031131 |  303031165 |
| 302181968 | danielshell   | Mtime or the equivalent for HP-UX                                              | 1550808466 | 303031165 |  303031165 |
|         1 | Neo           | Help to remove malware                                                         | 1550784585 | 303031132 |  303031132 |
|     43551 | Corona688     | Help to remove malware                                                         | 1550784585 | 303031117 |  303031132 |
| 302182064 | asoh65        | Help to remove malware                                                         | 1550784585 | 303031113 |  303031132 |
+-----------+---------------+--------------------------------------------------------------------------------+------------+-----------+------------+
30 rows in set (0.00 sec)

 

9 More Discussions You Might Find Interesting

1. What is on Your Mind?

Promotion! Like Our New Facebook Timeline Page for 10,000 Bits!

Hey! We have started a new Forum HQ Facebook "Timeline" page where we plan to create a unix/linux timeline with major milestones for unix/linux, company start up dates for major releases, etc. We are just getting started, so I would like to personally invite you to visit and "Like" our new... (10 Replies)
Discussion started by: Neo
10 Replies

2. Web Development

Vue.js UserCP Mockup Version 0.20 - Badge Notifications

Vue.js UserCP Mockup Version 0.20 - Badge Notifications https://www.unix.com/cp/index.php#/dashboardIn this mockup release: Badge Notifications are working with live data: Upper Right (see image) Added Axios to Vue and changed large table updates to axios (ajax) Note: Will reformat... (2 Replies)
Discussion started by: Neo
2 Replies

3. Web Development

New Discussion Timeline in Vue.js UserCP Mockup

Well, thanks to the amazing power of Vue.js, we now have a new timeline in version 0.23 of the UserCP Mockup: Wow! I'm really impressed with Vue.js. https://www.unix.com/cp/index.php#/pages/timeline In this version: Created database, and PHP model for the remote AJAX (Axios) call to... (1 Reply)
Discussion started by: Neo
1 Replies

4. Web Development

New Badge Timeline in Vue.js UserCP Mockup

Continuing to think Vue.js is AWESOME, we now have a new badges timeline in version 0.26 of the UserCP Mockup: https://www.unix.com/cp/index.php#/pages/badges Changes: Added Mockup from Badges timeline. Changed notifications (upper right) to use v-for: bindings. Fixes minor vue routing... (0 Replies)
Discussion started by: Neo
0 Replies

5. What is on Your Mind?

My Charts in the Prototype Vue.js UserCP

Yea.... something I thought would take me an hour ended up taking most of the day. Well, it's not like those YT video tutorials where it take a week or more to make a video and the guys (gals) make it look so easy. But having said that, I'm happy to share with forum members the first "My... (6 Replies)
Discussion started by: Neo
6 Replies

6. Web Development

Simple Vue.js Component to Redirect to External Web Page Using Vue Router

Vue Router has some quirks and on of the quirks is that it is not reliable when adding external links using the vue-router library. After struggling with many solutions, I have found that creating a simple Vue.js component like this one seems to work the best (so far): Component Example: ... (0 Replies)
Discussion started by: Neo
0 Replies

7. What is on Your Mind?

New UserCP Update Profile Image Page (UserCP Screeching Frog 0.7485)

Update! UserCP Screeching Frog 0.7485 Created a new page for uploaded a profile picture (profile pictures are different than avatar pictures). https://www.unix.com/usercp/#/settings/other https://www.unix.com/members/1-albums225-picture1158.png ... (0 Replies)
Discussion started by: Neo
0 Replies

8. What is on Your Mind?

UserCP Screeching Frog 0.7446 Using Vue.js

Here is a status update on the new forum usercp. The current version of the new UserCP is Screeching Frog v0.7446. Most users will need to clear the files from your browser cache, quit and restart your browser to see the new version (check bottom of the page for version). Safari seems to... (9 Replies)
Discussion started by: Neo
9 Replies

9. What is on Your Mind?

Video Overview of the Vue.js UserCP @UNIX.com

Here is my second live video screencast (in my life, using Camtasia) with voice for the new usercp: Overview of the Vue.js UserCP @UNIX.com Shout outs to Don Cragun, Corona688, Rudi, Wolf, Made in Germany, stomp, Ravinder, Creative Tim, PubNub and others in the video. Thanks. If you are... (1 Reply)
Discussion started by: Neo
1 Replies
All times are GMT -4. The time now is 10:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy