![]() |
how to make an activity list with php
I am trying to make an activity list sidebar wth php and sql and I have been trying to find a solution for days now....
I would like for it to contain the same content as the activity stream(activity.php) could anyone advise me on how to structure a query to retrieve activity stream info with the respective format so that I can echo it dynamically in a while or foreach loop. Thanks a ton in advance |
Are you wanting to create a new forum block to contain this information?
I would begin with a query of the "activitystream" table, sorting by dateline in descending order, so that the newest activity is listed first. You will likely want to limit the result to a maximum number of rows. Then, within a while loop that retrieves each row from the returned array, I would use a switch statement on the typeid to determine which table needs to be queried to get the desired content and base the format of that activity accordingly. |
Where is the serialized format of each activity type located....eg the text that goes with the values retrieved from the activity stream to make complete sentances?
Thanks |
1 Attachment(s)
Your "activitystreamtype" table should look like this:
https://vborg.vbsupport.ru/attachmen...1&d=1451596547 So, when you are retrieving the rows returned by the query of the "activitystream" table, you can base your actions on the "typeid" column. This will indicate which table you need to query to get the content for that activity item. |
Thanks for the reply Mark
Additionally : How would I add an event to activity? Thanks |
Quote:
|
Quote:
I thought I had seen an article on this, but I couldn't find it right now |
Quote:
etc. |
All times are GMT. The time now is 02:01 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|