Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOTD url and php queries after navigating #180

Open
crizztoffer opened this issue Nov 16, 2020 · 0 comments
Open

MOTD url and php queries after navigating #180

crizztoffer opened this issue Nov 16, 2020 · 0 comments

Comments

@crizztoffer
Copy link

crizztoffer commented Nov 16, 2020

Steps to reproduce

  1. Load any motd PHP site with navigation links and print_r($_GET('steamid') or vardump the steamid so it can be seen when first opened.
  2. click a link to another page that also print_r($_GET('steamid') or vardump's the same thing

Expected behavior

%steamid% and %map% only pull on the init and not on page refresh - if it is possible, it should be called for each 'area' of the motd when it is refreshed. I'm investigating how to do this. If a MOTD has multiple pages that can be displayed using a navigation set / menu - the links clicked should also allow the queries to be performed on them as well

Actual behavior

php queries initiate on derma load not on webpage load. - confirmed.

confirmed in:
/addons/ulx/lua/ulx/modules/cl/motdmenu.lua
lines 37-41
"else -- URL
url = string.gsub( url, "%%curmap%%", game.GetMap() )
url = string.gsub( url, "%%steamid%%", steamid )
html:OpenURL( url )
end"

I have a php email script that allows users to send messages to admins through the MOTD. It's done on a contact us link in the MOTD and does function correctly. If I set the MOTD to the contact us page itself, on the initial load of the MOTD the server queries the information and can be pulled from $GET['steamid'] which allows me to format the messages they send to include their persona name. But this value isn't reported on the loading of the contact us page when navigated to from the MOTD menu as it should. So I can't $_POST information from the contact us form which includes their persona name and performs all the actions for relaying the message(s) to admins.

Error(s) in server console, if any

no errors

Error(s) in player's console, if any

no errors

Version

ULib v2.63d (05/12/18)
ULX v3.73d (05/21/18)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants