Skip to content

A YOURLS plugin to parse the user-agent and display info about the IP and device.

License

Notifications You must be signed in to change notification settings

SachinSAgrawal/YOURLS-Device-Details

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Device Details Listed in Awesome YOURLS!

A plugin to display information about each click, based on Tacoded's IP Click Details.
Requires Your Own URL Shortener (YOURLS) v1.9.2 and above.

Usage

screenshot

Check it out on my own website: ipgrabber.pro. I use Sleeky's front-end, but the default should work.

Version 1

This plugin uses WhichBrowser's Parser to display IP, user-agent, device, browser, location, and time.

Version 2

In addition to everything in version 1, as promised, this update provides more tracked stats.
Things like device battery, orientation, language, and screen info can be logged with some Javascript.
However, for this to work, the functions.php file needs to be modified, which is not recommended.
In fact, "hacking" core files is essentially banned, but I do not know how to do it otherwise.
My modifications are not anything massive. Feel free to check them out on diffchecker.com if desired.
I have also not really tested this super rigorously, so if you find any bugs, feel free to open an issue!
I'm aware that by using cookies to store the data, the data will always be one click behind.

Version 3

This version is currently in development. The main change is that it does not "hack" core files.
It still has all of the functionality of the previous version with some added features as well.
Firstly, there is a page under manage plugins that allows you to input your own ipinfo.io API token.
Secondly, click data is transferred to the backend with the POST method so it is always accurate.
I will publish it once I have more time to finish programming it but it might take me some time.
If you would like to help me, feel free to open up a new issue as well! I would appreciate any help.

Installation

  1. Install WhichBrowser to the root using composer require whichbrowser/parser.
  2. It is possible that you will have to change the path of vendor/autoload.php.
  3. In /user/plugins, create a new folder named device-details.
  4. Choose what version you want (see the two sections above to decide).
  5. Download the right plugin.php file from this git repo and drop it into step 3's directory.
  6. If you use version 2, make sure to also replace /includes/functions.php with the provided one.
  7. Go to the Plugins admin page (eg. http://sho.rt/admin/plugins.php) and activate it.
  8. Even if the admin area is private, you should make the link stats page public.
  9. Do this by adding define('YOURLS_PRIVATE_INFOS', false); to config.php.

I got a request to make this compatible with the Download Plugin plugin, so I will look more into it. Version 1 should be compatible, although it looks like I need to configure the branches of this repository a little bit differently.

License

This package is licensed under the MIT License.

About

A YOURLS plugin to parse the user-agent and display info about the IP and device.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages