Changeset 2781255
- Timestamp:
- 09/07/2022 10:43:47 AM (4 years ago)
- Location:
- flair-chat
- Files:
-
- 6 added
- 6 deleted
- 6 edited
- 1 copied
-
tags/1.0.5 (copied) (copied from flair-chat/trunk)
-
tags/1.0.5/assets/banner-772x250.gif (added)
-
tags/1.0.5/assets/banner-772x250.png.png (deleted)
-
tags/1.0.5/assets/con-128x128.gif (added)
-
tags/1.0.5/assets/icon-128x128.png (deleted)
-
tags/1.0.5/assets/icon-256x256.gif (added)
-
tags/1.0.5/assets/icon-256x256.png (deleted)
-
tags/1.0.5/flair-chat.php (modified) (2 diffs)
-
tags/1.0.5/readme.md (modified) (3 diffs)
-
tags/1.0.5/readme.txt (modified) (3 diffs)
-
trunk/assets/banner-772x250.gif (added)
-
trunk/assets/banner-772x250.png.png (deleted)
-
trunk/assets/con-128x128.gif (added)
-
trunk/assets/icon-128x128.png (deleted)
-
trunk/assets/icon-256x256.gif (added)
-
trunk/assets/icon-256x256.png (deleted)
-
trunk/flair-chat.php (modified) (2 diffs)
-
trunk/readme.md (modified) (3 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
flair-chat/tags/1.0.5/flair-chat.php
r2779101 r2781255 195 195 } 196 196 197 $user_ids_placeholder = $this->array_items_query_placeholders($user_ids, '%d'); 198 $where_array = array(); 199 $where_array[] = $wpdb->prepare( "to_uid = %d", $current_uid ); 200 $where_array[] = $wpdb->prepare( "from_uid IN ($user_ids_placeholder)", $user_ids ); 201 $sql = "SELECT 197 $unread_messages = null; 198 if ( isset( $user_ids[0] ) ) { 199 $user_ids_placeholder = $this->array_items_query_placeholders($user_ids, '%d'); 200 $where_array = array(); 201 $where_array[] = $wpdb->prepare( "to_uid = %d", $current_uid ); 202 $where_array[] = $wpdb->prepare( "from_uid IN ($user_ids_placeholder)", $user_ids ); 203 $sql = "SELECT 202 204 message, from_uid, to_uid, is_read, 203 205 COUNT(message) … … 206 208 is_read = false AND"; 207 209 208 $sql .= ' ' . join( ' AND ', $where_array); 209 $sql .= ' GROUP BY from_uid'; 210 211 $unread_messages = $wpdb->get_results( $sql ); 210 $sql .= ' ' . join( ' AND ', $where_array); 211 $sql .= ' GROUP BY from_uid'; 212 213 $unread_messages = $wpdb->get_results( $sql ); 214 } 212 215 213 216 if ( $unread_messages ) { -
flair-chat/tags/1.0.5/readme.md
r2779101 r2781255 5 5 - Requires at least: 5.7 6 6 - Tested up to: 6.0 7 - Stable tag: 1.0. 47 - Stable tag: 1.0.5 8 8 - Requires PHP: 7.0 9 9 - License: GPLv2 or later … … 30 30 the form with the right information from step 2 above ie; app_id, key, secret and cluster. 31 31 32 == Frequently Asked Questions == 32 ### SECTIONS 33 * [Frequently Asked Questions](https://wordpress.org/plugins/flair-chat/#faq) 33 34 34 35 == Screenshots == … … 64 65 65 66 Downloaded the vendor items to be included in the 1.0.3 fix above. 67 68 69 = 1.0.5 = 70 71 Fixed count unread issue, when no users were found. -
flair-chat/tags/1.0.5/readme.txt
r2779101 r2781255 5 5 Requires at least: 5.7 6 6 Tested up to: 6.0 7 Stable tag: 1.0. 47 Stable tag: 1.0.5 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 44 44 == Frequently Asked Questions == 45 45 46 = Are messages stored in a DB? Do you use websockets or long polling? = 47 48 Yeah, messages are stored in the DB, and communication to front end via [pusher api](https://pusher.com/) (I think they use we sockets under the hood). 49 50 = Is it for admin & user/subscriber chat, or can any subscriber chat with this tool among them? I mean, a chat like FB chat? = 51 52 With this release (1.0.0), anyone logged in can chat, but I will add an input to select the roles to exclude from chat in the next minor release. 46 53 47 54 == Changelog == … … 66 73 67 74 Downloaded the vendor items to be included in the 1.0.3 fix above. 75 76 77 = 1.0.5 = 78 79 Fixed count unread issue, when no users were found. -
flair-chat/trunk/flair-chat.php
r2779101 r2781255 195 195 } 196 196 197 $user_ids_placeholder = $this->array_items_query_placeholders($user_ids, '%d'); 198 $where_array = array(); 199 $where_array[] = $wpdb->prepare( "to_uid = %d", $current_uid ); 200 $where_array[] = $wpdb->prepare( "from_uid IN ($user_ids_placeholder)", $user_ids ); 201 $sql = "SELECT 197 $unread_messages = null; 198 if ( isset( $user_ids[0] ) ) { 199 $user_ids_placeholder = $this->array_items_query_placeholders($user_ids, '%d'); 200 $where_array = array(); 201 $where_array[] = $wpdb->prepare( "to_uid = %d", $current_uid ); 202 $where_array[] = $wpdb->prepare( "from_uid IN ($user_ids_placeholder)", $user_ids ); 203 $sql = "SELECT 202 204 message, from_uid, to_uid, is_read, 203 205 COUNT(message) … … 206 208 is_read = false AND"; 207 209 208 $sql .= ' ' . join( ' AND ', $where_array); 209 $sql .= ' GROUP BY from_uid'; 210 211 $unread_messages = $wpdb->get_results( $sql ); 210 $sql .= ' ' . join( ' AND ', $where_array); 211 $sql .= ' GROUP BY from_uid'; 212 213 $unread_messages = $wpdb->get_results( $sql ); 214 } 212 215 213 216 if ( $unread_messages ) { -
flair-chat/trunk/readme.md
r2779101 r2781255 5 5 - Requires at least: 5.7 6 6 - Tested up to: 6.0 7 - Stable tag: 1.0. 47 - Stable tag: 1.0.5 8 8 - Requires PHP: 7.0 9 9 - License: GPLv2 or later … … 30 30 the form with the right information from step 2 above ie; app_id, key, secret and cluster. 31 31 32 == Frequently Asked Questions == 32 ### SECTIONS 33 * [Frequently Asked Questions](https://wordpress.org/plugins/flair-chat/#faq) 33 34 34 35 == Screenshots == … … 64 65 65 66 Downloaded the vendor items to be included in the 1.0.3 fix above. 67 68 69 = 1.0.5 = 70 71 Fixed count unread issue, when no users were found. -
flair-chat/trunk/readme.txt
r2779101 r2781255 5 5 Requires at least: 5.7 6 6 Tested up to: 6.0 7 Stable tag: 1.0. 47 Stable tag: 1.0.5 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 44 44 == Frequently Asked Questions == 45 45 46 = Are messages stored in a DB? Do you use websockets or long polling? = 47 48 Yeah, messages are stored in the DB, and communication to front end via [pusher api](https://pusher.com/) (I think they use we sockets under the hood). 49 50 = Is it for admin & user/subscriber chat, or can any subscriber chat with this tool among them? I mean, a chat like FB chat? = 51 52 With this release (1.0.0), anyone logged in can chat, but I will add an input to select the roles to exclude from chat in the next minor release. 46 53 47 54 == Changelog == … … 66 73 67 74 Downloaded the vendor items to be included in the 1.0.3 fix above. 75 76 77 = 1.0.5 = 78 79 Fixed count unread issue, when no users were found.
Note: See TracChangeset
for help on using the changeset viewer.