Welcome to Radarspotting. Please login or sign up.

April 28, 2025, 09:55:09 AM

Login with username, password and session length

New Members

New Members

You should get an activation email when you join.  If not, please use the Contact option.

Amending the Basestation.XSL file

Started by Roadrunner, June 22, 2017, 06:28:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Roadrunner


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>




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

Anmer

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.
Here to Help.

Oldfella

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>
Oldfella

Roadrunner


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

Keef

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

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.




Oldfella

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  :'( )
Oldfella

Roadrunner

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!

Anmer

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.
Here to Help.

Oldfella

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.
Oldfella

Roadrunner


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.

Anmer

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]
Here to Help.

Roadrunner


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]

Anmer

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.
Here to Help.

Roadrunner


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.

Anmer

Hi Mike

I don't recall SBS Resources being able to auto-download any photos and I was part of the test team.
Here to Help.