Jump to content

Jeff

Members
  • Posts

    1307
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Jeff

  1. I used this to get it working:

    <?php 
                   # Don't allow overlapping bids and a bid exists
                   if(Config::Get('DISABLE_SCHED_ON_BID') == true && $route->bidid != 0)
                   {
                   ?>
                           <a id="<?php echo $schedule->id; ?>" class="addbid" 
                                   href="<?php echo actionurl('/schedules/addbid');?>"><img src="http://www.mysite.net/lib/skins/cityportal/images/purchase2.png" srcover="http://www.mysite.net/lib/skins/cityportal/images/purchase2.png" srcdown="http://www.mysite.net/lib/skins/cityportal/images/purchase2.png" alt="Bid Flight" /></a>
                   <?php
                   }
                   else
                   {
                           if(Auth::LoggedIn())
                           {
                            ?>
                                   <a id="<?php echo $schedule->id; ?>" class="addbid" 
                                           href="<?php echo url('/schedules/addbid');?>"><img src="http://www.mysite.net/lib/skins/cityportal/images/purchase2.png" srcover="http://www.mysite.net/lib/skins/cityportal/images/purchase2.png" srcdown="http://www.mysite.net/lib/skins/cityportal/images/purchase2.png" alt="Bid Flight"/></a><br />
                           <?php                    
                           }
                   }               
                   ?>

  2. Is it possible to bid on a flight from the schedule_details.tpl page? I am trying to use this code to bid on the flight, but it does not do anything when clicked on.

    <?php 
                   # Don't allow overlapping bids and a bid exists
                   if(Config::Get('DISABLE_SCHED_ON_BID') == true && $route->bidid != 0)
                   {
                   ?>
                           <a id="<?php echo $route->id; ?>" class="addbid" 
                                   href="<?php echo actionurl('/schedules/addbid');?>"><img src="http://www.mysite.net/lib/skins/cityportal/images/purchase2.png" srcover="http://www.mysite.net/lib/skins/cityportal/images/purchase2.png" srcdown="http://www.mysite.net/lib/skins/cityportal/images/purchase2.png" alt="Bid Flight" /></a>
                   <?php
                   }
                   else
                   {
                           if(Auth::LoggedIn())
                           {
                            ?>
                                   <a id="<?php echo $route->id; ?>" class="addbid" 
                                           href="<?php echo url('/schedules/addbid');?>"><img src="http://www.mysite.net/lib/skins/cityportal/images/purchase2.png" srcover="http://www.mysite.net/lib/skins/cityportal/images/purchase2.png" srcdown="http://www.mysite.net/lib/skins/cityportal/images/purchase2.png" alt="Bid Flight"/></a><br />
                           <?php                    
                           }
                   }               
                   ?>

  3. We'll start from here.

    1. In your skin folder, open the frontpage_main.tpl and place the code (located below) where you want the board to show.

    2. Download the attached file and unzip it to your desktop.

    3. Upload the "images" folder (in its entirety) to your root directory (it should look like this: public_html/images)

    You can change the table images to suit your needs!

    <table align="center" border="0" width="100%">
    <thead>
    	<tr>
    		<th background='images/tables/tableheading.png'> <font face='Verdana' size='2' color="#FFFFFF">Last 10 Flights</font></th></tr>
    </thead>
    </table>
    <?php
    $count = 10;
    $pireps = PIREPData::getRecentReportsByCount($count);
    ?>
    
    <table align="center" border="0" width="100%">
      <thead>
        <tr border="0">
    <th align="center" background='images/tables/tableheading.png'> <font face='Verdana' size='2' color="#FFFFFF">Pilot</font></th>
    <th align="center" background='images/tables/tableheading.png'> <font face='Verdana' size='2' color="#FFFFFF">Airline</font></th>
    <th align="center" background='images/tables/tableheading.png'> <font face='Verdana' size='2' color="#FFFFFF">Flight #</font></th>
    <th align="center" background='images/tables/tableheading.png'> <font face='Verdana' size='2' color="#FFFFFF">Origin</font></th>
    <th align="center" background='images/tables/tableheading.png'> <font face='Verdana' size='2' color="#FFFFFF">Arrival</font></th>
    <th align="center" background='images/tables/tableheading.png'> <font face='Verdana' size='2' color="#FFFFFF">Landing Rate</font></th>
        </tr>
       </thead>
       <tbody>
    <?php
    
    if(count($pireps) > 0)
    {
     foreach ($pireps as $pirep)
     {
       $pilotinfo = PilotData::getPilotData($pirep->pilotid);
       $pilotid = PilotData::getPilotCode($pilotinfo->code, $pilotinfo->pilotid); 
    
       echo "<tr>";
       echo "<td align=center background='images/tables/board.png'> <font face=Verdana size=2 color=#E8D33D> $pirep->firstname $pirep->lastname </font></td>";
       echo '<td align=center width=120px bgcolor=#000000><a href="'.fileurl('/index.php/pireps/viewreport/'.$pirep->pirepid.'').'"><img src="'.fileurl('/images/airline/'.$pirep->code.'.gif').'" alt="'.$airline->name.'" width="127px" height="32px" /></a></td>';
       echo "<td align=center background='images/tables/board.png'> <font face=Verdana size=2 color=#E8D33D> $pirep->code  $pirep->flightnum </font></td>";
       echo "<td align=center background='images/tables/board.png'> <font face=Verdana size=2 color=#E8D33D> $pirep->depname </font></td>";
       echo "<td align=center background='images/tables/board.png'> <font face=Verdana size=2 color=#E8D33D> $pirep->arrname </font></td>";
       echo "<td align=center background='images/tables/board.png'> <font face=Verdana size=2 color=#E8D33D> $pirep->landingrate ft/min</font></td>";
       echo "</tr>";
     }
    }
    else
    {
       echo "<tr><td>There are no recent flights!</td></tr>";
    }
    ?>
    
    </tbody>
    </table>

    The table is designed to show the last 10 flights. If you want the table to show more/less, you will need to change both of the following codes to show the amount you want.

    $count = 10;

    and change the number on the header from "Last 10 Flights" to the number you changed".

    images.zip

    • Like 1
  4. After a couple of days deep scanning these forums, I was finally able to find the code I was looking for.

    Thanks go out to Ian for posting this code in a post dated 14 May 2011 on this page: http://forum.phpvms.net/topic/5157-how-to-use-gc-map-insetad-of-google-maps/

    <img src="http://www.gcmap.com/map?P=<?php echo $schedule->depicao ?>-<?php echo $schedule->arricao ?>&MS=wls&MR=15&MX=720x360&PM=*" />

    Now I need to find out where I need to go in order to remove the Google map. I couldn't find it in Modules... :(

    Found what I was looking for.

  5. I am wanting to get rid of the GOOGLE map that shows up on the flight schedule view page. I want to replace it with the Great Circle Map one. What is the correct code to show the flights' route on GCM instead of GOOGLE? I think that I will need to change the MODULE to be able to remove the GOOGLE map itself, but what code do you place in the public_html/core/templates/schedule_details.tpl?

  6. I had to do a lot of configuring to see how much the amount of the fuel price should be in order to come out with a fair result of income and expense. I use the real price amount for every flight I have that the real airline charges per ticket. The amount I have set in the config file is 0.99 (this is in USD) If you want it in Euro, it is 0.72

    Once you have a few flights submitted after you change the fuel price, you can then come up with what expenses you want, then come up with a price you want to charge per expense.

  7. Not sure how exactly that can be accomplished. What you can do is enter your frontpage_main.tpl and add some coding in there manually to have it show. I don't know what your template is, or what the news module looks like since there is no link to your website. But you can try something along these lines....

    <h2><span></span>Newest Pages</h2>
    
                   <div class="body">
    
                       <a href="http://www.mywebsitename.com/index.php/pages/tours">Tours</a><br />
                       <a href="http://www.mywebsitename.com/index.php/pages/videos">Videos</a><br />
                 </div>
    
              	  <div class="box_bottom"><span></span></div>
               </div>

  8. Okay! Let's start with the page links.

    When you create a page from the Admin Center, you will notice that there are two (2) boxes on the bottom of the edit/create page. One says "Public" and the other says "Enabled". These two boxes determine who sees the links in the navigation menu. I have another post in here somewhere that describes their functions, but don't remember where, so I will explain what they do.

    Public: This means that the page link will show in the navigation menu whether or not you are a member of your Virtual Airline. If you take the check out of the box, the link will only show if you are logged in.

    Enabled: This means that the page link will show in the navigation menu to your members only. If you prefer to not have the link show in the navigation menu at all, then you will remove the check from the box**.

    **Removing the check from the box does not disable the page what-so-ever, it just determines whether or not you prefer to have it show in the navigation menu.

    Whenever I create a page, I leave both boxes empty, and direct link to the page from the Profile Center (profile_main.tpl).

    Now let's take care of your second question.

    I hope I understand you correctly. If you are wanting to display the link on another page or multiple pages, there are two (2) options you can do. Lets say that you have created a page called Videos. (The following examples will show you the different ways to show the link to Videos).

    OPTION 1: Text link

    <a href="http://www.yourwebsitename.com/index.php/pages/videos">Videos</a>

    OPTION 1 Result: Videos

    OPTION 2: Image link

    <a href="http://www.yourwebsitename.com/index.php/pages/videos">
    			<img src="http://www.yourwebsitename.com/images/profile/camera.png"><br/>Videos</a>

    OPTION 2 Result: (Hover over image) camera.png

    I hope you are getting the results you are looking for. ...happy coding

  9. I would be very interested in using it if you could explain if you can remove all the stuff in-between the navigation menu and the footer. The reason is, I have fully customized several pages (ex: schedule_results.tpl, profile_main.tpl and more). Mostly, I just want to completely remove the "Recent Reports" and "Newest Pilots" from the left and then be able to stretch the Main area to position itself left-to-right so it stretches the span.

×
×
  • Create New...