Radarspotting

Mode-S Receivers => Kinetic's SBS-3 => Topic started by: Roadrunner on June 22, 2017, 06:28:01 PM

Title: Amending the Basestation.XSL file
Post by: Roadrunner on June 22, 2017, 06:28:01 PM

Hi there I need help,


I am trying to get the Aircraft pop-up window back working to show pictures. I have managed to get the SBS resources program to let me set the size etc that I want and everything works except the pictures.


Below I am showing the full XSL files details but I am at a loss to see what bits need changing to make the pictures work. All I am getting is a box with an X in it!


Any help would be much appreciated. I am running Windows 10 on a 64-bit machine.


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


<?xml version="1.0" encoding="iso8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/">
<html>
<head>
<link rel="stylesheet" href="basestation.css" type="text/css"/>
</head>
<body>
<xsl:variable name="AirlineICAO" select="substring(//currentflight/callsign,1,3)"/>
<meta http-equiv="refresh" content="5"/>
<table width="410">
<tr>
<td width="200" height="150"><img src="C:\Aviation\Kinetic\Aircraft pictures\{//regdata/registration}_A.jpg" width="200" height="133" border="0" />
</td>
<td>
<table>
<tr>
<td>
<span class="entryheading">Aircraft Details</span>
<div class="entrybox">
<table width="200">
<tr>
<td>
<tr>
<td width="170">
<span class="entrycaption"><font color="Black">Callsign: </font></span>
<span class="entrydata"><font color="Blue"><xsl:apply-templates select="//currentflight/callsign"/></font></span>
</td>
</tr>
<tr>
<td width="170">
<span class="entrycaption"><font color="Black">Mode-S: </font></span>
<span class="entrydata"><font color="Blue"><xsl:apply-templates select="//transmission/modes"/></font></span>
</td>
</tr>
<tr>
<td width="170">
<span class="entrycaption"><font color="Black">Registration: </font></span>
<span class="entrydata"><font color="Blue"><xsl:apply-templates select="//regdata/registration"/></font></span>
</td>
</tr>
<tr>
<td width="170">
<span class="entrycaption"><font color="Black">ICAO Type: </font></span>
<span class="entrydata"><font color="Blue"><xsl:apply-templates select="//regdata/ICAOTypeCode"/></font></span>
</td>
</tr>
<tr>
<td width="170">
<span class="entrycaption"><font color="Black">Type: </font></span>
<span class="entrydata"><font color="Blue"><xsl:apply-templates select="//regdata/type"/></font></span>
</td>
</tr>
<tr>
<td width="170">
<span class="entrycaption"><font color="Black">Serial No.: </font></span>
<span class="entrydata"><font color="Blue"><xsl:apply-templates select="//regdata/serialno"/></font></span>
</td>
</tr>
<tr>
<td width="170">
<span class="entrycaption"><font color="Black">Manufacturer: </font></span>
<span class="entrydata"><font color="Blue"><xsl:apply-templates select="//regdata/manufacturer"/></font></span>
</td>
</tr>
<tr>
<td width="170">
<span class="entrycaption"><font color="Black">Operator: </font></span>
<span class="entrydata"><font color="Blue"><xsl:apply-templates select="//regdata/registeredowners"/></font></span>
</td>
</tr>
<tr>
<td width="170">
<span class="entrycaption"><font color="Black">Country: </font></span>
<span class="entrydata"><font color="Blue"><xsl:apply-templates select="//transmission/country"/></font></span>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</td>
</tr>
</table>
<>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table>
<tr>
<td>
<div class="entrybox3">
<table width="407">
<tr>
<td width="200">
<span class="entrycaption"><font color="Navy">Operator Flag: </font></span>
<xsl:if test="not($AirlineICAO= '')">
<img src="C:\Aviation\Kinetic\Basestation\OperatorFlags\{$AirlineICAO}.bmp" border="0" /></xsl:if> </td>
<td width="200">
<span class="entrycaption"><font color="Navy">Silhouette Flag: </font></span>
<img src="C:\Aviation\Kinetic\Basestation\OperatorFlags\{//regdata/ICAOTypeCode}.bmp" border="0" /> </td>
</tr>
<tr>
<xsl:variable name="C_Flag">
<xsl:choose>
<xsl:when test="contains(//transmission/country,'_')='true'">
<xsl:value-of select="translate(substring-before(//transmission/country,'_'),' ','_')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="translate(//transmission/country,' ','_')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<td width="200">
<span class="entrycaption"><font color="Navy">Country Flag: </font></span>
<img src="C:\Aviation\Kinetic\Basestation\BMPFlags\{$C_Flag}.bmp" border="0" />
</td>
</tr>
</table>
<>
</td>
</tr>
</table>
<table>
<tr>
<td>
<div class="entrybox5">
<table width="407">
<tr>
<td width="200">
<a href="http://www.planepictures.net/netsearch4.cgi?stype=reg&amp;srng=2&amp;srch={//regdata/registration}&amp;offset=0&amp;range=10" target="new">
<span class="entrycaption">Planepictures.net: <xsl:apply-templates select="//regdata/registration"/></span></a>
</td>
<td width="200">
<a href="http://www.jetphotos.net/showphotos.php?offset=0&amp;where=search|-2|-2|-2|-2|{//regdata/registration}|15|1|||||||-2|-2|-2|-2|||15|1||-2|-2||||reg|1||||||-2|||1|||||||&amp;newdisplay=8" target="new">
<span class="entrycaption">Jetphotos.net: <xsl:apply-templates select="//regdata/registration"/></span></a>
</td>
</tr>
<tr>
<td width="200">
<a href="http://dm.airliners.net/search/photo.search?sort_order=photo_id%20DESC&amp;first_this_page=0&amp;page_limit=30&amp;&amp;regsearch={//regdata/registration}&amp;thumbnails=noinfo" target="new">
<span class="entrycaption">Airliners.net: <xsl:apply-templates select="//regdata/registration"/></span></a>
</td>
<td width="200">
<a href="http://www.airframes.org/reg/{translate(//regdata/registration,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')}" target="new">
<span class="entrycaption">Airframes.org: <xsl:apply-templates select="//regdata/registration"/></span></a>
</td>
</tr>
<tr>
</tr>
</table>
<>
</td>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>




-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Title: Re: Amending the Basestation.XSL file
Post by: Anmer on June 22, 2017, 10:45:26 PM
Hi Mike

I'm not at home to check but the code to view the online pictures may no longer work.  I also seem to remember that the images needed to be downloaded and stored locally for display.

I'll check when I'm back early next week.  But others may jump in if they can help.
Title: Re: Amending the Basestation.XSL file
Post by: Oldfella on June 23, 2017, 03:34:49 AM
G'day Roadrunner,

I can download aircraft photos from Airliners and PlanePictures but not JetPlanes. JetPlanes changed their setup for searching the database some time ago.

Copy below is my XSL file which you can take a look at and see if there is anything that maybe helpful to you.

I used the SBS Resources program and made some modifications to suit my requirements.

If anybody can see how to get JetPlanes working would very much appreciate a headsup. TIA

One thing to check that you have the right path to your photos file and not looking for them somewhere else.


<?xml version="1.0" encoding="iso8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/">
<html>
<head>
<link rel="stylesheet" href="basestation.css" type="text/css"/>
</head>
<body>
<xsl:variable name="AirlineICAO" select="substring(//currentflight/callsign,1,3)"/>
<meta http-equiv="refresh" content="5"/>
<table width="410">
<tr>
<td width="200" height="150"><img src="C:\BaseStation\Pictures\{//regdata/registration}.jpg" width="200" height="133" border="0" />
</td>
<td>
<table>
<tr>
<td>
<span class="entryheading">Aircraft Details</span>
<div class="entrybox">
<table width="200">
<tr>
<td>
<tr>
<td width="170">
<span class="entrycaption"><font color="Black">Registration: </font></span>
<span class="entrydata"><font color="Blue"><xsl:apply-templates select="//regdata/registration"/></font></span>
</td>
</tr>
<tr>
<td width="170">
<span class="entrycaption"><font color="Black">Manufacturer: </font></span>
<span class="entrydata"><font color="Blue"><xsl:apply-templates select="//regdata/manufacturer"/></font></span>
</td>
</tr>
<tr>
<td width="170">
<span class="entrycaption"><font color="Black">Type: </font></span>
<span class="entrydata"><font color="Blue"><xsl:apply-templates select="//regdata/type"/></font></span>
</td>
</tr>
<tr>
<td width="170">
<span class="entrycaption"><font color="Black">Serial No.: </font></span>
<span class="entrydata"><font color="Blue"><xsl:apply-templates select="//regdata/serialno"/></font></span>
</td>
</tr>
<tr>
<td width="170">
<span class="entrycaption"><font color="Black">ICAO Type: </font></span>
<span class="entrydata"><font color="Blue"><xsl:apply-templates select="//regdata/ICAOTypeCode"/></font></span>
</td>
</tr>
<tr>
<td width="170">
<span class="entrycaption"><font color="Black">Mode-S: </font></span>
<span class="entrydata"><font color="Blue"><xsl:apply-templates select="//transmission/modes"/></font></span>
</td>
</tr>
<tr>
<td>
</td>
</tr>

</td>
</tr>
</table>
</div>
</td>
</tr>
</table>

</td>
</tr>
</table>
<table>
<tr>
<td>
<div class="entrybox3">
<table width="407">
<tr>
<td width="200">
<span class="entrycaption"><font color="Navy">Operator Flag: </font></span>
<xsl:if test="not($AirlineICAO= '')">
<img src="C:\Basestation\OperatorFlags\{$AirlineICAO}.bmp" border="0" /></xsl:if> </td>
<td width="200">
<span class="entrycaption"><font color="Navy">Silhouette Flag: </font></span>
<img src="C:\Basestation\Silhouettes\{//regdata/ICAOTypeCode}.bmp" border="0" /> </td>
</tr>
<tr>
</tr>
</table>
</div>
</td>
</tr>
</table>
<table>
<tr>
<td>
<div class="entrybox4">
<table width="407">
<tr>
<td width="200"><span class="entrycaption"><font color="Navy">Callsign :      </font></span>
<span class="entrydata"><font color="blue"><xsl:apply-templates select="//currentflight/callsign"/></font></span>
</td>
<td>
<span class="entrycaption"><font color="Navy">Route :     </font></span>
<span class="entrydata"><font color="blue"><xsl:apply-templates select="//user/UserTag"/></font></span>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<table>
<tr>
<td>
<div class="entrybox5">
<table width="407">
<tr>
<td width="200">
<a href="http://www.planepictures.net/netsearch4.cgi?stype=reg&amp;srng=2&amp;srch={//regdata/registration}&amp;offset=0&amp;range=10" target="new">
<span class="entrycaption">Planepictures.net: <xsl:apply-templates select="//regdata/registration"/></span></a>
</td>
<td width="200">
<a href="http://www.jetphotos.net/showphotos.php?offset=0&amp;where=search|-2|-2|-2|-2|{//regdata/registration}|15|1|||||||-2|-2|-2|-2|||15|1||-2|-2||||reg|1||||||-2|||1|||||||&amp;newdisplay=8" target="new">
<span class="entrycaption">Jetphotos.net: <xsl:apply-templates select="//regdata/registration"/></span></a>
</td>
</tr>
<tr>
<td width="200">
<a href="http://www.airliners.net/search?keywords={//regdata/registration}" target="new">
<span class="entrycaption">Airliners.net: <xsl:apply-templates select="//regdata/registration"/></span></a>
</td>
<td width="200">
<a href="http://www.airframes.org/reg/{translate(//regdata/registration,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')}" target="new">
<span class="entrycaption">Airframes.org: <xsl:apply-templates select="//regdata/registration"/></span></a>
</td>
</tr>
<tr>
<td width="200">
<xsl:variable name="Greg" select="substring-after(//regdata/registration,'G-')"/>
<a href="http://www.caa.co.uk/application.aspx?categoryid=60&amp;pagetype=65&amp;applicationid=1&amp;mode=detailnosummary&amp;fullregmark={Greg}" target="new">
<span class="entrycaption">CAA G-INFO: <xsl:apply-templates select="//regdata/registration"/></span></a>
</td>
<td width="200">
<xsl:variable name="VHreg" select="substring-after(//regdata/registration,'VH-')"/><a href="https://www.casa.gov.au/aircraft-register-advanced" target="new">
<span class="entrycaption">CASA Registry: <xsl:apply-templates select="//regdata/registration"/></span></a>
</td>
<td width="200">
<xsl:variable name="Nreg" select="substring-after(//regdata/registration,'N')"/><a href="http://registry.faa.gov/aircraftinquiry/NNum_Results.aspx?NNumbertxt={$Nreg}" target="new">
<span class="entrycaption">FAA Registry: <xsl:apply-templates select="//regdata/registration"/></span></a>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<table>
<tr>
<td>
<div class="entrybox">
<table width="407">
<tr>
<td><span class="entrycaption"><font color="Maroon">Notes:      </font></span>
<span class="entrydata"><font color="Blue"><xsl:apply-templates select="//user/notes"/></font></span>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>

</body>
</html>

</xsl:template>
</xsl:stylesheet>
Title: Re: Amending the Basestation.XSL file
Post by: Roadrunner on June 23, 2017, 08:05:13 AM

Thanks Guys,


Oldfella, I also used the resources program and everything is as I want except receiving photos. Am at sports day today for grand kids but will look later.


Anmer, I have been storing military photos and some civil, mainly from using Active Display but have recently made the decision not to renew my licence for that. That is why I needed to update the XSL file to show photos within the pop-up window from now on. There is no rush and when I see an aircraft I want a photo of I do it manually but even those that are stored "locally" do not display?


You are back next week and then I am in I-O-M for a week so there is no rush.


As a final note, can't believe it is now 11 years since I first got an SBS1 and I am jut as excited seeing new aircraft appear as I was in the beginning. My wife tells her friends that my Computer/SBS3 combination is my life support system. LOL


Regards 
Mike
Title: Re: Amending the Basestation.XSL file
Post by: Keef on June 23, 2017, 08:31:22 AM
Hi Oldfella, Roadrunner,

Oldfella, when you mention JetPlanes do  you mean JetPhotos?

If so this post might help:
https://radarspotting.com/forum/index.php/topic,6736.0.html (https://radarspotting.com/forum/index.php/topic,6736.0.html)

I don't know of a JetPlanes site but if you can give me a link to it and the original xsl code relaing to it I might be able to work out what is needed.

Roadrunner, from your xsl file the photos would need to be of type jpg in the directory C:\Aviation\Kinetic\Aircraft pictures\ and have an _A appended to the reg.
For example G-EUUI_A.jpg.

Cheers,

Keef.



Title: Re: Amending the Basestation.XSL file
Post by: Oldfella on June 23, 2017, 02:24:18 PM
Sorry Keef, Oops seniors moment.   :-[ Yes JetPhotos is the one that I'm having problems with. Have to physically type in the search box, the rego of the aircraft to find an aircraft photo.

Thanks for the link, will have a read up on it tomorrow.

Mike 11 years for me come August. Paid AUD $1,136.36 for a SBS1. (Hope my wife doesn't read this  :'( )
Title: Re: Amending the Basestation.XSL file
Post by: Roadrunner on June 23, 2017, 08:12:38 PM
Thanks Guys,
I have started from scratch yet again with SBS-Resources pop-up window program.


I created option 1 and went through all the required steps with the final file working to the extent that it shows Operator flag, Country flag and silhouette but with the black X in the picture option.


I then went through the forum and extracted the new lines for both Jet photos and Airliner Net that have been shown recently. However nothing has changed.


I have made sure that my Aircraft photos folder is correct and that all photos are .jpg and have the _A. inserted.


Previously I had only collected Military photos and I checked whether these shown when I opened the pop up box, and they do.


I also checked the available links in the pop up box for each of the three sites and they also qet through to the correct photo in the relevent program. However, none of them seem to want to populate automatically.


I am out of ideas other than doing it manually but that will be a very long job!
Title: Re: Amending the Basestation.XSL file
Post by: Anmer on June 23, 2017, 08:54:27 PM
Hi Mike

If you can hang on for a few more days I'll check my code.  I'm showing three sets of photos in the Aircraft Details window, stored locally.  I just need to get back home and check the code.
Title: Re: Amending the Basestation.XSL file
Post by: Oldfella on June 24, 2017, 02:02:50 AM
Many thanks Keef for pointing me in the right direction. That correction to the XSL file hit the nail on the head.

Roadrunner, sorry to hear you are still having problems with your XSL file. There must be a naming conflict with your new photos that's different from your military ones. It could be as simple as that. Double check.
Title: Re: Amending the Basestation.XSL file
Post by: Roadrunner on June 24, 2017, 07:28:04 AM

Oldfella,


I have checked some recent on-screen aircraft and if the photo is there in my Aircraft photos file then they display on entering the pop-up box. I always double check when manually adding entries that I am using the same entry as that which appears in the Registration field of my Basestation.sqb (with the necessary _A.jpg added).


I am adding photos for aircraft I am really interested in, Russian, and all the other big 4 engine jets and I have the pop-up box for the relevant aircraft open when I do this and the photo immediately shows when I add the picture to the file, so I am confident all that works well.


One thing that has crossed my mind, does the program work better with some browsers than others? I am using the default Windows Edge as my browser and could that be the problem. I used to use Chrome but it was dropping out and stopping working far toi regularly so I let the default one take over. So far I am not aware of any p;roblems with this unless this is the exception.


Anmer/Mike, yes I can hang on thank you.
Title: Re: Amending the Basestation.XSL file
Post by: Anmer on June 25, 2017, 09:31:38 AM
Hi Mike

Attached is a copy of my Aircraft Details window.

Below is the code from my XSL file that handles the photo display.  All photos are held locally on my hard drive named accordingly, e.g.

<img src="I:\Kinetic\Aircraft Images\{//regdata/registration}.jpg"

<img src="I:\Kinetic\Aircraft Images\{//regdata/registration}_A.jpg"

<img src="I:\Kinetic\Aircraft Images\{//regdata/registration}_J.jpg"


The naming convention is a hangover from using Flight Display which, for a time, was downloading the photos from the relevant site.  The naming convention can be whatever you prefer as long as the BaseStation.xsl file reflects this.


<table width="197" >
<tr>
<td>
<img src="I:\Kinetic\Aircraft Images\{//regdata/registration}.jpg" class="border" alt="Planepictures.net" height="136" width="197" /> 
</td>
<td>
<img src="I:\Kinetic\Aircraft Images\{//regdata/registration}_A.jpg" class="border" alt="Airliners.net" height="136" width="197" /> 
</td>
<td>
<img src="I:\Kinetic\Aircraft Images\{//regdata/registration}_J.jpg" class="border" alt="Jetphotos.net" height="136" width="197" />
</td>
</tr>
</table>



[Attachment deleted by Admin to save file space]
Title: Re: Amending the Basestation.XSL file
Post by: Roadrunner on June 25, 2017, 11:10:43 AM

Hi Mike,


When I click on the open for the pop-up window I am getting the connection to the pictures that are already in my C:\Aviation\Kinetic\Aircraft pictures\ which has nearly 3,900 items, mostly military, all end in the correct _A.jpg.


It is there is no auto look up of entries not in this file and I have to manually search for what I want. As soon as I save them to the above folder, they appear in the pop-up box immediately.


Attached is a picture of what I get for aircraft already in my file, and those I have input over the last couple of days and the other is what I get for all other aircraft.


Regards Mike

[Attachment deleted by Admin to save file space]
Title: Re: Amending the Basestation.XSL file
Post by: Anmer on June 25, 2017, 11:14:52 AM
I was using Flight Display to "collect" photos but the developer stopped the "collection" due to fears about copyright.

I'm not aware of any app that does the auto collection.  If I see a missing image I use the links below to find a suitable one and "save" it manually.
Title: Re: Amending the Basestation.XSL file
Post by: Roadrunner on June 25, 2017, 01:47:19 PM

Mike,


That is what I am beginning to wonder. I used Flight display a long time ago then I used Active Display - which although not automated a single click in the line of entry would populate the photo to the specified settings. That stopped working so I was using a combo of AD and Plane Base to keep photos and new aircraft details up to date. Then changes to windows and the photo sites caused that to stop, plus further development of Plane Base caused conflicts with the baseStation .sqb file if you wanted to use it with SBS. So here I am using Plane base and the original base station version of collecting photos. With the changes people have suggested I can get direct to the entry of my choice but I still think that when setting up using SBS resources the site one chooses (1 of 3 only allowed) was automated. I must have a very bad memory. Never mind, it will probably take the next 10 years to populate all the photos for the 23,900 in my sqb current file.
Title: Re: Amending the Basestation.XSL file
Post by: Anmer on June 25, 2017, 01:50:57 PM
Hi Mike

I don't recall SBS Resources being able to auto-download any photos and I was part of the test team.
Title: Re: Amending the Basestation.XSL file
Post by: Roadrunner on June 25, 2017, 02:25:23 PM

Mike,


Yes I agree the SBS-Resources package was all about the updating of basastation by making it simple by having all the elements in the same place.


My thought was with having used that program to update the pop-up box it was some mechanism in the pop-up box that allowed the auto-population of photos, however, from reading through the Resources user manual it appears that it was Flight Display that initially had that ability. I haven't got FD now and I assume it is not available now.


What would be great though is something along the lines of the ability of Active Display Professional that would allow one to have a list of entries in the database, and left clicking on an entry would take you direct to the photo and would also copy it to the Aircraft photo folder.


Regards Mike
Title: Re: Amending the Basestation.XSL file
Post by: Anmer on June 25, 2017, 02:58:29 PM
Quote from: Roadrunner on June 25, 2017, 02:25:23 PM
I haven't got FD now and I assume it is not available now.

FD is available but it hasn't been updated for many years and the later versions no longer handle the downloads.  And the hard coded script(s) would need updating too.

What we need is another Allan Bird and/or Gary Jones.
Title: Re: Amending the Basestation.XSL file
Post by: Roadrunner on June 25, 2017, 06:51:36 PM

Hear Hear.


Have spent the afternoon obtaining photo's of all A380's B747's and MD11'S will also do most of the other 4 engine types and any missing military plus rarer aircraft.


Regards Mike