Jump to content

PilotLogins_V1.0 (UN-SUPPORTED)


Kyle
Message added by Kyle

WARNING: This module is no longer supported from the developer as the developer is shifting their focus on phpVMS v4 Addons.

Recommended Posts

  • Moderators

Yeah I did,

I'm not sure what is going on,

But the error seems to tell me that you don't have the data class file uploaded to your common folder. Maybe try redownloading it and upload the files again and see what happens. Maybe a faulty download. . .

van i have 1 question suggestion.curently every logg in is show would it be possible to filter it (same ip,...)as for now i have about 15 logins from some pilots who use home,work,laptop,cell,... to look at our website

hey joeri, I would have to update the module to filter it. But the login action is recorded every time you log on.

Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...

In order to not have to worry about overwriting your admin core_navigation.tpl during updates and having to rewrite the code again you can put this code in the PilotLogins.php above public function index (line 26)

public function navbar()
{
if(PilotGroups::group_has_perm(Auth::$usergroups, FULL_ADMIN))
{
echo '<li><a href="'.SITE_URL.'/admin/index.php/PilotLogins/">View All Pilot Logins</a></li>';
}
}

This will put the link under the 'Addons' bar in the Admin Center

Edited by Kyle (Vansers)
Please put the php codes in code tags.
Link to comment
Share on other sites

  • Moderators

In order to not have to worry about overwriting your admin core_navigation.tpl during updates and having to rewrite the code again you can put this code in the PilotLogins.php above public function index (line 26)

public function navbar()

{

if(PilotGroups::group_has_perm(Auth::$usergroups, FULL_ADMIN))

{

echo '<li><a href="'.SITE_URL.'/admin/index.php/PilotLogins/">View All Pilot Logins</a></li>';

}

}

This will put the link under the 'Addons' bar in the Admin Center

Ekkk!!!

I almost forgot to put it in the update! I'll fix that right away.

Thanks!

Link to comment
Share on other sites

  • Moderators

There was a table changes.

If the table "phpvms_pilotlogins" is that. Then run this query in phpMyAdmin to change the database table title. Be sure your in your phpVMS database and run that SQL Query.

RENAME TABLE phpvms_pilotlogins TO pilotlogins

Link to comment
Share on other sites

  • Moderators

Do me a favour...

Go to core/common/PilotLoginData.class.php and go to line 21-24

See if these lines are the same to this code?

 $sql = 'SELECT l.*, p.*
   FROM pilotlogins l
   LEFT JOIN pilots p ON p.pilotid = l.pilotid
   ';

If not, then remove the following lines and put the one as I posted the code.

Link to comment
Share on other sites

  • Moderators

Okay, found the bug. Why the heck did I remove the table prefix from the SQL? LOL.

Go to core/common/PilotLoginData.class.php and go to line 21-24 - find the code...

 $sql = 'SELECT l.*, p.*
FROM pilotlogins l
LEFT JOIN pilots p ON p.pilotid = l.pilotid
';

And replace with that new code....

 $sql = 'SELECT l.*, p.*
FROM pilotlogins l
LEFT JOIN '.TABLE_PREFIX.'pilots p ON p.pilotid = l.pilotid
';

That should fix the issue.

Will release a new build in a sec.

Link to comment
Share on other sites

Sorry to keep bugging you Kyle, but the pilot login history isn't working. It shows up, but it displays 'the pilot has not logged in yet' . I've looked at this several ways and i'm stuck. also, is there a way we could select how many in the history to display?

Another feature request: Add a last login date field to pilots_list.tpl

Link to comment
Share on other sites

  • 1 year later...
  • 3 weeks later...
  • 1 year later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...