Changing the Aircraft Details popup window

User-created resources that can help you get more out of your BaseStation software.

Moderators: admin, chrisg0wtz, KineticDavid, Moderators

Postby john2905 » November 22nd, 2006, 9:45 pm

There are several ways to include pictures or links to your Aircraft Details window.
1. You can add links to the more popular aviation web sites.
2. You can add pictures that are links from the above.
3. You can add pictures directly from your hard drive (if you have a collection to use).


Has anyone code that works as 2. above. ie. actually downloads an image and puts it in the Aircraft Details window?
I have have been using code to bring up images from the limited number I have on my hard drive (modified code from Bones) and also links to the var pic sites to show images in a seperat browser page, but I am struggleing to get any further.

Rgds
John
john2905
 
Posts: 32
Joined: July 24th, 2006, 11:32 am
Location: Watford - Hertfordshire - UK

Postby bones » November 22nd, 2006, 11:40 pm

Have a look through the Next Challenge thread that started this off as I think a few examples exist in there.

Ignore any references to triggers though - these are no longer necessary in the latest Snoopy version.
User avatar
bones
 
Posts: 8397
Joined: August 8th, 2005, 4:44 am
Location: Isle of Man

Postby bones » December 19th, 2006, 5:05 pm

A couple of variations:

Image

Maybe a bit too minimalist for some so how about this?

Image

The code for the second example is as follows. Note that the picture link is to a picture on the users hard drive. If you want a direct link to an online source you will need to replace the picture code line.

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

<table>
<tr>
<td width="200">
<span class="entryheading">Aircraft Data</span>
</td>
</tr>
<tr>
<td width="200">
<img src="F:\GPS\Kinetic\Pictures\{//regdata/registration}.gif" />
</td>
<td>
<div class="entrybox">
<table width="400">
<tr>
<td>
<tr>
<td width="200">
<span class="entrycaption">ModeS Code : </span>
<span class="entrydata"><xsl:apply-templates select="//transmission/modes"/></span>
</td>
<td width="200">
<span class="entrycaption">ICAO Code : </span>
<span class="entrydata"><xsl:apply-templates select="//regdata/ICAOTypeCode"/></span>
</td>
</tr>

<tr>
<td width="200">
<span class="entrycaption">Registration : </span>
<span class="entrydata"><xsl:apply-templates select="//regdata/registration"/></span>
</td>
<td width="200">
<span class="entrycaption">Type : </span>
<span class="entrydata"><xsl:apply-templates select="//regdata/type"/></span>
</td>
</tr>

<tr>
<td width="200">
<span class="entrycaption">Serial No : </span>
<span class="entrydata"><xsl:apply-templates select="//regdata/serialno"/></span>
</td>
<td width="200">
<span class="entrycaption">Operator : </span>
<span class="entrydata"><xsl:apply-templates select="//regdata/registeredowners"/></span>
</td>
</tr>

<tr>
<td width="200">
<span class="entrycaption">Country : </span>
<span class="entrydata"><xsl:apply-templates select="//transmission/country"/></span>
</td>
<td width="200">
<span class="entrycaption">Flight No : </span>
<span class="entrydata"><xsl:apply-templates select="//currentflight/callsign"/></span>
</td>
</tr>

<tr>
<td width="200">
<span class="entrycaption">Selcal : </span>
<span class="entrydata"><xsl:apply-templates select="//regdata/status"/></span>
</td>
<td width="200">
<span class="entrycaption">Prev ID : </span>
<span class="entrydata"><xsl:apply-templates select="//previousid"/></span>
</td>
</tr>

<tr>
<td width="200">
<span class="entrycaption">CoA Cat : </span>
<span class="entrydata"><xsl:apply-templates select="//cofacategory"/></span>
</td>
<td width="200">
<span class="entrycaption">CoA Exp : </span>
<span class="entrydata"><xsl:apply-templates select="//cofaexpiry"/></span>
</td>
</tr>

<tr>
<td width="200">
<span class="entrycaption">Callsign : </span>
<span class="entrydata"><xsl:apply-templates select="//currentflight/callsign"/></span>
</td>
<td width="200">
<span class="entrycaption">Seen : </span>
<span class="entrydata"><xsl:apply-templates select="//UserTag"/></span>
</td>
</tr>
</td>
</tr>
</table>
</div>
</td>
</tr><tr></tr><tr></tr>
</table>

<table>
<tr>
<td width="600">
<span class="entryheading">User Notes</span>
</td>
</tr>
<tr>
<td>
<div class="entrybox">
<table width="600">
<tr>
<td>
<span class="entrydata"><xsl:apply-templates select="//user/notes"/></span>
</td>
</tr>
</table>
</div>
</td>
</tr><tr></tr><tr></tr>
</table>



<table>
<tr>
<td width="600">
<span class="entryheading">Web Links</span>
</td>
</tr>
<tr>
<td>
<div class="entrybox">
<table width="600">
<tr>
<td>
<tr>
<td width="300">
<a href="http://www.airliners.net/search/photo.search?keywords={//regdata/registration}" target="new">
<span class="entrycaption">Airliners.net : <xsl:apply-templates select="//regdata/registration"/></span></a>
</td>
<td width="300">
<a href="http://www.caa.co.uk/application.aspx?

categoryid=60&amp;pagetype=65&amp;applicationid=1&amp;mode=detailnosummary&amp;fullregmark={//regdata/registration}"

target="new">
<span class="entrycaption">CAA G-INFO : <xsl:apply-templates select="//regdata/registration"/></span></a>
</td>
</tr>
<tr>
<td width="300">
<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|||||||" target="new">
<span class="entrycaption">Jetphotos.net : <xsl:apply-templates select="//regdata/registration"/></span></a>
</td>
<td width="300">
<xsl:variable name="Nreg" select="substring-after(//regdata/registration,'N')"/>
<a href="http://registry.faa.gov/aircraftinquiry/NNumSQL.asp?NNumbertxt={$Nreg}" target="new">
<span class="entrycaption">FAA Registry : <xsl:apply-templates select="//regdata/registration"/></span></a>
</td>
</tr>
<tr>
<td width="300">
<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="300">
<a href="http://www.flytecomm.com/cgi-bin/trackflight?action=select_advanced&amp;flight_id={//currentflight/callsign}"

target="new">
<span class="entrycaption">FlyteComm : <xsl:apply-templates select="//currentflight/callsign"/></span></a>
</td>
</tr>
<tr>
</tr>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>

</body>
</html>

</xsl:template>
</xsl:stylesheet>
Last edited by bones on July 8th, 2007, 4:41 am, edited 1 time in total.
User avatar
bones
 
Posts: 8397
Joined: August 8th, 2005, 4:44 am
Location: Isle of Man

Postby Allocator » December 19th, 2006, 6:48 pm

The code for the second example is as follows. Note that the picture link is to a picture on the users hard drive. If you want a direct link to an online source you will need to replace the picture code line.


Very Nice :)
SBS-1
RadarBox
PlanePlotter
ShipPlotter

www.assaultglidertrust.co.uk
www.rafars.org
User avatar
Allocator
 
Posts: 930
Joined: July 12th, 2006, 1:50 pm
Location: Shrewsbury

Postby bones » December 19th, 2006, 7:14 pm

One problem.

When the XSL code is pasted onto the forum I have noticed (a bit late) that format is lost. For most lines this isn't important but some users like to align the data for a neater appearance.

The posted code strips out extra spaces and this results in a line like:

<span class="entrycaption">Type : </span>

instead of
<span class="entrycaption">Type : -------- </span>
where the dashes equate to extra spaces.

Once you paste code you may therefore have to add extra spaces if you want the columns to line up neatly. The bad news is that a normal space won't work - you have to use ASCII 255 to insert a space. It doesn't look any different but it works.
User avatar
bones
 
Posts: 8397
Joined: August 8th, 2005, 4:44 am
Location: Isle of Man

Postby AJ » December 19th, 2006, 10:03 pm

Any takers?


You knew how to to do it all along.... :wink:
AJ
 
Posts: 36
Joined: January 27th, 2006, 10:42 pm
Location: London

Postby bones » December 19th, 2006, 10:37 pm

You knew how to to do it all along....


No I didn't - I hate fiddling with XML. It took me all morning to sort it out.. :( :( :(

Any resident XML wizard would have sorted it in a few minutes..
User avatar
bones
 
Posts: 8397
Joined: August 8th, 2005, 4:44 am
Location: Isle of Man

Postby KineticWill » December 20th, 2006, 10:30 am

bones wrote:One problem.

When the XSL code is pasted onto the forum I have noticed (a bit late) that format is lost. For most lines this isn't important but some users like to align the data for a neater appearance.

The posted code strips out extra spaces and this results in a line like:

<span class="entrycaption">Type : </span>

instead of
<span class="entrycaption">Type : -------- </span>
where the dashes equate to extra spaces.

Once you paste code you may therefore have to add extra spaces if you want the columns to line up neatly. The bad news is that a normal space won't work - you have to use ASCII 255 to insert a space. It doesn't look any different but it works.


I've always wondered what the purpose of the code tag was in BBCode, because it seemed to be functionally identical to the quote tag. But having read your post I thought, "I wonder", and tried a quick test...

And the result is... It preserves spaces! :)

Code: Select all
<span class="entrycaption">Type : </span>

instead of
<span class="entrycaption">Type :           </span>


<span class="entrycaption">Type : </span>

instead of
<span class="entrycaption">Type : </span>


That's exactly the same text in each one, but the quote dumps the spaces and the code doesn't. So I'd recommend putting all xsl code examples in code tags.
Will Howliston, Kinetic Avionic Products Limited
Lead developer, Basestation software
User avatar
KineticWill
 
Posts: 1664
Joined: May 19th, 2005, 1:47 pm
Location: London

Postby gizmo » December 20th, 2006, 12:30 pm

nice code Bones,well done...thanks :wink:

greetzzzz Johan
gizmo
 
Posts: 768
Joined: March 17th, 2006, 11:58 pm
Location: The netherlands jo31ai

Postby bones » December 20th, 2006, 12:58 pm

That's exactly the same text in each one, but the quote dumps the spaces and the code doesn't. So I'd recommend putting all xsl code examples in code tags.


Thanks Will. In that case let me try again. Same code but formatting should be correct:

Code: Select all
<?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>

<table>
  <tr>
    <td width="200">
      <span class="entryheading">Aircraft Data</span>
    </td>
  </tr>
  <tr>
    <td width="200">
      <img src="F:\GPS\Kinetic\Pictures\{//regdata/registration}.gif" />
    </td>
      <td>
        <div class="entrybox">
          <table width="400">
           <tr>
             <td>
                 <tr>
                   <td width="200">
                     <span class="entrycaption">ModeS Code :          </span>
                     <span class="entrydata"><xsl:apply-templates select="//transmission/modes"/></span>
                   </td>
                   <td width="200">
                     <span class="entrycaption">ICAO Code :      </span>
                     <span class="entrydata"><xsl:apply-templates select="//regdata/ICAOTypeCode"/></span>
                   </td>
                 </tr>

                 <tr>
                   <td width="200">
                     <span class="entrycaption">Registration :           </span>
                     <span class="entrydata"><xsl:apply-templates select="//regdata/registration"/></span>
                   </td>
                   <td width="200">
                     <span class="entrycaption">Type :                  </span>
                     <span class="entrydata"><xsl:apply-templates select="//regdata/type"/></span>
                   </td>
                 </tr>

                 <tr>
                   <td width="200">
                     <span class="entrycaption">Serial No :                 </span>
                     <span class="entrydata"><xsl:apply-templates select="//regdata/serialno"/></span>
                   </td>
                   <td width="200">
                     <span class="entrycaption">Operator :           </span>
                     <span class="entrydata"><xsl:apply-templates select="//regdata/registeredowners"/></span>
                   </td>
                 </tr>

                 <tr>
                   <td width="200">
                     <span class="entrycaption">Country :                    </span>
                     <span class="entrydata"><xsl:apply-templates select="//transmission/country"/></span>
                   </td>
                   <td width="200">
                     <span class="entrycaption">Flight No :           </span>
                     <span class="entrydata"><xsl:apply-templates select="//currentflight/callsign"/></span>
                   </td>
                 </tr>

                 <tr>
                   <td width="200">
                     <span class="entrycaption">Selcal :             </span>
                     <span class="entrydata"><xsl:apply-templates select="//regdata/status"/></span>
                   </td>
                   <td width="200">
                     <span class="entrycaption">Prev ID :             </span>
                     <span class="entrydata"><xsl:apply-templates select="//previousid"/></span>
                   </td>
                 </tr>

                 <tr>
                   <td width="200">
                     <span class="entrycaption">CoA Cat :             </span>
                     <span class="entrydata"><xsl:apply-templates select="//cofacategory"/></span>
                   </td>
                   <td width="200">
                     <span class="entrycaption">CoA Exp :             </span>
                     <span class="entrydata"><xsl:apply-templates select="//cofaexpiry"/></span>
                   </td>
                 </tr>

                 <tr>
                   <td width="200">
                     <span class="entrycaption">Callsign :                  </span>
                     <span class="entrydata"><xsl:apply-templates select="//currentflight/callsign"/></span>
                   </td>
                   <td width="200">
                     <span class="entrycaption">Seen :                  </span>
                     <span class="entrydata"><xsl:apply-templates select="//UserTag"/></span>
                   </td>
                 </tr>
             </td>
           </tr>
         </table>
       </div>
    </td>
  </tr><tr></tr><tr></tr>
</table>

<table>
  <tr>
    <td width="600">
      <span class="entryheading">User Notes</span>
    </td>
  </tr>
  <tr>
    <td>
      <div class="entrybox">
        <table width="600">
          <tr>
            <td>
              <span class="entrydata"><xsl:apply-templates select="//user/notes"/></span>
            </td>
          </tr>
        </table>
      </div>
    </td>
  </tr><tr></tr><tr></tr>
</table>



<table>
  <tr>
    <td width="600">
      <span class="entryheading">Web Links</span>
    </td>
  </tr>
  <tr>
    <td>
      <div class="entrybox">
        <table width="600">
          <tr>
            <td>
              <tr>
                <td width="300">
                  <a href="http://www.airliners.net/search/photo.search?keywords={//regdata/registration}" target="new">
                  <span class="entrycaption">Airliners.net  :  <xsl:apply-templates select="//regdata/registration"/></span></a>
                </td>
                <td width="300">
                  <a href="http://www.caa.co.uk/application.aspx?

                  categoryid=60&amp;pagetype=65&amp;applicationid=1&amp;mode=detailnosummary&amp;fullregmark={//regdata/registration}"

                  target="new">
                  <span class="entrycaption">CAA G-INFO : <xsl:apply-templates select="//regdata/registration"/></span></a>
                </td>
              </tr>
              <tr>
                <td width="300">
                  <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|||||||" target="new">
<span class="entrycaption">Jetphotos.net : <xsl:apply-templates select="//regdata/registration"/></span></a>
                </td>
                <td width="300">
                  <xsl:variable name="Nreg" select="substring-after(//regdata/registration,'N')"/>
                  <a href="http://registry.faa.gov/aircraftinquiry/NNumSQL.asp?NNumbertxt={$Nreg}" target="new">
                  <span class="entrycaption">FAA Registry : <xsl:apply-templates select="//regdata/registration"/></span></a>
                </td>
              </tr>
              <tr>
                <td width="300">
                  <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="300">
                  <a href="http://www.flytecomm.com/cgi-bin/trackflight?action=select_advanced&amp;flight_id={//currentflight/callsign}"

               target="new">
                  <span class="entrycaption">FlyteComm : <xsl:apply-templates select="//currentflight/callsign"/></span></a>
              </td>
              </tr>
              <tr>
              </tr>
            </td>
          </tr>
        </table>
      </div>
    </td>
  </tr>
</table>

</body>
</html>

</xsl:template>
</xsl:stylesheet>


Bingo!!
User avatar
bones
 
Posts: 8397
Joined: August 8th, 2005, 4:44 am
Location: Isle of Man

Postby AJ » December 22nd, 2006, 7:13 pm

Well done Bones.. :D
AJ
 
Posts: 36
Joined: January 27th, 2006, 10:42 pm
Location: London

plane thumbnails

Postby Vril » January 5th, 2007, 8:30 am

hi out there!

where can i get plane thumbs in one bunch. it takes very much time to
save it one by one ... :(

please help!
Vril
 
Posts: 8
Joined: September 30th, 2005, 6:25 pm

Postby Faramir » January 5th, 2007, 9:23 am

It is quite big, but I've got an archive of nearly 27.000 thumbs of roughly 9000 different aircraft. Archive is a bit ove 200 Megs. If you can give me a place to upload it, you're in business...

Faramir
Faramir
12 miles east of EHEH
---
Knowledge is a deadly friend if no one sets the rules... The faith of all mankind I see is in the hands of fools. - King Crimson
User avatar
Faramir
 
Posts: 232
Joined: February 9th, 2006, 2:56 pm
Location: 12 mi east of EHEH, Netherlands

Re: plane thumbnails

Postby Allocator » January 5th, 2007, 3:37 pm

Vril wrote:hi out there!

where can i get plane thumbs in one bunch. it takes very much time to
save it one by one ... :(

please help!


I use JACARS2 (can't remember the web address, do a Google search) which is a free on-line ACARS decoder which automatically save the aircraft thumbnail pictures to hard drive. It gets the pictures from one of the on-line aircraft photo sites as the ACARS signal is received by the on-line server, so it doesn't get all the pictures at once but it does get them in real time. You have to make the appropriate changes to the xsl file to point the the directory with the pictures. It works a treat, depending on which ACARS server you select. I only select the UK servers so the ACARS reports and pictures roughly reflect what I am likely to pick up on the SBS (not much point in getting pictures for aircraft on the other side of the world).
SBS-1
RadarBox
PlanePlotter
ShipPlotter

www.assaultglidertrust.co.uk
www.rafars.org
User avatar
Allocator
 
Posts: 930
Joined: July 12th, 2006, 1:50 pm
Location: Shrewsbury

Aircraft Details

Postby MikeC » January 9th, 2007, 12:46 pm

Having managed to find time to upgrade to Snoopy (glad I did), I've been following various threads and can now link to numerous sites using the Aircraft Details window.

Having managed to link and look up flights using FlyteComm, I would like to have a similar link to Aeroseek.

I can get the link to work but can't get the flight number to populate the search box and get a result.

My basetstation.xsl line reads:

http://www.aeroseek.com/webtrax/fboweb. ... flight_id={//currentflight/callsign}

Has anyone managed to do this or can spot my error?

Thanks.

MikeC
User avatar
MikeC
 
Posts: 801
Joined: September 17th, 2005, 1:43 pm
Location: Peterborough, UK

PreviousNext

Return to Resources

Who is online

Users browsing this forum: No registered users and 1 guest