zervis Posted February 26, 2017 Share Posted February 26, 2017 Hey, I need a tip to build FB like messaging system: This is my shoutbox. I'm using lazy loading, and it's great for shoutbox, but for messages I'd like to reverse that - message window on the bottom, newest messages on the bottom (with lazy loading). I'm stuck on this one. For shoutbox I'm using: $msg->children("sort=-created, limit=3"); For lazy loading I'm using pagination. It should look like that, but how to limit messages (let's say show 10 newest)? Thanks! Link to comment Share on other sites More sharing options...
LostKobrakai Posted February 27, 2017 Share Posted February 27, 2017 $msg->children("sort=-created, limit=3")->reverse(); Is this what you're looking for? 2 Link to comment Share on other sites More sharing options...
zervis Posted February 27, 2017 Author Share Posted February 27, 2017 2 hours ago, LostKobrakai said: $msg->children("sort=-created, limit=3")->reverse(); Is this what you're looking for? Exactly! Thank You! 1 Link to comment Share on other sites More sharing options...
SamC Posted March 6, 2017 Share Posted March 6, 2017 On 26/02/2017 at 8:17 PM, zervis said: Hey, I need a tip to build FB like messaging system: This is my shoutbox. I'm using lazy loading, and it's great for shoutbox, but for messages I'd like to reverse that - message window on the bottom, newest messages on the bottom (with lazy loading). I'm stuck on this one. Thanks! Did you build this whole thing with processwire or is it an add-on from somewhere? I like the idea of this. Thanks. 1 Link to comment Share on other sites More sharing options...
zervis Posted April 24, 2017 Author Share Posted April 24, 2017 @SamC, I'm using Processwire with INFINITE AJAX SCROLL + semantic-ui. Messaging system is not yet working as I'd like it. I came up with this idea for amigo.today. It's something like tinder, but for social events. User provides age and city name during sign-up, the I'm using Google API to set geolocation based on the city name/street (that can be updated later in profile). There is also age filter (max difference in age), and gender is mixed to not making it dating site. Every event last max for 7 days, after that they vanish. Users can join events, and after that they can review amigo. More recomendations results in bigger green recomendation bar. Leaving opinion without recomendation result in excluding user both ways (they can't see each other events). If there is no events you can always search by tags on the left side (categories) for last active user in that category (created/joined event in that category) and contact that person (and.. messaging system is not yet perfect). Events wall. Event page, host on the left, on the right side participients (1). It looks simple, and works on mobile too. 2 Link to comment Share on other sites More sharing options...
SamC Posted April 24, 2017 Share Posted April 24, 2017 Looks great, thanks for sharing the screenshots Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now