|
| 1 | +# Configurations |
| 2 | + |
| 3 | +In v1.1. The AddChat database settings are moved to the `addchat` config file. You can find in your application `config/addchat.php`. |
| 4 | + |
| 5 | + |
| 6 | +- [Brand Identity](#Brand-Identity) |
| 7 | +- [Upload Path](#Upload-Path) |
| 8 | +- [Users Table](#Users-Table) |
| 9 | +- [Super Admin](#Super-Admin) |
| 10 | +- [User Groups Table](#User-Groups-Table) |
| 11 | +- [Guest Mode](#Guest-Mode) |
| 12 | +- [Customize Default Behaviour](#Customize-Default-Behaviour) |
| 13 | +- [Pagination](#Pagination) |
| 14 | +- [Include/Exclude URLs](#Include-Exclude-URLs) |
| 15 | +- [Notification Type](#Notification-Type) |
| 16 | +- [AddChat Migrations](#AddChat-Migrations) |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +<a name="Brand-Identity"></a> |
| 21 | +## Brand Identity |
| 22 | + |
| 23 | +Add your website identity & branding to the AddChat widget. These changes are for the AddChat widget only and have nothing to do with the main website. |
| 24 | + |
| 25 | + |
| 26 | +|Setting Name|Type|Default|Description| |
| 27 | +|:-|:-| |
| 28 | +|widget_name|`required`|AddChat Laravel Pro|Brand/Website name| |
| 29 | +|widget_logo|`required`|`addchat/img/addchat-logo-white.png`|Logo for AddChat widget and admin panel| |
| 30 | +|widget_icon|`required`|`addchat/img/addchat-shadow.png`|Logo for the widget icon| |
| 31 | +|widget_user_avatar|`required`|`addchat/img/avatar.png`|Images placeholder| |
| 32 | +|widget_notify_sound|`required`|`addchat/sound/notification.mp3`|Notification sound| |
| 33 | +|widget_footer_text|`optional`|`AddChat | by Classiebit`|Give chat widget your own brand name| |
| 34 | +|widget_footer_url|`optional`|`https://classiebit.com/addchat-laravel-pro`|Brand website URL| |
| 35 | + |
| 36 | + |
| 37 | +<a name="Upload-Path"></a> |
| 38 | +## Upload Path |
| 39 | + |
| 40 | +AddChat uploads User profile pics & Messages attachments in `storage/public` folder. |
| 41 | + |
| 42 | + |
| 43 | +|Setting Name|Type|Default|Description| |
| 44 | +|:-|:-| |
| 45 | +|upload_path|`required`|addchat|Profile pics & message attachments uploading path| |
| 46 | + |
| 47 | + |
| 48 | +<a name="Users-Table"></a> |
| 49 | +## Users Table |
| 50 | + |
| 51 | +AddChat fetches your website's existing users from the **users** table. If your **users** table and it's **user-id** & **email** column names are different, then you can add them below. |
| 52 | + |
| 53 | +|Setting Name|Type|Default|Description| |
| 54 | +|:-|:-| |
| 55 | +|users_table|`required`|`users`|Users table name| |
| 56 | +|users_col_id|`required`|`id`|Users table column name of id| |
| 57 | +|users_col_email|`required`|`email`|Users table column name of email| |
| 58 | + |
| 59 | + |
| 60 | +>{success} AddChat never modify any data the `users` table and never read the `password` or any other sensitive column except `user id` and `email` |
| 61 | +
|
| 62 | +--- |
| 63 | + |
| 64 | + |
| 65 | +<a name="Super-Admin"></a> |
| 66 | +## Super Admin |
| 67 | + |
| 68 | +As of now, AddChat can have only one **Super Admin** (will make it to multiple Admins in upcoming versions). |
| 69 | + |
| 70 | +|Setting Name|Type|Default|Description| |
| 71 | +|:-|:-| |
| 72 | +|admin_user_id|`required`|`1`|Default Super Admin is the User with User-id = 1| |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | +<a name="User-Groups-Table"></a> |
| 77 | +## User Groups/Roles Table |
| 78 | + |
| 79 | +To enable the AddChat multi-user groups feature. Your website database must have a User-Groups table and a pivot table that connects Users to a group. AddChat also supports a user belongs to multiple groups. Just mention those tables' names below. |
| 80 | + |
| 81 | +--- |
| 82 | + |
| 83 | +>{primary} Please read **[User Groups](/{{route}}/{{version}}/features/user-groups)** for more info about `Groups` Function |
| 84 | +
|
| 85 | +--- |
| 86 | + |
| 87 | +Enter `groups` table name and columns name, so that AddChat can fetch & use your existing user groups. |
| 88 | + |
| 89 | +--- |
| 90 | + |
| 91 | +>{success} AddChat never modify any data in the `groups` table and never assign any `group` to any `user` |
| 92 | +
|
| 93 | +--- |
| 94 | + |
| 95 | +>{info} This feature is optional if you don't wanna enable User groups feature, keep the below configurations `NULL |
| 96 | +
|
| 97 | +--- |
| 98 | + |
| 99 | +|Setting Name|Type|Default|Description| |
| 100 | +|:-|:-| |
| 101 | +|groups_table|`optional`|`NULL`|User-groups table name e.g `groups` or `roles`| |
| 102 | +|groups_col_id|`string`|`NULL`|User-groups table column name of id| |
| 103 | +|groups_col_name|`string`|`NULL`|User-groups table column name of group name/title| |
| 104 | +|ug_table|`string`|`NULL`|User-groups pivot table name e. `users_groups` or `users_roles`| |
| 105 | +|ug_col_user_id|`string`|`NULL`|User-groups pivot table column name of user-id| |
| 106 | +|ug_col_group_id|`string`|`NULL`|User-groups pivot table column name of group-id e.g `group_id` or `role_id` | |
| 107 | + |
| 108 | +--- |
| 109 | + |
| 110 | + |
| 111 | +<a name="Guest-Mode"></a> |
| 112 | +## Guest Mode |
| 113 | + |
| 114 | +Guest mode allows your website visitors to use the AddChat widget to send messages without signup or login. As like Chat support. |
| 115 | + |
| 116 | +--- |
| 117 | + |
| 118 | +>{primary} Please read **[Customer Support](/{{route}}/{{version}}/features/customer-support)** section for more info about `Guest Mode`. |
| 119 | +
|
| 120 | +--- |
| 121 | + |
| 122 | +>{info} This feature is optional if you don't wanna enable Guest mode feature, keep the below configuration `NULL |
| 123 | +
|
| 124 | +--- |
| 125 | + |
| 126 | +Enter `Guest/Support Group` id (value), the group who chats with the `Guests` (the users who are not registered or logged in into your website). |
| 127 | +To enable guest mode, AddChat only requires a User Group which will chat with the guests. You can create a separate User Group and add that group's id. |
| 128 | + |
| 129 | + |
| 130 | +|Setting Name|Type|Default|Description| |
| 131 | +|:-|:-| |
| 132 | +|guest_group_id|`optional`|`NULL`|Guest/Support Group id e.g `8`| |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | +<a name="Customize-Default-Behaviour"></a> |
| 137 | +## Customize Default Behaviour |
| 138 | + |
| 139 | +|Setting Name|Type|Default|Description| |
| 140 | +|:-|:-| |
| 141 | +|hide_email|`TRUE/FALSE`|`FALSE`|Whether to show users email in throughout the widget| |
| 142 | +|enter_send|`TRUE/FALSE`|`TRUE`|Whether to send a message on pressing Enter| |
| 143 | +|open_chat_on_notification|`TRUE/FALSE`|`FALSE`|Whether to automatically open user chat window when a new message arrives.| |
| 144 | + |
| 145 | + |
| 146 | + |
| 147 | +<a name="Pagination"></a> |
| 148 | +## Pagination |
| 149 | + |
| 150 | +Set AddChat widget global pagination limit. |
| 151 | + |
| 152 | +--- |
| 153 | + |
| 154 | +>{warning} Greater value = More loading time |
| 155 | +
|
| 156 | +--- |
| 157 | + |
| 158 | +|Setting Name|Type|Default|Description| |
| 159 | +|:-|:-| |
| 160 | +|pagination_limit|`required|Greater than 0`|`5`|The total number of records to be fetched from the database at a single time| |
| 161 | + |
| 162 | + |
| 163 | + |
| 164 | +<a name="Include-Exclude-URLs"></a> |
| 165 | +## Include/Exclude URLs |
| 166 | + |
| 167 | +Control whether to show or not to show AddChat widget on specific URLs |
| 168 | + |
| 169 | +--- |
| 170 | + |
| 171 | +>{primary} Please read **[User Groups](/{{route}}/{{version}}/features/include-exclude-urls)** for more info. |
| 172 | +
|
| 173 | +--- |
| 174 | + |
| 175 | + |
| 176 | +|Setting Name|Type|Default|Description| |
| 177 | +|:-|:-| |
| 178 | +|include_url|`optional`|`array()`|Show AddChat widget only on these URLs.| |
| 179 | +|exclude_url|`optional`|`array()`|Hide AddChat widget only on these URLs.| |
| 180 | + |
| 181 | + |
| 182 | +<a name="Notification-Type"></a> |
| 183 | +## Notification Type |
| 184 | + |
| 185 | +By default, AddChat works on a custom internal real-time notification system build with VueJs. |
| 186 | + |
| 187 | +--- |
| 188 | + |
| 189 | +>{primary} Please read **[Realtime Notifications](/{{route}}/{{version}}/features/realtime-notifications)** for more info. |
| 190 | +
|
| 191 | +--- |
| 192 | + |
| 193 | +AddChat comes with integrated Pusher service. To switch to Pusher real-time notifications, add the Pusher API credentials and change notification_type to `pusher` |
| 194 | + |
| 195 | + |
| 196 | +|Setting Name|Type|Default|Description| |
| 197 | +|:-|:-| |
| 198 | +|notification_type|`internal/pusher`|`internal`|switch between notification systems| |
| 199 | +|pusher_app_id|`optional`|`NULL`|Pusher App id| |
| 200 | +|pusher_key|`optional`|`NULL`|Pusher key| |
| 201 | +|pusher_secret|`optional`|`NULL`|Pusher secret| |
| 202 | +|pusher_cluster|`optional`|`NULL`|Pusher cluster| |
| 203 | + |
| 204 | + |
| 205 | +<a name="AddChat-Migrations"></a> |
| 206 | +## AddChat Migrations |
| 207 | + |
| 208 | +Whether to autoload AddChat migrations. |
| 209 | + |
| 210 | +* Default is TRUE (enabled) RECOMMENDED |
| 211 | + |
| 212 | +When enabled, AddChat migrations managed automatically on running migration command. AddChat migrations will autorun even when updating to a new AddChat version. When updating AddChat, AddChat migrations will auto-run on running migration command and it'll update it's database tables without losing or modifying existing data in DB. |
| 213 | + |
| 214 | + |
| 215 | +* If it's FALSE (disabled) |
| 216 | + |
| 217 | +You'll need to copy AddChat migrations files to your app migrations folder. Then, you can manage the migration files yourself. This will be the case when you're customizing the AddChat on your own. |
| 218 | + |
0 commit comments