Jump to content

adding new pages, 'SOLVED' with thanks


5SA CEO

Recommended Posts

HI,

I added a few new pages via the admin page then all the info I wanted about the hub was also added.

when I went to view it all I got was a blank page with the writing on, no background or skin layout. :unsure:

So then I went to link the css sheet to each page via cpanel editor, then all I got was the back ground image no skin layout or writing.

I cannot seem to get both of them together, it appears as if it is not reading the skin layout and not displaying correctly. :huh:

I want to add 6 pages showing detail's of the hubs and the pilots.

I very sure that some one will tell me where I it wrong, :o , just need a little help to create these pages away from the admin page and then add them once they are done.

I have attached one of the pages so you can have a laugh then point me in the right direction :rolleyes:

Thanks for any help.

gatwick.htm

Link to comment
Share on other sites

  • Moderators

You had a

<style type="text/css">

On line 18, and you never closed it. So you don't need to add the style tag in there because you are already linked to a CSS file. The style tag is the site's style definitions.

I removed that and it works. Check the attachment.

Link to comment
Share on other sites

Still having an issue with adding the pages.

I tried doing it by adding the page in admin and then adding the source code there, did not work for me!

then tried by uploading the code to my server but again same result.

The pages are just not reading the .css for bluelight skin and its coming up with just a white back ground.

and the hub pilot info is only showing the code and not the data.

might just scrub the idea for now.

Thanks anyway guys.

Link to comment
Share on other sites

Pages that you create automatically read from your skin and the CSS the skin is using. When you create a new page, name the new page and save it. Next, open your FTP program and open the htm file (core/pages/yourpage.htm) and add the code you want. Do not include any js or css unless the are tied into a table or code (<script></script>). save the htm and reload it back to your core/pages/ folder.

After 17:00 (Eastern Standard Time) I will be available if you are still encountering problems getting it to work.

Link to comment
Share on other sites

HI Jeff,

Thanks for that,

when I added the new page via the admin area, with just some details about the hub and an image on it, when I view it on the site all I get is a blank page just showing those details I have added!

the code is to show what pilots are at the hub (which was posted on the forums) is all I need to add. Which I add via my server cpanel.

I am working nights for the next 3 days back here on Saturday/Sunday, I will keep trying and see what happens.

I will keep trying.

Link to comment
Share on other sites

HI guys,

just so you know what I am looking at, I have attached a screen shot,

Parkho, as you said I went to the admin, then added new page and then clicking 'source' I added the code.

but as you can see the code is not working properly nor is the page its self.

its not displaying the layout!

I have attached the .htm which is what I have been working with, I do not see on there any links to the style.css or the layout.

I have missed something I fear, but what?

post-1830-0-61696300-1332154508_thumb.jpg

gatwick.htm

Link to comment
Share on other sites

1) In core/modules create a folder called Gatwick

2) In core/modules/Gatwick create a file called Gatwick.php

3) In core/modules/Gatwick/Gatwick.php add this code

<?php

class Gatwick extends CodonModule	 {

 function index()	 {

 $this->show('gatwick');

 }
}

4) In lib/skins/bluelight create a file called gatwick.tpl

5) In lib/skins/bluelight/gatwick.tpl add this code

<p>
 </p>
<p style="text-align: center">
<strong><span style="font-size: 18px"><span style="color: #0000cd"><span style="font-family: georgia,serif">Gatwick airport, EGKK.</span></span></span></strong></p>
<p style="text-align: center">
<span style="font-size: 18px"><span style="color: #0000cd"><span style="font-family: georgia,serif">WHQ & European fleet hub.</span></span></span></p>
<p style="text-align: center">
<span style="font-size: 14px"><span style="color: #0000cd"><span style="font-family: georgia,serif">Gatwick is our world Headquarters, from here the CEO overseas all 5 Star operations and assist all the Division/hub managers in the running of their hubs and fleet. Gatwick is an international hub for flights to and from North America and throughout Europe. The European fleet consist of an Airbus A320, B737-800 and a B767-300 also the Comjet fleet aircraft use Gatwick as their international arrivals and departures.</span></span></span></p>
<p style="text-align: center">
<span style="font-size: 14px"><span style="color: #0000cd"><span style="font-family: georgia,serif">Gatwick Airport is located 5km (3.1mi) north of the centre of Crawley, West Sussex, and 45.7 km (28.4 mi) south of Central London, previously known as London Gatwick, it is London's second largest international airport and second busiest by total passenger traffic in the United Kingdom after Heathrow. Gatwick furthermore is Europe's leading airport for point-to-point flights and has the world's busiest single-use runway averaging 52 aircraft movements an hour.</span></span></span></p>
<p style="text-align: center">
<span style="font-size: 14px"><span style="color: #0000cd"><span style="font-family: georgia,serif">In 2010, over 31.3 million passengers passed through Gatwick, making it the 9th largest in Europe by passenger traffic and the 12th busiest in terms of international passengers.</span></span></span></p>
<p style="text-align: center">
<span style="font-size: 14px"><span style="color: #0000cd"><span style="font-family: georgia,serif">Gatwick's main runway is 08R/26L, 3316 m/ 10879 ft in length and handled around 240,500 flights last year.</span></span></span></p>
<p style="text-align: center">
<img alt="" height="176" src="http://5starvirtualaviation.com/phpvms/lib/skins/bluelight/images/gatwick.jpg" width="286" /></p>
<div>
<p style="text-align: center; ">
 <span style="color:#0000cd;"><span style="font-size:14px;"><span style="font-family:georgia,serif;">Pilots based at London Gatwick</span></span></span></p>
<!--?php $pilots = PilotData::getAllPilotsByHub('EGKK'); ?--><!--?php
	if(!$pilots)
	{
			echo 'There are no pilots in that hub, so there must be at least one pilot so the hub can run.';
			return;
	}
?--> <table cellpadding="1" cellspacing="0" class="tablesorter" id="tabledlist" width="100%">
 <thead>
  <tr>
<th style="background-color: #00008B; color: #FFF">
 Pilot ID</th>
<th style="background-color: #00008B; color: #FFF" width="200px">
 <div align="left">
  Name</div>
</th>
<th style="background-color: #00008B; color: #FFF">
 <div align="left">
  Rank</div>
</th>
<th style="background-color: #00008B; color: #FFF">
 <div align="left">
  Flights</div>
</th>
<th style="background-color: #00008B; color: #FFF">
 <div align="left">
  Hours</div>
</th>
<th style="background-color: #00008B; color: #FFF">
 <div align="left">
  Last Flight</div>
</th>
<th style="background-color: #00008B; color: #FFF">
 <div align="left">
  Joined</div>
</th>
  </tr>
 </thead>
 <tbody>
<!--?php
foreach($pilots as $pilot)
{
?-->   <tr>
<td nowrap="nowrap" width="1%">
 <a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"><!--?php echo PilotData::GetPilotCode($pilot--->code, $pilot->pilotid)?></a></td>
<td>
 <img alt="<?php echo Countries::getCountryName($pilot->location);?>" src="<?php echo Countries::getCountryImage($pilot->location);?>" /><!--?php echo $pilot--->firstname.' '.$pilot->lastname?></td>
<td>
 <img alt="<?php echo $pilot->rank;?>" src="<?php echo $pilot->rankimage?>" /></td>
<td>
<!--?php echo $pilot--->	 totalflights?></td>
<td>
<!--?php echo Util::AddTime($pilot--->	 totalhours, $pilot->transferhours); ?></td>
<td>
<!--?php echo date(DATE_FORMAT, strtotime($pilot--->	 lastpirep));?></td>
<td>
<!--?php echo date(DATE_FORMAT, strtotime($pilot--->	 joindate));?></td>
<!--?php
}
?-->   </tr>
 </tbody>
</table>
</div>

6) in your navigation menu, link to the page by adding this

http://5starvirtuala...dex.php/gatwick

  • Like 2
Link to comment
Share on other sites

You are welcome. It is a little more work doing it this way, but it is a lot cleaner, and it is easier to do it this way since you can also edit it without the worry of accidentally deleting a code due to "pages" tend to delete php coding.

Link to comment
Share on other sites

  • 4 months later...

I am having issues with this skin, I add pages no problem, but when I add the link for them in the drop down it has a white background behind the letters in the new menu in the drop down and will only turn grey when the mouse is over it. How do i get it to stay grey like all the other drop downs?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...