New Guy Needs Help

Are you having problems with using or developing a plugin? Let me know here.
Post Reply
Pete165
Posts: 3
Joined: Mon Oct 05, 2015 12:26 am

New Guy Needs Help

Post by Pete165 » Mon Oct 05, 2015 12:52 am

Hey guys, I've been lurking around here for a while and finally decided to ask for help :lol: . I have a RaspPi sending to Flightaware and and also viewing myself through VRS (http://24.15.30.69/VirtualRadar/desktop.html) I am now attempting to use the custom content plugin to modify the default settings and have been using the documentation on this site (http://www.virtualradarserver.co.uk/Doc ... tings.aspx) in addition to various posts on the forum. Bare in mind that I have ZERO programming experience :shock:

For some reason, I am only getting a couple changes to work at a time, and I have no idea why others don't work. I was hoping somebody could post an example of their GlobalOptions changes that they've made so I might be able to figure this out. Or give me some pointers in general. I got frustrated and deleted my previous attemps so I don't have anything to show you what I was doing, but for example I was trying to do things show my location as default rather than the UK, show range rings and Receiver ranges by default, show aircraft trails, set default aircraft labels, and a host of other settings. I was able to suppress alt stalks by default, and show aircraft trails, but then I couldn't get other items to work at the same time.

Also, if anybody has any suggestions on how to get started learning Raspberri Pi - I'd love to hear them! Flightaware had a very simple install file and instructions, so I really didn't learn anything as I was setting it up.

Thanks in advance for your help!

GregoryGHarding
Posts: 96
Joined: Mon Jan 26, 2015 9:01 am
Location: CYYT

Re: New Guy Needs Help

Post by GregoryGHarding » Tue Oct 06, 2015 8:31 pm

this is my custom options script

Code: Select all

<script type="text/javascript">
    if(VRS && VRS.globalDispatch && VRS.serverConfig) {
        VRS.globalDispatch.hook(VRS.globalEvent.bootstrapCreated, function(bootStrap) {

		// Configuration Storage Options:
		VRS.globalOptions.configSuppressEraseOldSiteConfig = true;

		// General Aircraft Options:
		VRS.globalOptions.suppressTrails = false;
		VRS.globalOptions.aircraftHideUncertainCallsigns = false;
		VRS.globalOptions.aircraftListTimeout = 10000;
		VRS.globalOptions.aircraftListRetryInterval = 15000;
		VRS.globalOptions.aircraftListFixedRefreshInterval = 100;
		VRS.globalOptions.aircraftListRequestFeedId = undefined;
		VRS.globalOptions.aircraftListUserCanChangeFeeds = true;
		VRS.globalOptions.aircraftListHideAircraftNotOnMap = false;

		// Auto-Select Options:
		VRS.globalOptions.aircraftAutoSelectEnabled = true;
		VRS.globalOptions.aircraftAutoSelectClosest = false;
		VRS.globalOptions.aircraftAutoSelectDeselectOffRadar = true;
		VRS.globalOptions.aircraftAutoSelectFiltersLimit = 0;

		// Filter Options:
		VRS.globalOptions.aircraftListDefaultFiltersEnabled = false;
		VRS.globalOptions.aircraftListFiltersLimit = 0;

		// Plotting Options:
		VRS.globalOptions.aircraftMarkerRotationGranularity = 5;
		VRS.globalOptions.aircraftMarkerAllowAltitudeStalk = false;
		VRS.globalOptions.aircraftMarkerShowAltitudeStalk = false;
		VRS.globalOptions.aircraftMarkerAllowPinText = true;
		VRS.globalOptions.aircraftMarkerPinTextLines = 4;
		VRS.globalOptions.aircraftMarkerHideEmptyPinTextLines = true;
		VRS.globalOptions.aircraftMarkerDefaultPinTexts = [
         		VRS.RenderProperty.Callsign,
                	VRS.RenderProperty.FlightLevel,VRS.RenderProperty.Squawk,
                	VRS.RenderProperty.RouteShort
            	];
		VRS.globalOptions.aircraftMarkerSuppressTextOnImages = true;
		VRS.globalOptions.aircraftMarkerTrailColourNormal = '#000040';
		VRS.globalOptions.aircraftMarkerTrailColourSelected = '#202080';
		VRS.globalOptions.aircraftMarkerTrailWidthNormal = 2;
		VRS.globalOptions.aircraftMarkerTrailWidthSelected = 3;
		VRS.globalOptions.aircraftMarkerTrailDisplay = VRS.TrailDisplay.SelectedOnly
		VRS.globalOptions.aircraftMarkerTrailType = VRS.TrailType.FullAltitude;
		VRS.globalOptions.aircraftMarkerAltitudeTrailLow = 300;
		VRS.globalOptions.aircraftMarkerAltitudeTrailHigh = 45000;
		VRS.globalOptions.aircraftMarkerSpeedTrailLow = 10;
		VRS.globalOptions.aircraftMarkerSpeedTrailHigh = 660;
		VRS.globalOptions.aircraftMarkerAlwaysPlotSelected = true;
		VRS.globalOptions.aircraftMarkerShowTooltip = false;
		VRS.globalOptions.aircraftMarkerMovingMapOn = false;

		// Range Circle Options:
		VRS.globalOptions.aircraftMarkerAllowRangeCircles = true;
		VRS.globalOptions.aircraftMarkerShowRangeCircles = false;
		VRS.globalOptions.aircraftMarkerRangeCircleInterval = 20;
		VRS.globalOptions.aircraftMarkerRangeCircleDistanceUnit = VRS.Distance.StatuteMile;
		VRS.globalOptions.aircraftMarkerRangeCircleCount = 6;
		VRS.globalOptions.aircraftMarkerRangeCircleOddColour = '#333333';
		VRS.globalOptions.aircraftMarkerRangeCircleEvenColour = '#111111';
		VRS.globalOptions.aircraftMarkerRangeCircleOddWeight = 1;
		VRS.globalOptions.aircraftMarkerRangeCircleEvenWeight = 3;
		VRS.globalOptions.aircraftMarkerRangeCircleMaxCircles = 9;
		VRS.globalOptions.aircraftMarkerRangeCircleMaxInterval = 100;
		VRS.globalOptions.aircraftMarkerRangeCircleMaxWeight = 4;
		
		// Range Plot Options
		VRS.globalOptions.polarPlotEnabled = true;
		VRS.globalOptions.polarPlotUserConfigurable = false;
		VRS.globalOptions.polarPlotFetchTimeout = 10000;
		VRS.globalOptions.polarPlotAutoRefreshSeconds = 5;
		VRS.globalOptions.polarPlotStrokeWeight = 2;
		VRS.globalOptions.polarPlotStrokeColour = '#000000';
		// VRS.globalOptions.polarPlotStrokeColourCallback = undefined;
		// VRS.globalOptions.polarPlotFillColourCallback = undefined;
		VRS.globalOptions.polarPlotStrokeOpacity = 1.0;
		VRS.globalOptions.polarPlotFillOpacity = 0.3;
		// VRS.globalOptions.polarPlotAltitudeConfigs = array;
		// VRS.globalOptions.polarPlotDisplayOnStartup = array;

		// Aircraft Detail Panel Options:
		VRS.globalOptions.detailPanelUserCanConfigureItems = false;
		VRS.globalOptions.detailPanelDefaultShowUnits = true;
		VRS.globalOptions.detailPanelDefaultItems = [
			VRS.RenderProperty.OperatorIcao,
    			VRS.RenderProperty.Interesting,
    			VRS.RenderProperty.Altitude,
			VRS.RenderProperty.Engines,
			VRS.RenderProperty.Heading,
			VRS.RenderProperty.Receiver,
			VRS.RenderProperty.Speed,
			VRS.RenderProperty.Squawk,
			VRS.RenderProperty.TransponderType,
			VRS.RenderProperty.Distance
		];	
		VRS.globalOptions.detailPanelShowSeparateRouteLink = false;
		VRS.globalOptions.detailPanelShowAircraftLinks = false;
		VRS.globalOptions.detailPanelShowEnableAutoSelect = false;
		VRS.globalOptions.detailPanelShowCentreOnAircraft = true;
		VRS.globalOptions.detailPanelFlagUncertainCallsigns = true;
		VRS.globalOptions.detailPanelDistinguishOnGround = true;

		// Aircraft Info Window Options:
		VRS.globalOptions.aircraftInfoWindowEnabled = true;
		VRS.globalOptions.aircraftInfoWindowShowUnits = true;
		VRS.globalOptions.aircraftInfoWindowFlagUncertainCallsigns = true;
		VRS.globalOptions.aircraftInfoWindowDistinguishOnGround = true;
		VRS.globalOptions.aircraftInfoWindowAllowConfiguration = true;

		// Aircraft List Options:
		VRS.globalOptions.listPluginUserCanConfigureColumns = true;
		VRS.globalOptions.listPluginDefaultColumns = [
			VRS.RenderProperty.OperatorFlag,
			VRS.RenderProperty.Callsign,
			VRS.RenderProperty.Registration,
		];
		VRS.globalOptions.listPluginDistinguishOnGround = true;
		VRS.globalOptions.listPluginFlagUncertainCallsigns = true;
		VRS.globalOptions.listPluginDefaultShowUnits = true;
		VRS.globalOptions.listPluginShowSorterOptions = false;
		VRS.globalOptions.listPluginShowPause = false;
		VRS.globalOptions.listPluginShowHideAircraftNotOnMap = true;

		// Map Options:
		VRS.globalOptions.mapGoogleMapUseHttps = true;
		VRS.globalOptions.mapShowStreetView = false;
		VRS.globalOptions.mapScrollWheelActive = true;
		VRS.globalOptions.mapDraggable = true;
		VRS.globalOptions.mapShowPointsOfInterest = false;
		VRS.globalOptions.mapShowScaleControl = false;
		VRS.globalOptions.mapShowHighContrastStyle = true;

		// Audio Options:
		VRS.globalOptions.audioEnabled = false;
		VRS.globalOptions.audioAnnounceSelected = false;
		VRS.globalOptions.audioAnnounceOnlyAutoSelected = false;
		VRS.globalOptions.audioDefaultVolume = 0.5;
		VRS.globalOptions.audioTimeout = 60000;

		// Current Location Options:
		VRS.globalOptions.currentLocationConfigurable = true;
		VRS.globalOptions.currentLocationUseGeoLocation = true;
		VRS.globalOptions.currentLocationUseBrowserLocation = true;
		VRS.globalOptions.currentLocationShowOnMap = true;
		VRS.globalOptions.currentLocationUseMapCentreForFirstVisit = true;

		// Formatting Options:
		VRS.globalOptions.aircraftFlagUncertainCallsigns = true;
		VRS.globalOptions.aircraftAllowRegistrationFlagOverride = false;
		VRS.globalOptions.linkSeparator = ' : : ';
		VRS.globalOptions.unitDisplayAllowConfiguration = true;
		VRS.globalOptions.unitDisplayHeight = VRS.Height.Feet;
		VRS.globalOptions.unitDisplaySpeed = VRS.Speed.Knots;
		VRS.globalOptions.unitDisplayDistance = VRS.Distance.Kilometre;
		// VRS.globalOptions.unitDisplayVsiPerSecond	* Note 4	True if vertical speeds are to be shown per second rather than per minute.
		VRS.globalOptions.unitDisplayFLTransitionAltitude = 18000;
		VRS.globalOptions.unitDisplayFLTransitionHeightUnit = VRS.Height.Feet;
		VRS.globalOptions.unitDisplayFLHeightUnit = VRS.Height.Feet;

		// Report Options:
		VRS.globalOptions.reportDefaultPageSize = 50;
		// VRS.globalOptions.reportDefaultSortColumns	* Note 5	The default sort order for reports. Note that the server will not accept any more than two sort columns.
		VRS.globalOptions.reportMaximumCriteria = 15;
		VRS.globalOptions.reportFindAllPermutationsOfCallsign = false;

		// Report Detail Options:
		VRS.globalOptions.reportDetailUserCanConfigureColumns = true;
		// VRS.globalOptions.reportDetailColumns	array	An array of VRS.ReportAircraftProperty and VRS.ReportFlightProperty (see enums.js) values that are shown in the aircraft detail panel by default.
		// VRS.globalOptions.reportDetailAddMapToDefaultColumns	* Note 3	True if the map should be added to the default columns
		VRS.globalOptions.reportDetailDefaultShowUnits = true;
		VRS.globalOptions.reportDetailDistinguishOnGround = true;
		VRS.globalOptions.reportDetailDefaultShowEmptyValues = false;

		// Report List Options:
		VRS.globalOptions.reportListUserCanConfigureColumns = false;
		// VRS.globalOptions.reportListSingleAircraftColumns	array	An array of VRS.ReportFlightProperty and VRS.ReportAircraftProperty (see enums.js) values to show for reports on a single aircraft.
		// VRS.globalOptions.reportListManyAircraftColumns	array	An array of VRS.ReportFlightProperty and VRS.ReportAircraftProperty (see enums.js) values to show for reports with criteria that could cover many aircraft.
		VRS.globalOptions.reportListDefaultShowUnits = true;
		VRS.globalOptions.reportListDistinguishOnGround = true;
		VRS.globalOptions.reportListShowPagerTop = true;
		VRS.globalOptions.reportListShowPagerBottom = true;
		VRS.globalOptions.reportListGroupBySortColumn = true;
		VRS.globalOptions.reportListGroupResetAlternateRows = true;

		// Report Map Options:
		VRS.globalOptions.reportMapScrollToAircraft = true;
		VRS.globalOptions.reportMapShowPath = true;
		VRS.globalOptions.reportMapStartSelected = false;

		// Report Pager Options:
		VRS.globalOptions.reportPagerSpinnerPageSize = 5;
		VRS.globalOptions.reportPagerAllowPageSizeChange = true;
		VRS.globalOptions.reportPagerAllowShowAllRows = true;

		// Script Manager Options:
		VRS.globalOptions.scriptManagerTimeout = 30000;

		// Server Configuration Options:
		VRS.globalOptions.serverConfigTimeout = 10000;
		VRS.globalOptions.serverConfigRetryInterval = 5000;

        });
    }
</script>

Pete165
Posts: 3
Joined: Mon Oct 05, 2015 12:26 am

Re: New Guy Needs Help

Post by Pete165 » Wed Oct 07, 2015 7:42 am

I really appreciate it! This should give me a good startt

GregoryGHarding
Posts: 96
Joined: Mon Jan 26, 2015 9:01 am
Location: CYYT

Re: New Guy Needs Help

Post by GregoryGHarding » Wed Oct 07, 2015 8:58 am

Pete165 wrote:I really appreciate it! This should give me a good startt
im pretty sure these are all the available options, you can remove options u dont care about, the options i have set in that list make the website customizibility very strict

agw
Posts: 2249
Joined: Fri Feb 17, 2012 3:20 am

Re: New Guy Needs Help

Post by agw » Sun Oct 11, 2015 12:57 am

If all of the configuration that you want to do can be achieved by setting options on the web site then you don't need to use the custom content plugin, you can do it through the program:

1. In VRS go to Tools | Options | Web Site | Initial Settings.
2. Click the Desktop site link and set the map position, map zoom, map type and Menu | Options settings to exactly how you want them.
3. Back in VRS click the Mobile site link and do the same for the mobile page.
4. Back in VRS click the link for Settings site.
5. The browser should open on a page with a bunch of buttons along the top. Click EXPORT SETTINGS.
6. A text box appears with a whole pile of text in it. Select all of the text and copy it to the clipboard.
7. Back in VRS paste the text into the "Exported settings" field.
8. Click OK.

After that new visitors to the site will pick up the map state and all of the options that were exported.

Options are only picked up when the browser first visits the site. If you want to test what happens when a new browser visits the site then close your VRS page and click the settings link again. This time click the REMOVE ALL button. The next time you visit your site from that browser it'll use the exported settings that you'd saved.

Post Reply