Jump to content

TAV1702

Members
  • Posts

    1954
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by TAV1702

  1. Well, I made a mistake on the last try. I edited the wrong frontpage_recentpilots.tpl. I edited the one in core, not in my skin folder. I now went back and edited the one in my skin folder and the table is there, but once again it is showing every pilot. Should I have delted the orginal code from that file, or left it there?
  2. Well that actually narrowed down the pilots to 5. BUT it got rid of the table in the process.
  3. DOH!!!!!!! Now I got ya. Lordy lordy. I look way to far in to things don't I tom? I totally got you now. Thanks. I really appreciate it.
  4. Well, I like my table how it is now, I simly need it to only call 5 pilots. I am not sure how I would do that to be honest. Here is my frontpage_recentpilots.tpl <?php foreach($pilots as $pilot) { if($pilot->confirmed != 1) continue; ?> <p><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"><?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid). ' ' .$pilot->firstname . ' ' . $pilot->lastname?></a></p> <?php } ?>
  5. Ahhh I found it. <h3>Newest Pilots</h3> <?php MainController::Run('Pilots', 'RecentFrontPage', 5); ?> That is the code Nabeel used to call the 5 most recent pilots in the frontpagemain.tpl file. Notice with my code, I did not tell it to only show me 5 pilots. That is where I am in trouble at. In my side bar area, ALL the pilots are now being listed instead of 5.
  6. Well, I should clarify what I am referring to. Originally, we could use a call in the side bar area to show the most recent 5 pilots. In the call it had the (5) in it. That told it to only show us 5 recent pilots. Now with my table, that option is gone and it is pulling all 5 pilots. Please keep in mind that I have never edited the frontpage recent pilots tpl file. That code I gave is what I put in my layout.tpl file for my side bar area statistics. I would give the original code Nabeel used to use but I can no longer find it.
  7. There is not one that I know of. Might I make a suggestion to you? I would download a free app called WAMP. It is very easy to use and is free. You can setup a website on your very own computer and setup a database and all. It comes bundled with sql, apache, phpmyadmin. Simply create a database, copy the phpvms folders to it and off you go! This is not only good for the purpose that you are wanting to do now, but in the future, you can develop all your website needs on your local host server and then when it is all ready to go public, you can upload to a regular hosted package on the net. And as far as phpVMS goes, it is a very good piece of software for free. I have used the pay ones in the past and they do not even come close to phpVMS. **DISCLAIMER** I do not work for or have any relations to WAMP or phpVMS other than a dedicated user. they are both great products.
  8. And the plot thickens...... According to the statistics, only one flight flown haqs ever been a cargo flight according to the pireps table in the database. All the flight numbers reflect cargo flights, but only one was recorded as such. KACARS. All the cargo flights flown using FSACRAS and Manual, as well as filing with XACARS are recorded as passenger flights in the database. SO When a pirep is filed with anything BUT KACARS, it is wrong. If fly a cargo flight with KACARS, it is recorded in the database correct as a cargo flight. I would easily drop FSACRS and XACARS on the spot, but at bare minimum, manual filing has to work. No way around it. **EDIT** I just went in to the database and fixed a few of the flight types that were recorded wrong and low and behold, all the statistics numbers are adjusting the way this code was meant to show them. **EDIT AGAIN** THis issue is solved as of today 4/11/11
  9. Well, I copied 100% of the given code above and tried it out and guess what? The passengers carried number never changed. Now I know why. When it is checking the database for cargo flights, it is showing me in the statistics that I only have 1 cargo flight total. Uhhhhh no. Not accurate. I have 12. I exported a fresh copy of the schedules this morn and sure enough it shows 12 of my flights as cargo and the rest as charter and cargo. I then went and triple checked my db and it shows the same exact flights as the csv file as being cargo flights.
  10. Hi guys. I have a slight situation going on here. On my front page, I got rid of the recent pilots as it was originally and created a table instead. Now instead of it showing only the 5 most recent pilots, it is showing all the pilots. I have accidentally created basically another pilots roster. How can I create this and keep it looking good in a table and only have it show the 5 most recent pilots like it originally does out of the box? <div class="mainblock"> <h2>Newest Pilots:</h2> <div class="block"> <table> <thead> <tr> <th width="50%" scope="col">Pilot ID#</th> <th width="50%" scope="col">Name</th> </tr> </thead> <tbody> <?php foreach($allpilots as $pilot) { /* To include a custom field, use the following example: <td> <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?> </td> For instance, if you added a field called "IVAO Callsign": echo PilotData::GetFieldValue($pilot->pilotid, 'IVAO Callsign'); */ ?> <tr> <td><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a> </td> <td><?php echo $pilot->firstname.' '.$pilot->lastname ?> </td> </tr> <?php } ?> </tbody> </table> </div> </div> This is what I am using as we speak. Like I said, it will not limit to 5 pilots. I know why, but as it was originally, I could not get it to work in a table.
  11. I have never personally tried to do any of that so I will leave it up to another user to help out on that one. Hope it all works out good for you. phpVMS is sure fun to mess around with. The rewards for all are a great website and fun for all who use it!
  12. Well, lets see who can beat who to it. lol I am not a pro at php at all. I am in my first php class at school as we speak. So it takes me a while to come up with stuff on my own. I hate being a newbie still after 9 years of doing this kind of stuff.
  13. And the code I used was what was pasted above minus the tt parts. Obviously I had to change them to fit the needs of my site. <tt> Total Pax Carried: </tt><?php $query="SELECT SUM(`load`) as totalpax FROM `phpvms_pireps` WHERE `flighttype`='P'"; $result=DB::get_results($query); echo $result[0]->totalpax; ?> <?php echo Persons; ?><br /> <tt>Total Cargo Carried: </tt><?php $query="SELECT SUM(`load`) as totalfreight FROM `phpvms_pireps` WHERE `flighttype`='C'"; $result=DB::get_results($query); echo $result[0]->totalfreight; ?> <?php echo Kgs; ?><br /></div> Or should I have used the entire bit of code that was posted instead of just what I needed? I went back again this morn and grabbed a csv file and verified the cargo flights types and I looked in the database too as well as verified each flight through the schedules. I am positive they are marked as cargo and not charter or pax.
  14. Everything is default. I never change anything database related. It is how it was installed. Why mess witha piece of work that is proven to begin with and one of if not the best working around? And thanks for the help on this one guys. I appreciate it. This has been causing quite a buzz on my test site the last week or so. It was just kind of ironic you guys all started talking about it at about the same time I noticed the problem.
  15. But to answer your question, I actually copied the main area css and renamed the copy to mainarea2. On EVERY tpl file I had to add a mainarea2 div tag and two closing div tags. Took a really long time to do. Also when I copied the mainarea class I removed the side bar image and widend up the enitre main area 2 to fill 100% of the content. It worked out smooth, but man was my girlfriend mad as hell at the time spent making it work.
  16. Well, the side bar is nice to have on the front page, but as for the rest of the site, it really gets in the way when adding features. I played hell with mine, but all in all it turned out pretty dam sweet. Then I added a nice drop down menu to it too. But yeah, the side bar is a pain in the arse for sure.
  17. Man, that is a LOT of work to do. I did it on my test site and I ended up editing every single tpl file there was and adding them all to the Brilliance skin. I think in all, I edited like between 80 and 100 tpl files so far. A quick search on the forums would have revealed that fact that I tried the trick on here to hide the side bar, but it did not work out so well. Do a quick search for hiding the sidearea. My fix so far is the only one that worked. Be prepared to do about 5 or more hours of work to get it right.
  18. Any way at all to make it pull stats for each pilot? Like now it has 2 tables. Top Pilots All Time (Hours Flown) and Top Pilots All Time (Flights Flown) and in those it lists the pilots stats accordingly. I am curious if we can pull the miles and make it in to an Top Pilots All Time (Miles Flown) and have it list the pilots totals like it does for the other two. And on a side note, can your table above tell the difference between actual passengers hauled and cargo hauled? Right now the stats I have on my front page are counting cargo loads as passengers too. Now that I added cargo flights, my passengers hauled has went through the roof. I posted in another thread about that though so I'll be quiet about that in this thread.
  19. Hey fellers, I am curious to know if it is at all remotely possible for this to keep track of all time miles flown too. I was looking and there is nothing for all time miles in PilotDataClass.php from phpVMS. Curious if it would be possible to tweak Top Pilot module to keep track instead or what. Has anyone else pulled this off? And if so, care to share maybe? I figured since it is able to track all time hours and flights, why not miles too. That would be the cats meow!
  20. open your layout.tpl file. Find </div><!-- Sidearea Ends --> Add your code BEFORE. That should get you where you need to be.
  21. Unless I read your post wrong and I am way the hell off topic. Which I believe I was.
  22. I think by default that is supposed to happen without calling anything special. Mine did. I then added the aircraft registration to it so now instead of just B747-400 it shows as B747-400 N689ME. And that is the exact aircraft that is scheduled for that flight of the briefing page being viewed.
  23. Your first choice would be to look on the layout tpl file or front page main. BUT I suggest looking at layout.tpl file first.
  24. Well, I tried that and it echoed persons after the number which in my case stayed the same. I wonder if I should have deleted my cache and all that good stuff in the maint center to get the number to reflect accurately.
×
×
  • Create New...