Code Snippets
Pieces of code you can use around your site
314 topics in this forum
-
- 5 replies
- 2.7k views
I would like to set something up on Pilots Profile where only people in Groups can see the content, this has failed. I wondered whether anyone knew a code that would work were only Certain groups can see the content.
Last reply by TAV1702, -
- 6 replies
- 18.2k views
I did this as a favor for someone, but I figured I'd share it with everyone.. you know, spread the wealth. This code simply reads the RSS feed that SMF outputs (of the latest posts) and returns it as a list (with the option to make it linkable). The implementation technique can vary, you could include the file, or just copy and paste it into your page (~100 lines). <?php /** SMF Forum RSS Feed to Latest Posts List Built for phpVMS www.phpvms.net Built by Lorenzo Aiello www.la92.com **/ /********* CONFIGURATION *********/ // Full URL to your SMF installation, WITH trailing slash $board_url = 'http://forum.yourwebsite.com/'; // Want the list to be linkable?…
Last reply by Strider, -
- 14 replies
- 9.5k views
Good day, I'm trying to display current bids, in table format, in the main body of the front page without much luck. The problem is that no data is displayed even though there are bids, there are also no error messages displayed. Any help would be greatly appreciated. Many thanks Mark
Last reply by Harryh, -
- 10 replies
- 7.2k views
A great site for worldwide notams & weather at specific airports is notams.com I have found this to be the most reliable and widest coverage of the offerings. Especially if your not US based. It can be integrated using the following code in schedule_breifing.tpl <td width="50%" ><?php echo "{$schedule->depname} ($schedule->depicao)"; ?><br /> <a href="http://<?php echo $schedule->depicao?>.notams.com/Weather" target="_blank">Click here to check the Notam's & Aiport Info</a></td> <td width="50%" ><?php echo "{$schedule->arrname} ($schedule->a…
Last reply by CPC900, -
- 13 replies
- 10k views
This may have been covered before but is there a way to Put the ADD BID link on the Pilot Brief page. This would help my pilots so that instead of hitting the back button on their browser they could just add the bid to their schedules from the Pilot brief page. When you use the back tab it bring up all the current schedules. Any ideas? I tried to put the add bid code in from the schedule_results.tpl on to the schedule_briefing.tpl page and all I got was the word ADD BID but it had no action to it. Thanks for any help in this,
Last reply by AUZ, -
- 3 replies
- 3.6k views
Nabeel, i have a pilots list currently displayed in the va stats, listed i have all the countries displaying the flag and location in a table (for anyone else this is the code)Page in action <?php echo '<td align="center" width="250px" valign="top">'; echo '<table cellspacing="1" cellpadding="1" border="1">'; echo '<th width="150px"><div align="left">Country Location</div></th>'; echo '<th width="100px"><div align="center">Pilots</div></th>'; $country_info = DB::get_results('SELECT COUNT(pilotid) as total, location FROM '.TABLE_PREFIX.'pilots GROUP BY LOCATION'); foreach($country_info as $country) { echo …
Last reply by Nabeel, -
- 2 replies
- 2.2k views
I want to change the title to the Russian language, in which file can I change this? I was looking but never found! Schedules - KD Avia Profile - KD Avia Thanks!
Last reply by Artjom, -
Pirep times
by Alex- 4 replies
- 2.9k views
I have been getting complaints in relation to the filing of Pireps and in particular the flight duration box. We know that 5.3 = 5 1/2hrs or 5 hours 30 minutes. however some people have difficulty with this ???? is there a code snippet to include a box "hours" "minutes" in text format so that this issue can be resolved? Any help with coding would be appreciated, even if it's just to get the monkey off my back.
Last reply by Alex, -
- 16 replies
- 4.9k views
Hey Guys, Well this is a record, I aint asked for help for a bit of time! Ok, So is there a way to do something like this... (UK FLAG) Total Pilots: 100 (US FLAG) Total Pilots: 100 (DE FLAG) Total Pilots: 100 etc... Thomas.
Last reply by mark1million, -
- 2 replies
- 2.6k views
Hey guys, Im trying to have some kind of a document center in my pilot center, So I created a category in the downloads called Documents, Now I want to display only that Category in the Profile_main.tpl I used <?php MainController::Run('Downloads', 'index'); ?> and it displays all the downloads. How would I accomplish this could I use an IF statement? Thanks, Chad C.
Last reply by piper338, -
- 4 replies
- 3k views
Hello users I will make a Last Flight and Date in pilot center and pilot public center! This code works in "Pilot Center" <li><strong>Last Flight: </strong><?php echo $report->code . $report->flightnum; ?>(<?php echo $report->submitdate; ?>)</li> And I will Last Flight and Date works in Pilot Public Profile How can I create this? please help. Best regards.
-
- 11 replies
- 5.4k views
1_Edit the "frontpage_main.tpl" in /core/templates or /lib/Skins/. 2_ Place this code: <h3>Users Online<br /> <?php $usersonline = StatsData::UsersOnline(); $guestsonline = StatsData::GuestsOnline(); ?> </h3> <h4 class="style6">Pilots Online </h4> <?php foreach($usersonline as $pilot) { echo "<p>"; echo '<img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot->location).'" />'; echo " {$pilot->firstname} {$pilot->lastname}<br />"; echo "</p>"; } ?> <br /> Have <?php ech…
Last reply by Thomas, -
Getting airport country names
by Guest chikolol- 3 replies
- 3k views
sorry to post this again, i know i have posted this before but no one answers me, how can i call for the country name of the airport to show in schedules details along with the airport name, i know something like $schedules->name pulls our the airport name but how about $schedules->country would that work?
-
- 0 replies
- 2.1k views
This topic has been moved to Releases. [iurl]http://forum.phpvms.net/index.php?topic=2091.0[/iurl]
Last reply by Nabeel,