Simple Ajax Chat Pro (SAC Pro) provides fine-grained control over user URLs. For example, you can enable users to choose their own website URLs. Or, for logged-in users, you can use the registered “website” URL, or even the URL of the user’s WP Profile page. This tutorial explains the default options for user URLs, and shows how to customize the options for any SAC Pro chat forms.
Setting the User URL
The User URL option determines how SAC Pro handles user URLs. You can let the user enter their own URL. Or, for logged-in users, you can set the URL to be the user’s profile website, front-end archive page, or link to the user’s profile screen. You can also choose to disable the user URL, so chat names never will be linked, but rather displayed as text.
To set the default (global) option for user URL, visit the SAC Pro settings ▸ General ▸ “User URL”.
To set the user URL for a specific form, add the user_url
attribute to the [sacpro]
shortcode:
[sacpro form_id="123" user_url="user_defined"]
Possible values for the user_url
attribute:
- user_defined — lets the user enter their own URL
- profile_url — use the “Website” URL from the user’s Profile (requires user to be logged in)
- edit_url — link to the user’s Profile page (requires user to be logged in)
- archive_url — link to the user’s Post Archive on the front end (requires user to be logged in)
- disable_url — do not link any chat names (names displayed as plain text)
More attributes to customize your chat forms can be found in the SAC Pro shortcode reference.
Notes on user URLs
When URLs are enabled as user-defined, the chat form will include a “URL” field. For any of the other options, the URL field is hidden and not displayed to the user. User URLs are used to make hyperlinks out of chat names displayed in the chat box. So you can get the URL of any chat user by hovering over their name (next to their message in the chat box). Or if you hover over a user name and it’s not a link, that means no URL is defined for the user.
Here are some tables to help visualize how user URLs work depending on whether or not the user is logged in to your WordPress site.
When the user is logged in
Value of user_url |
Displayed user URL |
---|---|
user_defined |
User defines their own URL |
profile_url |
URL entered in the “Website” setting on the user’s WP Profile page |
edit_url |
URL of the user’s WP Profile page |
archive_url |
URL of the user’s Post Archive page on the front end |
disable_url |
Disables the user URL field, no chat names are linked |
When the user is NOT logged in
Value of user_url |
Displayed user URL |
---|---|
user_defined , profile_url , edit_url , archive_url |
User defines their own URL |
disable_url |
Disables the user URL field, no chat names are linked |