Ok, i found out the solution. The new version of the module uses a different database prefix. Please replace the old function with this one:
public function countpending() {
$query = "SELECT COUNT(id) AS total FROM phpvms_screenshots WHERE file_approved='0'";
$check = DB::get_row($query);
return $check->total;
}
Pilot Academy V2.3
Minor design changes on the admin part of the module.
The new version has been updated on the demo system. Also, we decided to reduce the price for this module in order to help you buy it and offer trainings/checkrides to your pilots. The new price is 40$ and it will remain forever (it is not just an offer). Of course, there is NOT ANY difference in the module due to the price reduction. The Pilot Academy module can be purchased via our billing system. More information can be found here.
Thank you all for your great support! If you have any suggestion or request do not hesitate to get in touch with me!
Put this function on your ScreenshotsData.class.php file:
public function countpending() {
$query = "SELECT COUNT(id) AS total FROM screenshots WHERE file_approved='0'";
$check = DB::get_row($query);
return $check->total;
}
and after that, edit your sidebar_dashboard.tpl file and use this:
<strong><a href="<?php echo SITE_URL?>/index.php/screenshots/approval_list"><?php echo ScreenshotsData::countpending(); ?></strong> ScreenShots Pending</a><br />
The solution is the same with the plugin manager module. Just change the extensions of the files which are on the templates folder of the module from .tpl to .php.
I don't think that it's what he wants. I understod that he want to assign specific ranks for each staff member via the admin center.
I think that it can be done, of course you need to turn off the auto ranks calculate.
I have created a function which counts the pending screenshots. After that, you can include that on your admin center sidebar
Please let me know if you are interested...
Why don't you tell it from the beggining? You want us to customize a table in which we have not access to it? In the database function which selects your pilots, add this:
ORDER BY joindate ASC
Let me know if you have any question.
Open screenshots_random.php file on your templates/screenshots folder and replace this line:
echo '<b>Random Screenshot!</b><br /><img src="'.SITE_URL.'/pics/'.$screenshot->file_name.'" height="125px" width="180px" alt="Random Screenshot" />
with this one:
echo '<b>Random Screenshot!</b><br /><a href="'.SITE_URL.'/index.php/Screenshots/large_screenshot?id='.$screenshot->id.'"><img src="'.SITE_URL.'/pics/'.$screenshot->file_name.'" height="125px" width="180px" alt="Random Screenshot" /></a>
PS: Just submitted a pull request on github.
As i can see your pilots are now ordered correctly... http://www.flyaka.com/index.php/pilots Which list are you trying to order because the list in the screenshot is different from the one i can see on the link i gave you.
I would not suggest this because lib folder includes also your pilot's signatures which might be placed on forum signatures, third part websites etc (like Strider's signature for example)...
Ok, can you open your local.config.php file and check how is its first line? Is there any "funky" character (for example ~,`, etc) or a space before
<?php
If yes, remove it and save the local.config.php file.