Radarspotting

Mode-S Receivers => Kinetic's SBS-1 => Topic started by: G0IXZ on November 30, 2018, 02:52:18 PM

Title: Basestation.XSl files to get pictures
Post by: G0IXZ on November 30, 2018, 02:52:18 PM
I have returned to Basestation after a number of years absence.The SBS!-Er i with external antenna (with preamp) is all working fine.I have a good range seeing a/c at 200 nM.
My problem is the on opening up the Aircraft details box there are no photos. 3 websites are shown and planepictures.net will open in a separate window and show  the aircraft selected. how can I get the photos to show inside the Details box (3 black x at the moment) ?
I assumed changes need to be made to the XSL files, I have tried ! after backing up and saving original files I tried copying bits of XSL file from varios posts I found on here and other sites with no luck .My programming skills are not up to level required to sort out problem.
Can anyone help please
Dave G0IXZ
Title: Re: Basestation.XSl files to get pictures
Post by: Anmer on November 30, 2018, 03:15:05 PM
The XSL file needs to lookup the photos from a suitable website that will respond to the request.

Over time, the photo lookup script will become invalid and need updating.  And some sites will no longer respond to such requests.

I'm away from home for a couple of weeks so can't offer any detailed support.

Maybe if you post your XSL file here, others may be able to help?
Title: Re: Basestation.XSl files to get pictures
Post by: G0IXZ on November 30, 2018, 09:19:15 PM
Hello Anmer,
Nice to be in touch again after a long time.
Thanks for the response.
When I open the Aircraft details box there are no photos in there but if I click on planepictures.net a new window opens and goes to photos of the requested aircraft appear but they do not get inserted into the details box .
So I suppose part of the XSL files is working.
Understood you are away ,no problem will take your advice and post XSL file on here.
Many Thanks catch you later.
Cheers Dave G0IXZ
Title: Re: Basestation.XSl files to get pictures
Post by: G0IXZ on November 30, 2018, 09:41:12 PM
Following Anmers advice here is my XSL (complete)

<?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>
<tr>
<td>
<div class="entrybox">
<table width="620">
<tr>
<td width="200" height="150">
<img src="C:\Documents and Settings\Administrator\Desktop\Image Files\Image Files\{//regdata/registration}.jpg" width="200" height="133" border="0" />
</td>
<td width="200" height="150">
<img src="C:\Documents and Settings\Administrator\Desktop\Image Files\Image Files\{//regdata/registration}_J.jpg" width="200" height="133" border="0" />
</td>
<td width="200" height="150">
<img src="C:\Documents and Settings\Administrator\Desktop\Image Files\Image Files\{//regdata/registration}_A.jpg" width="200" height="133" border="0" />
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<table>
<tr>
<td>
<div class="entrybox">
<table width="620">
<tr>
<td width="154">
<span class="entrycaption"><font color="Black">Callsign: </font></span>
<span class="entrydata"><font color="Blue"><xsl:apply-templates select="//currentflight/callsign"/></font></span>
</td>
<td width="154">
<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>
<td width="154">
<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="154">
<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>
<td width="154">
<span class="entrycaption"><font color="Black">Type: </font></span>
<span class="entrydata"><font color="Blue"><xsl:apply-templates select="//regdata/type"/></font></span>
</td>
<td width="154">
<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="154">
<span class="entrycaption"><font color="Black">Operator: </font></span>
<span class="entrydata"><font color="Blue"><xsl:apply-templates select="//regdata/registeredowners"/></font></span>
</td>
<td width="154">
<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>
</table>
</div>
</td>
</tr>
</table>
<table>
<tr>
<td>
<div class="entrybox5">
<table width="620">
<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>
<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>
</tr>
<tr>
</tr>
</table>
</div>
</td>
</tr>
</table>

</body>
</html>

</xsl:template>
</xsl:stylesheet>
Title: Re: Basestation.XSl files to get pictures
Post by: Triple7 on December 01, 2018, 04:40:30 PM
I'm no expert in XSL in any way, but your code is looking for your pictures in the following file location (folder) and is specifically looking for pictures in .jpg format with the registration as the filename.

C:\Documents and Settings\Administrator\Desktop\Image Files\Image Files

Is that where you have all of your photos stored? Do you really have a sub folder of 'Image Files' also called 'Image files'?

Tim
Title: Re: Basestation.XSl files to get pictures
Post by: G0IXZ on December 01, 2018, 05:09:24 PM
Hi Tim
Thanks for quick response,I have very little knowledge of XSL files either ,however the info you have given me gives me a lead.The image files I have are not stored in the locations the XSL file says they should be.
More research by me required I guess.
Many Thanks
Dave G0IXZ
Title: Re: Basestation.XSl files to get pictures
Post by: Roadrunner on December 02, 2018, 09:57:56 AM

I thought the usual place for the phots is as follows


"C:\Aviation\Kinetic\Aircraft pictures\"


The bit in green above depends on where you have the main basestation files located, also any file created by the .xsl file has an _A  added before the .jpg sujffix.
I have added mine by hand for those few that I want them for (older a/c and military) so if I have already got them then they do show.


Regards mike
Title: Re: Basestation.XSl files to get pictures
Post by: Anmer on December 02, 2018, 10:13:02 PM
Quote from: Roadrunner on December 02, 2018, 09:57:56 AMI thought the usual place for the phots is as follows

"C:\Aviation\Kinetic\Aircraft pictures\"

It can be anywhere as long as you tell the apps where to find them.
Title: Re: Basestation.XSl files to get pictures
Post by: Roadrunner on December 03, 2018, 07:50:40 AM

Hi Anmer,


I understood that, hence the bit in green C:\Aviation as I know that can be anywhere, however, I was trying to confirm the file name for pictures (as shown in the xsl, which I understood was the standard bit ie. Kinetic\Aircraft pictures\

regards Mike
Title: Re: Basestation.XSl files to get pictures
Post by: G0IXZ on December 03, 2018, 10:12:29 AM
Many Thanks to those who replied,
Following the replies on here I have discovered that you can put the Image Files wherever you like providing that XSL file is modified to point to the files.
Not an  expert on XSL but I have done it and aircraft now appear in Details box(providing the selected aircraft is in the Image Files).
So many thanks to all for pointing me in right direction.
Now to get all 3 websites working.
Cheers Dave G0IXZ
Title: Re: Basestation.XSl files to get pictures
Post by: Anmer on December 03, 2018, 10:18:07 AM
Hi Mike

I'm not aware of a "standard" file path for images, in the same way there is for OperatorFlags etc.  The BaseStation software doesn't use it.

Maybe SBS Resources /AD had a default location, but this could be overridden.
Title: Re: Basestation.XSl files to get pictures
Post by: Roadrunner on December 03, 2018, 10:39:26 AM

Dave Glad you got it sorted.


Mike you learn a little something every day.


Having been using an Kinetic equipment now since I retired in 2006 can say it has been great fun.
Only thing I would like to see (as per Active Display which I no longer use) is for a separate program that can show all sql file entries with the allocated photo and logo ( if any) shown, then I would truly be a happy bunny.













Title: Re: Basestation.XSl files to get pictures
Post by: Anmer on December 03, 2018, 10:50:25 AM
BaseStation is still the "interface" of choice for many, myself included.

It's a shame Kinetic abandoned it.  I still have a spreadsheet of scored enhancements.

We need some good programmers to take it forward, crowd funding the project.  ;)
Title: Re: Basestation.XSl files to get pictures
Post by: G0IXZ on December 03, 2018, 11:31:00 PM
I agree with that.
Count me in
Dave G0IXZ
Title: Re: Basestation.XSl files to get pictures
Post by: mhm on December 04, 2018, 06:29:47 AM
What happened to the original programmers from kinetic
Title: Re: Basestation.XSl files to get pictures
Post by: Anmer on December 04, 2018, 08:43:55 AM
Quote from: mhm on December 04, 2018, 06:29:47 AM
What happened to the original programmers from kinetic

They went to better places and jobs.  All two of them.