The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
create a log
#3
Hi @mcharlesworth
Sorry for the slow response. This one took a bit of coding. I basically just made you an example that you can modify as needed.

This is patch.php - it goes in your root and gets run once. It adds the needed column to your users table and adds a sample log table.
https://pastebin.com/TUByXJRC

The contents of this file go in usersc/includes/head_tags.php
https://pastebin.com/BDbKwFs8

Note that this is what deals with seeing if it's been too long and they need to reup their location. I have it currently set to 2 mins, but you can change it as needed.
You can also do all sort of checks in there, like if you don't want admins to do it, you can do something like
if (!hasPerm([2],$user->data()->id)){ //around the whole thing

Finally is location.php, which is where they get redirected to update their info. You'll obviously have to personalize that however you want it, I just got the form working so you can see what needs to happen.

This is location.php
https://pastebin.com/EMgPveeE

Hope that helps.
  Reply


Messages In This Thread
create a log - by mcharlesworth - 10-04-2018, 04:12 PM
RE: create a log - by jcarter - 10-06-2018, 11:27 PM
RE: create a log - by mudmin - 10-10-2018, 10:05 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)