Jump to content

TOPPilot beta 1.0


simpilot

Recommended Posts

  • 1 month later...
  • 4 weeks later...

Hi all!

I have this module working, but I would like set it also in main page, so I have modified frontpage_main.tpl but I cannot make it work, can you help me?

Thank you

<div id="mainbox">

<?php

// Show the News module, call the function ShowNewsFront

// This is in the modules/Frontpage folder

MainController::Run('FrontBids', 'RecentFrontPage', 10);

MainController::Run('TopPilot', 'RecentFrontPage');

?>

</div>

<div id="sidebar">

<h3>Latest News</h3>

<?php PopUpNews::PopUpNewsList(5); ?>

<h3>Recent Reports</h3>

<?php MainController::Run('PIREPS', 'RecentFrontPage', 5); ?>

<h3>Newest Pilots</h3>

<?php MainController::Run('Pilots', 'RecentFrontPage', 5); ?>

<h3>Users Online</h3>

.

.

.

.

.

.

.

.

.

.

Link to comment
Share on other sites

  • 1 month later...

I am a novice user of phpvms, without any knowledge of php, database, mysql, or anything. Testing, reading forums, trying again but I managed to read up, install and configure phpvms and it is operating. Now I want to add some add ons, but I have fear of doing it wrong and lose all the work done so far (as happened to me once). The question is whether I can upload the Plugin configurator and install them easily this module. Top Pilot.

Sorry for my English, but if something was missing for all costs me more work is ... not speak English. I Read and understand some things, I write very few and not talk about anything.

Thank you for your patience and google translator for helping me with this issue. ;-)

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 2 weeks later...
  • 2 weeks later...
  • 1 month later...
  • Moderators

hello guys i installed everything working this year so that aparese top rider on the page that this is starting 1969 as I change??

Number of reasons.

1) Clear your phpVMS Cache in your Admin Settings, Maintenance and Clear Cache

2) It usually happens when you don't have a PIREP Filed yet

3) It shows up on the first day of the month, but it goes away soon.

Cheers! ;)

Link to comment
Share on other sites

  • 3 months later...
  • 3 months later...

so im trying to the top pilot by flights flown by month and im adding this

<?php TopPilotData::top_pilot_flights($month, $year, 5) ?>

and

<?php echo TopPilotData::top_pilot_flights($month, $year, 5) ?>

but it doesnt display anything...i ran the url to load the tables required and im still not getting anything...there is pireps and some have been filed and approved since i put the code but still...nothing....any help?

Link to comment
Share on other sites

  • Administrators

so im trying to the top pilot by flights flown by month and im adding this

<?php TopPilotData::top_pilot_flights($month, $year, 5) ?>

and

<?php echo TopPilotData::top_pilot_flights($month, $year, 5) ?>

but it doesnt display anything...i ran the url to load the tables required and im still not getting anything...there is pireps and some have been filed and approved since i put the code but still...nothing....any help?

Are the $month and $year variables being assigned prior to the call?

If so, is there data in the table for the time period you are calling?

This also only returns data, so you will want to assign it to a variable. To see what is there you can use

var_dump(TopPilotData::top_pilot_flights('08', '2013', '5'));

Link to comment
Share on other sites

  • Administrators

simpilot where would that code go? Lol Sorry im not good with this stuff lol

If you mean the code that Vanity is refering to, it would be most preferable to assign it in your controller -

$this->set('topflights', TopPilotData::top_pilot_flights($month, $year, 5));

Then in your template the data would be available in the $topflights variable.

You could also put it in your template and assign it to a variable there, which kind of defeats the MVC concept but -

$topflights = TopPilotData::top_pilot_flights('08', '2013', '5');

Then use it in your template just as above.

Link to comment
Share on other sites

  • Administrators

Okay I have placed the code just in the template like this:

<?php echo $topflights = TopPilotData::top_pilot_flights('08', '2013', '5'); ?>

Would that work?

No, you will need to loop through the data and echo that out, what you have there will not do much. To see what data is coming back that you can use you can do:

var_dump($topflights);

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 months later...
  • 2 months later...

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