Latest version: 1.6
Edit Weblinks.txt file in addons/sourcemod/configs
// Usage: "trigger/key" "Window size" address
// Window size can be: normal or height=xxx,width=xxx
// Variables: {NAME}, {STEAMID}, {STEAMID64}, {SERVER_IP}, {SERVER_PORT}
// Allow player to logout from WebLinks API (autologin)
"!logout" "normal" https://weblinks.hexa-core.eu/auth/logout
"google" "normal" https://www.google.cz/
"youtube" "normal" https://www.youtube.com/
"tracker" "normal" https://sm.hexa-core.eu/
"!facebook" "height=1010,width=1920" https://facebook.com/
"!test" "normal" "https://domain.com?name={NAME}&steamId={STEAMID}"
"!test2" "normal" "https://domain.com/user/{STEAMID64}"
You can use chat trigger with ! or without "!forum" or just "forum"
"height:1010,width:1920" (comma separated) or default "normal"
CS:GO - use only "normal", because API is different, so you can't change window size.
You can also add variables to url:{NAME},{STEAMID},{STEAMID64},{SERVER_IP},{SERVER_PORT}
Edit WebLinks.cfg file in addons/sourcemod/configs
"WebLinks"
{
"Settings"
{
// Method to identify players request - ip or steamid
"FetchMethod" "ip"
// If request not found redirect to this URL (homepage).
"FallbackUrl" ""
}
}
API use this as key in cache DB to temporary store player request data.
Sometimes is better to use SteamID method, because one IP can be shared with many people. But player must login via Steam, before API can process request.
After the player is logged in, we only store Steam ID in browser as cookie (for 7 days). Player does not need to login via Steam for 7 days.
If players request can't be processed, API redirect player to this URL. So you probably want to redirect player to your domain.
If you want to use default page, leave blank value ("").