Jump to content

[Free] ElaSkin 2018 - Designed for phpVMS


CarlosEduardo2409

Questions  

31 members have voted

  1. 1. Did you like ElaSkin?

    • Yes
      27
    • No
      4


Recommended Posts

  • 1 month later...
  • 1 year later...
31 minutes ago, Qshad said:

Hi!

I am having a problem w/ ElaSkin


Fatal error: Call to undefined method StatsData::TotalPilotMiles() in /home/bosnaxxa/crew.bosnaxx-air.com/lib/skins/ela/profile_main.php on line 70

 

Hello @Qshad!

You will need to add TotalPilotMiles to the StatsData.class.php file. For this you must do:

1. Go to core/common/StatsData.class.php

2. After opening StatsData.class.php file, add the following code:

public static function TotalPilotMiles($pilotid) {
  $key = 'total_miles';
  $key .= '_'.$pilotid;

  $total = CodonCache::read($key);

  if($total === false) {
  $total = 0;
  $sql = "SELECT * FROM ".TABLE_PREFIX."pireps WHERE pilotid='$pilotid' AND accepted=1";
  $results = DB::get_results($sql);
  if($results) { foreach($results as $result) { $total += $result->distance; } }

  CodonCache::write($key, $total, '15minute');
  }
  return $total;
}

 

Like this: https://prnt.sc/qo9ari

 

I hope it helped you!

Link to comment
Share on other sites

14 hours ago, CarlosEduardo2409 said:

Hello @Qshad!

You will need to add TotalPilotMiles to the StatsData.class.php file. For this you must do:

1. Go to core/common/StatsData.class.php

2. After opening StatsData.class.php file, add the following code:


public static function TotalPilotMiles($pilotid) {
  $key = 'total_miles';
  $key .= '_'.$pilotid;

  $total = CodonCache::read($key);

  if($total === false) {
  $total = 0;
  $sql = "SELECT * FROM ".TABLE_PREFIX."pireps WHERE pilotid='$pilotid' AND accepted=1";
  $results = DB::get_results($sql);
  if($results) { foreach($results as $result) { $total += $result->distance; } }

  CodonCache::write($key, $total, '15minute');
  }
  return $total;
}

 

Like this: https://prnt.sc/qo9ari

 

I hope it helped you!

Hey! Yes you helped me!

But unfortunately partly.

There is only a loading screen. Nothing is loading. Infinite Loading Screen.

Link to comment
Share on other sites

4 hours ago, Qshad said:

Hey! Yes you helped me!

But unfortunately partly.

There is only a loading screen. Nothing is loading. Infinite Loading Screen.

Make sure you have the AirMail and TouchdownStats modules correctly installed. If they are installed, hit Ctrl + U on your site dashboard and on the page that opened (which will be the code of your page), see if you have any errors.

 

I am knowing about the demo site, I will see if I can host a new site somewhere.

Link to comment
Share on other sites

On 6/11/2018 at 6:19 PM, CarlosEduardo2409 said:

Hi @stifler13371,

 

So for fix this you need to go core/common and open StatsData.class.php

After open, you need to paste this code:


<?php
public static function TotalPilotMiles($pilotid) {
        $key = 'total_miles';
        $key .= '_'.$pilotid;

        $total = CodonCache::read($key);

        if($total === false)
        {
            $total = 0;
            $sql = "SELECT * FROM ".TABLE_PREFIX."pireps WHERE pilotid='$pilotid' AND accepted=1";
            $results = DB::get_results($sql);
            if($results) { foreach($results as $result) { $total += $result->distance; } }

            CodonCache::write($key, $total, '15minute');
        }
        
        return $total;
    }

 

Sorry for not coding, nothing I'm finding the function.

tried that, but for me the page keeps the same 😞

Link to comment
Share on other sites

3 hours ago, Tummi said:

hey i have no real error.. its just a page as shown:

 

http://prntscr.com/qprv7a

From what I see your error is because it is missing or has an error in TotalPilotMiles on StatsData.

First, to make sure you have no errors, go to your website and press Ctrl + U, it will open the view-source of your website, scroll down the page and see if there are any errors.

 

Attempt 1: To add TotalPilotMiles to StatsData:

  1. Go to core/common/StatsData.class.php
  2. At about line 21, add this code (make sure it is not inside another function).
<?php
public static function TotalPilotMiles($pilotid) {
  $key = 'total_miles';
  $key .= '_'.$pilotid;

  $total = CodonCache::read($key);

  if($total === false)
  {
    $total = 0;
    $sql = "SELECT * FROM ".TABLE_PREFIX."pireps WHERE pilotid='$pilotid' AND accepted=1";
    $results = DB::get_results($sql);
    if($results) { foreach($results as $result) { $total += $result->distance; } }

    CodonCache::write($key, $total, '15minute');
  }

  return $total;
}

 

Attempt 2: If you already have the code and don't have any errors showing, try changing your StatsData by the one below:

 

StatsData.class.php.zip

Link to comment
Share on other sites

  • 3 months later...
6 hours ago, HellenicTech said:

Amazing, just that the AirMail module provided doesnt include everything

 

 

Hi, thank you for your opinion and I'm sorry for AirMail, but I'm developing another new skin and in addition, admin panel too. In case you want to know more, I made another post talking about the project so I can know your opinion.

 

 

Link to comment
Share on other sites

16 minutes ago, ProAvia said:

What base template are you using for this skin and your 2 new skins?

 

For this skin, I used the ElaAdmin Template from Colorlib. But there is already a new version of this ElaAdmin, so the version I used disappeared from google, I couldn’t find it on the Colorlib website, just on another website (this one), but it says it’s paid, and it’s not, it was free.

 

For my 3 new skins (All free version):

CrewCenter: Stisla Admin TemplatePurple Admin Template

Admin Panel: Argon Admin Template

Link to comment
Share on other sites

  • Administrators

If the template is no longer freeware, I don't think you can continue to distribute any skin using it - unless you and/or the end-user pays for a license to this (now) payware template. I believe this would apply to each and every skin that is used from the date the template became payware.

 

I suggest you contact the template owner and get clarification on your continued usage of their (now) payware template in your original skin (which initially used the freeware template). It is possible that they updated the template and then made it payware. They may allow you to continue to use the freeware template version - but you will need to ask them. And get their response in writing to protect yourself and the user of your skin.

Link to comment
Share on other sites

13 minutes ago, ProAvia said:

If the template is no longer freeware, I don't think you can continue to distribute any skin using it - unless you and/or the end-user pays for a license to this (now) payware template. I believe this would apply to each and every skin that is used from the date the template became payware.

 

I suggest you contact the template owner and get clarification on your continued usage of their (now) payware template in your original skin (which initially used the freeware template). It is possible that they updated the template and then made it payware. They may allow you to continue to use the freeware template version - but you will need to ask them. And get their response in writing to protect yourself and the user of your skin.

I believe that they have just discontinued the old version and started a new one, not least because the new one is free too, in addition, the site that is talking about being paid for, is not from the original author, but I will be contacting them from anyway, i'm trying to find the contact, thanks.

Link to comment
Share on other sites

  • 4 weeks later...
1 hour ago, Nicholas said:

Hey, im pretty new to this. How do i install the modules? i have read the readme document but im still confused. Anyone able to run me through this?

 

- Nicholas

Hello Nicholas!

So, in this skin we have only 2 modules: AirMail 3 & TouchdownStats.

The installation is very simple, in both modules there is a folder called "core", and inside "core" folder we have more folders, which are usually the "modules", "templates" and "common" folder.

If you see the directory where your phpVMS is installed, we have this same "core" folder, and inside the same "modules", "templates" and "common" folder.

 

Basically, what you have to do is transfer the files from each folder to their respective location. 

 

(EXAMPLE) So it would be like this:

  • You transfer the files that are in the "core/common" folder of the TouchdownStats module to the "core/common" folder of the directory where your phpVMS is installed. The same for the other files (core/modules in your core/modules phpVMS installation, The same for the other files)...

Some modules come with a .sql file, which creates some tables in your database, AirMail 3 is an example. If you look at the AirMail 3 module, we have this "airmail.sql" file. To upload it, it's also very simple, you need to go to your database (phpMyAdmin), enter your phpVMS database and click on the "Import" button located on the top menu, it will open another page that it will be there where you should import this file, click on the "execute" button and if everything appears green, success!

 

 

Link to comment
Share on other sites

2 hours ago, Nicholas said:

Everything is in order, but wondering can i add my own logo, and change the favicon? I would also like to remove the live map if thats possible. Love this skin btw, thanks for your assistance.

Yeah, you can add your own logo and change the favicon.

 

Favicon (in lib/skins/ElaSkin/layout.php):

<link rel="shortcut icon" type="image/png" href="http://linktoaimage.com/favicon.png"/>

 

Live Map (in lib/skins/ElaSkin/profile_main.php😞

Open this github link, you will see some lines in yellow, in your FTP file, look for the same lines and remove those lines.

 

You can make any changes, but you MUST keep all the credits that are in the footer!

 

2 hours ago, Nicholas said:

Love this skin btw, thanks for your assistance.

I thank you for the use and care! It's the best reward I can earn.
Sorry for the delay, I ended up sleeping on the chair hahaha.

Edited by CarlosEduardo2409
Link to comment
Share on other sites

27 minutes ago, Nicholas said:

How do i upload the images?

Sorry, I didn't understand the question very well, I will kick it:

 

If you want to upload a file, you can just transfer it to your FTP and use the link to it, for example:

  • Let's assume that the image you are going to transfer is called: favicon.png
  • You can transfer an image at lib/skins/ela/images, then, complete would be like this: lib/skins/ela/images/favicon.png
  • To call, you can use the link and get to the image directory, however phpVMS offers the <?php echo SITE_URL; ?>
  • So, an example to call it a favicon:
<link rel="shortcut icon" type="image/png" href="<?php echo SITE_URL; ?>/lib/skins/ela/images/favicon.png"/>
  • Or some image:
<img src="<?php echo SITE_URL; ?>/lib/skins/ela/images/favicon.png" alt="some image" />

 

Edited by CarlosEduardo2409
Link to comment
Share on other sites

10 hours ago, Nicholas said:

I get 

 

Fatal error: Call to undefined method MailData::time_ago() in /home/vol11_1/epizy.com/epiz_25796808/htdocs/lib/skins/ela/mail/mail_inbox.php on line 87

 

at Pilot mail page

Do not install AirMail 3 default, install what is with my skin, as some files have been customized to work on ElaSkin.

 

However, to fix this error is simple: You need to have the time_ago() function in the MailData.class.php file, which is located at core/common/MailData.class.php (open this file) and in the link below, copy the lines that are in yellow and put it in your MailData.class.php file, but be aware of where you will put it!! You must place, at least below this line: class MailData extends CodonData {

 

https://github.com/carlosmfreitas2409/ElaSkin-2.0/blob/master/Modules (REQUIRED)/Airmail 3/core/common/MailData.class.php#L313-L347

Link to comment
Share on other sites

  • 4 weeks 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...