Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
[Mod] Who's Where Improvement
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2011-10-28 22:49:18
in thory it should, i personally like the old style once its changed to pickup more pages hehe
Unknown User
2011-10-28 22:54:39
You need to declare $ip if u want this to work as its not defined which will lead to people having no ip's stored.
Unknown User
2011-10-29 03:30:46
what do you mean to declare $ip

how to change in first post to insert in my tracker?
Unknown User
2011-10-29 03:45:27
I mean if your going to use this mod you can see by the original code in first post

function where ($where, $userid, $update=1){

if (!is_valid_id($userid))

die;



if(empty($where))

$where = "Unknown Location...";



if ($update)

SQL_Query_exec("UPDATE users SET last_access='" . get_date_time() . "', ip=".sqlesc($ip).", page=".sqlesc($where)." WHERE id=" . $userid);



if (!$update){

return $where;

}else{

return;

}

}


Where is $ip defined?

You need to change $ip to getip()
Unknown User
2011-10-29 04:21:06
ok thanks
Unknown User
2012-01-30 17:14:14
sorry guys ive not been around or i would have fixed any issues, il update the first post with the fixes that have been discussed and il double checkit all works over the next couple of days, sorry for not being around ive had alot of work on
Unknown User
2012-11-23 15:41:03
as you see in attach i dont see what page see the member, how to fix it?

seed.png
seed.png
Unknown User
2012-11-25 00:34:20
update the where function in backend/functions.php
Unknown User
2012-11-25 05:53:28
hi,

you can just use the $_SERVER["script_name"]  var,

and then you will get all pages names your users visit, so just code a few lines and update the $where.

its really simple to code, so you will get a really complete function, not only a few pages names visited, but all pages names.

quite esasy, google search after : $_SERVER["script_name"]  ... search is an awesome feature ... lol ...
Unknown User
2012-11-25 06:46:52
"mostvotedplaya, post: 86905":
update the where function in backend/functions.php
ihave the where function



function where ($scriptname = "index", $userid, $update=1){

if (!is_valid_id($userid))

die;

if (preg_match("/torrents-details/i", $scriptname))

$where = "Browsing Torrents Details (ID: $_GET[id])...";

elseif (preg_match("/torrents.php/i", $scriptname))

$where = "Browsing Torrents...";

elseif (preg_match("/account-details/i", $scriptname))

$where = "Browsing Account Details (ID: $_GET[id])...";

elseif (preg_match("/torrents-upload/i", $scriptname))

$where = "Uploading Torrent..";

elseif (preg_match("/account/i", $scriptname))

$where = "Browsing User Control Panel...";

elseif (preg_match("/torrents-search/i", $scriptname))

$where = "Searching Torrents...";

elseif (preg_match("/forums/i", $scriptname))

$where = "Browsing Forums...";

elseif (preg_match("/index/i", $scriptname))

$where = "Browsing Homepage...";

else

$where = "Unknown Location...";

if ($update) {

$query = sprintf("UPDATE users SET page=".sqlesc($where)." WHERE id ='%s'", mysql_real_escape_string($userid));

$result = SQL_Query_exec($query);

}

return $where;

}


[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6248"]functions.php[/url]
functions.php
Download
Unknown User
2012-11-25 12:04:07
You need to keep adding like



elseif (preg_match("/faq/i", $scriptname))

   $where = "Browsing FAQ...";



Say under $where but leave that last else...
Unknown User
2012-11-25 14:37:24
somewhere else i had the below code from arcticwolf. is it ok?



function where ($scriptname = "index", $userid, $update=1){

   if (!is_valid_id($userid))

   die;

$where = str_replace($_SERVER["DOCUMENT_ROOT"], null, $_SERVER["SCRIPT_FILENAME"]);

   if (preg_match("/account-details/i", $scriptname))

   $where = "Browsing Account Details...";

   elseif (preg_match("/account/i", $scriptname))

   $where = "Browsing User Control Panel...";

   elseif (preg_match("/forums/i", $scriptname))

   $where = "Browsing Forums...";

   elseif (preg_match("/index/i", $scriptname))

   $where = "Browsing Homepage...";

   else

   $where = "Unknown Location...";

   if ($update) {

   $query = sprintf("UPDATE users SET page=".sqlesc($where)." WHERE id ='%s'", mysql_real_escape_string($userid));

   $result = SQL_Query_exec($query);

   }

   return $where;

}

function where22($scriptname = "index", $userid, $update = 1, $title)

{

   if (!is_valid_id($userid))

   die;

   if (preg_match("/torrents-details/i", $scriptname)) {

   if (is_valid_id($_GET['id'])) {

   $res = SQL_Query_exec("SELECT `name` FROM `torrents` WHERE `id` = '" . $_GET['id'] . "'");

   $row = mysql_fetch_assoc($res);

   }

   $where = "Browsing Torrents Details (" . ($row ? $row['name'] : "ID: $_GET[id]") . ")...";

   } elseif (preg_match("/torrents.php/i", $scriptname)) {

   $where = "Browsing Torrents";

   } elseif (preg_match("/staff.php/i", $scriptname)) {

   $where = "Staff Page";

   } elseif (preg_match("/download.php/i", $scriptname)) {

   if (is_valid_id($_GET['id'])) {

   $res = SQL_Query_exec("SELECT `name` FROM `torrents` WHERE `id` = '" . $_GET['id'] . "'");

   $row = mysql_fetch_assoc($res);

   }

   $where = "Downloading Torrent (" . ($row ? $row['name'] : "ID: $_GET[id]") . ")...";

   } elseif (preg_match("/download_rss.php/i", $scriptname)) {

   if (is_valid_id($_GET['id'])) {

   $res = SQL_Query_exec("SELECT `name` FROM `torrents` WHERE `id` = '" . $_GET['id'] . "'");

   $row = mysql_fetch_assoc($res);

   }

   $where = "Rss Downloading (" . ($row ? $row['name'] : "ID: $_GET[id]") . ")...";

   } elseif (preg_match("/account-details/i", $scriptname)) {

   if (is_valid_id($_GET['id'])) {

   $res = SQL_Query_exec("SELECT `username` FROM `users` WHERE `id` = '" . $_GET['id'] . "'");

   $row = mysql_fetch_assoc($res);

   }

   $where = "Browsing Account Details (" . ($row ? $row['username'] : "ID: $_GET[id]") . ")...";

   } elseif (preg_match("/torrents-upload/i", $scriptname)) {

   $where = "Uploading Torrent..";

   } elseif (preg_match("/account/i", $scriptname)) {

   $where = "Browsing User Control Panel";

   } elseif (preg_match("/torrents-edit.php/i", $scriptname)) {

   if (is_valid_id($_GET['id'])) {

   $res = SQL_Query_exec("SELECT `name` FROM `torrents` WHERE `id` = '" . $_GET['id'] . "'");

   $row = mysql_fetch_assoc($res);

   }

   $where = "Edited An Torrent (" . ($row ? $row['name'] : "ID: $_GET[id]") . ")...";

   } elseif (preg_match("/torrents-search/i", $scriptname)) {

   $where = "Searching Torrents";

   } elseif (preg_match("/forums/i", $scriptname)) {

   $forumid = $_GET[topicid];

   if ($forumid > 0) {

   $res_forumid = SQL_Query_exec("SELECT subject FROM forum_topics WHERE id=$forumid");

   $row_forumid = mysql_fetch_row($res_forumid);

   $forumname = $row_forumid[0];

   $smallname3 = substr(htmlspecialchars($forumname), 0, 40);

   $where = "Browsing Forums (Topic: $smallname3)";

   } else {

   $where = "Browsing Forums";

   }

   } elseif (preg_match("/index/i", $scriptname)) {

   $where = "Browsing Homepage";

   } else {

   if ($title)

   $where = $title;

   else

   $where = str_replace($_SERVER["DOCUMENT_ROOT"], null, $_SERVER["SCRIPT_FILENAME"]);

   }

   if ($update) {

   $ip = getip();

   $query = sprintf("UPDATE users SET last_access=" . sqlesc(get_date_time()) . ", ip=" . sqlesc($ip) . ", page=" . sqlesc($where) . " WHERE id ='%s'", mysql_real_escape_string($userid));

   $result = SQL_Query_exec($query);

   }

   return $where;

}

2012-11-25 16:13:32
Big thanks you "" Mythos  :)  :D


Unknown User
2012-11-28 10:58:19
Thanks for the code Mythos

I added this ArcticWolf code to and it works great...
2012-11-29 22:00:30
Im using the code from the first post in this thread. Im trying to figure out why everyone had problems with it or said it dont work!? It seems to work fine, unless I am missing something. Is there something NOT correct about that code in the first post?
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728