Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Keeping users safe

Featured Replies

  • Management Team
  • Popular Post

I've begun flagging plugins and/or other modifications which do any of the following:

  • Automatically update from your server (as in; download a binary and run it/or replace)
  • Use an .exe based setup program to download and install your plugin for the first time. (and you distribute only a launcher)

This doesn't include:

  • Plugins which ship as an executable (for example, a setup program), provided they do not go online to download binaries of any sort.
  • Plugins which check for updates against a remote server, but do not automatically download & install them (redirecting them to your website or LCPDFR.com to download is fine)

Plugins which exhibit behavior we are flagging will see the following warning at the very top of the file page.

Caution! This file contains automatic update components and/or downloads initially from an off-site server which cannot be verified by our staff as clean. We are not responsible for any damages caused.

This is mostly based from concerns aired from both staff and users.

I like to think when users download from LCPDFR.com they feel secure and protected. If we are unable to guarantee their safety, as we cannot verify external servers, I'd like to tell users so they can make an informed decision before downloading something that we, ourselves, are unable to verify.

If anybody has any questions, problems or issues with this, please leave a comment or private message me.

No problems here, but I've got a question that sort of relates.

Is there any appetite to build some sort of mechanism into LCPDFR.com to check for updates to a plugin? (Not to download updates, but to simply check if there is a newer version available, and direct the user to download it themselves)

I am not inclined whatsoever to set up and maintain an external server for something so minor, which is why I have not done anything like this yet. But if I could make a web request on startup that would make an API call to LCPDFR.com, I'd be for it.

Not a high priority at all, since most players check regularly for updates to plugins, and its not something so crucial that people must have an update whenever its released. Maybe something that goes on the list of "things to be added sometime between now and later".

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

  • Author
  • Management Team
6 hours ago, Stealth22 said:

No problems here, but I've got a question that sort of relates.

Is there any appetite to build some sort of mechanism into LCPDFR.com to check for updates to a plugin? (Not to download updates, but to simply check if there is a newer version available, and direct the user to download it themselves)

I am not inclined whatsoever to set up and maintain an external server for something so minor, which is why I have not done anything like this yet. But if I could make a web request on startup that would make an API call to LCPDFR.com, I'd be for it.

Not a high priority at all, since most players check regularly for updates to plugins, and its not something so crucial that people must have an update whenever its released. Maybe something that goes on the list of "things to be added sometime between now and later".

I'm making a lot of changes to the downloads section right now, and that's certainly something that seems small enough to pull off in the next update.

2 hours ago, Cyan said:

I'm making a lot of changes to the downloads section right now, and that's certainly something that seems small enough to pull off in the next update.

Thanks...like I said, its not a high priority at all. Whenever you have a chance, there's no rush.

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

  • 2 weeks later...
  • Author
  • Management Team
On 11/11/2015, 8:19:07, Albo1125 said:

My Plugins currently check their version to the version in an xml file from my server. If the version in the xml file is newer, they're notified of an update and are offered to do so. 

I assume this falls within the boundaries of not getting one of those messages at the top of my download pages? 

And if this could be built into the API, even better :) 

Provided that your plugin doesn't download and automatically run or replace executables, that is fine. You can open up a browser tab to go to somewhere to download the new version (your site, or lcpdfr.com, it doesn't really matter).

@Stealth22

I've implemented this to a basic level. You can now query the following URL:
http://www.lcpdfr.com/applications/downloadsng/interface/api.php?do=checkForUpdates&fileId=8082
And it will return a JSON object with version and pageUrl. Version will equal to the current version of the file, exactly as specified in the file manager. pageUrl will equal the URL to the file's page on LCPDFR.com.
If you just want a text string with the latest version, you can call the following URL instead:
http://www.lcpdfr.com/applications/downloadsng/interface/api.php?do=checkForUpdates&fileId=8082&textOnly=1
Note that there may be up to a 30 minute delay between updating the file and the above showing the new version, due to caching.

If anyone else wants to use this, you just have to change the fileId to the ID of the file. You can determine your file ID by the URL of your file. e.g.:
http://www.lcpdfr.com/files/file/8082-code-3-callouts/
The file ID in this case would be 8082.

@Cyan - You, sir, are awesome.

That is all.

On 22/11/2015, 09:42:59, Cyan said:

Note that there may be up to a 30 minute delay between updating the file and the above showing the new version, due to caching.

Just a tip for other devs...don't just check to see if the version string = the version of the plugin thats running. You might get a false positive if you update the plugin, and someone runs it before the site cache has been updated.

I'm pretty sure (99.9%) that you can parse the version number (if the format is correct) into a .NET Version object, and then compare it to the version of the plugin that is making the API call. That will definitely tell you if the version on the server is actually newer.

If someone needs me to, I can post a code sample when I have some time.

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

  • 3 weeks later...
On 11/25/2015 at 3:21 PM, Stealth22 said:

@Cyan - You, sir, are awesome.

That is all.

Just a tip for other devs...don't just check to see if the version string = the version of the plugin thats running. You might get a false positive if you update the plugin, and someone runs it before the site cache has been updated.

I'm pretty sure (99.9%) that you can parse the version number (if the format is correct) into a .NET Version object, and then compare it to the version of the plugin that is making the API call. That will definitely tell you if the version on the server is actually newer.

If someone needs me to, I can post a code sample when I have some time.

that would be nice for developers like me for posting a code sample as I currently just use a webclient to download a txt file from my server with the latest version in it check the version and compare the version hardcoded into the script to see if it is the latest version or not.(but the hardcoded part is kinda hard to keep up with considering I sometimes forgot to change the hardcoded version to the latest version in the txt file when releasing a new version.)

My plugins by me are on this site in addition to my own site as well.

Do Not PM Me for Support! follow the instructions for getting support with any mods. 

  • 1 month later...
On 13.12.2015 at 5:45 AM, timnboys said:

that would be nice for developers like me for posting a code sample as I currently just use a webclient to download a txt file from my server with the latest version in it check the version and compare the version hardcoded into the script to see if it is the latest version or not.(but the hardcoded part is kinda hard to keep up with considering I sometimes forgot to change the hardcoded version to the latest version in the txt file when releasing a new version.)

You could use reflection to get assembly version, like that :

using System.Reflection;

...

string plug_ver = typeof(YOUR_PLUGIN_CLASS_GOES_HERE).Assembly.GetName().Version;

...

and then convert from string to int or int[] and compare versions

or compare using mentioned by Stealth22 Version object

using System;
using System.Reflection;

...

Version plug_ver = typeof(YOUR_PLUGIN_CLAS_GOES_HERE).Assembly.GetName().Version;

....
(assuming that online_ver is version got from lcpdfr.com)
....
switch(plug_ver.CompareTo(online_ver))
{
   case 0: // versions are the same
    ....  
	break;
   case 1: // plug_ver is later than online_ver
      ...
      break;
   case -1: // plug_ver is earlier than online_ver
      .... // notify about update available
      break;
}

 

Edited by w35
better code

  • The topic was unpinned

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Similar Content

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.