Jump to content

CarlosEduardo2409

Members
  • Posts

    224
  • Joined

  • Last visited

  • Days Won

    10

Posts posted by CarlosEduardo2409

  1. 3 hours ago, lukasc24 said:

    I installed Elaskin all good but whenever I try to login into the CrewCenter I just get a spinning circle indicating that it is loading but it never ends up loading.
    I am using free hosting
    Im on phpvms 5.2.2

    PHP V5.6
    Any help is appreciated

     

    You probably forgot to install any modules (Airmail and TouchdownStats).

    If installed, and correctly: what prefix did you configure when installing phpVMS? Make sure that the prefix of the AirMail tables is set to the prefix that you have configured. If it is the default prefix (phpvms_), you don't need to do anything.

     

    If you imported the SQL correctly, and fixed the prefix, you probably forgot to add a code to a file.

     

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

    After open, you need to paste this 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;
        }

     

    HOWEVER, the fact that hosting is free can also be the problem.

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

  3. 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" />

     

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

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

     

     

  6. 22 minutes ago, Nabeel said:

    Everything follows the Laravel way of doing things, so it uses routes and controllers.

    https://laravel.com/docs/7.x/controllers

     

    Routes all all defined in what are called Service Providers. The RoutesServiceProvider is here: https://github.com/nabeelio/phpvms/blob/dev/app/Providers/RouteServiceProvider.php

     

    Controllers are all located in this folder: https://github.com/nabeelio/phpvms/tree/dev/app/Http/Controllers

     

    You can lookup the route and see exactly which controller and method it maps to. I believe in that case, it maps to 

     

    For SimBrief, the definitions are here:

    https://github.com/nabeelio/phpvms/blob/dev/app/Providers/RouteServiceProvider.php#L78

     

    Which are all map to these methods:

    https://github.com/nabeelio/phpvms/blob/dev/app/Http/Controllers/Frontend/SimBriefController.php

    God! You are the man! One more time, thank you so much!!

    • Like 1
  7. @Nabeel, can you also take another doubt? In phpVMS 5.5, for example, we have the "core/modules/PIREPS/PIREPS.php", which says in a "wrong" way, it is possible to see the subpages, the functions it has, among others. Where would I find something like this in phpVMS 7? For example, "flights"? I saw that you get some simbrief files in "flights" folder at default skin (resources/views/layouts/default/flights/simbrief_briefing.blade.php), but I don't know which domain Its located (like "http://localhost/flights/simbrief"), I was trying to find it just like in the phpVMS 5.5 looking at the modules folder. I looked at the entire doc, but I didn't find it. I found a related one ("http/controllers/web.php"), but from what I understand it is only for "own" modules.

  8. 46 minutes ago, Nabeel said:

    Yes, I just mean if you're changing the DocumentRoot to phpvms, it should point to the public folder. Same thing for the webserver/vhost if you're running your own. Can I use your instructions on docs.phpvms.net? I'll add a section for xampp and link to this thread. Running Laravel in a subfolder is also usually problematic, so I don't recommend it.

     

    And thanks! I enjoy it and it's a fun project. Thanks for helping test and documenting/playing with some of this stuff.. There's a lot of edge cases I can't cover myself.

    No problem at all! You can put it in the docs without any problems! Thanks again, it is a really incredible project, especially for virtual aviation.

  9. 16 minutes ago, Nabeel said:

    Don't transfer the files, everything needed is already in the public folder. The htaccess in the root actually tries to redirect to public. In short - using the public folder hides all of the files like storage/resources, etc, so they're not exposed to the outside. It's a security thing.

     

    Here's a good explanation of the public folder: https://devdojo.com/articles/explaining-the-laravel-public-folder

    Okay, so I:

    1. I uploaded the phpVMS files normally to htdocs (Without transferring files from public to root).
    2. I changed the DocumentRoot in httpd.conf to DocumentRoot "C:/xampp/htdocs/phpvms/public"
    3. I entered the link normally and working perfectly.

    Unfortunately, the link phpVMS will be in will be: "https://localhost", so other projects will not work unless you change DocumentRoot to default (DocumentRoot "C:/xampp/htdocs/"). But these are things we have to sacrifice to get what we want...

     

    I don't know if that was your last message Nabeel, but already thanking you for the great work you are having and always had with phpVMS, it is not flattering and nothing, I am just saying this because we have to really thank you for this incredible project, because we have this opportunity, for being a free project, for the work you had and much more. Not only this project, but all other projects as well. This is not the opportunity we have every day. So, thank you again!

     

  10. 15 minutes ago, Nabeel said:

    This sounds good. I actually would change the DocumentRoot to the public folder, so in your case, DocumentRoot "C:/xampp/htdocs/phpvms/public". URLs will work without having the public in the path

    Okay, I put DocumentRoot in the "public" folder (DocumentRoot "C:/xampp/htdocs/phpvms/public").

    However, should I transfer the files from "public" to the "phpvms" folder? And how should I leave it in phpvms/index.php and phpvms/public/index.php?

     

    Excuse me for the question, I'm really still trying to understand the whole new phpVMS system haha

    And thanks for the answer.

  11. Is there a way to install phpVMS 7 on localhost (XAMPP)? Or is it not possible?

     

    I'm trying to install it several times, but it never works. The page that says "phpVMS not installed" (https://prnt.sc/siiqrn) loads normally, however when I press the "Head on to the installer>" button, it redirects me to the XAMPP dashboard (localhost/dashboard - https://prnt.sc/siiqz3) and not to the installation page.

     

    In the structure files looks like this (https://prnt.sc/siiq6o😞

    htdocs/ 
      ├── phpvms

     

    And in the phpVMS index.php it looks like this (https://prnt.sc/sije6o😞

    $path_to_phpvms_folder = __DIR__.'/../phpvms';

     

    phpVMS version: 7.0.0-beta.4

    php version: 7.4.5

     

    EDITED

    For users who are experiencing this problem when installing phpVMS on XAMPP, do the following:

    Solution 1: by @Laurent

    1. Go to your XAMPP control panel;
    2. And in "Config" button of Apache, select the file httpd.conf;
    3. Search for this line: DocumentRoot "C:/xampp/htdocs/" and change to DocumentRoot "C:/xampp/htdocs/phpvms"
    4. Close XAMPP completely and open it again.

    Solution 2 (Without moving files from the public folder): by @Nabeel

    1. Move phpvms files to your htdocs folder as normal, but WITHOUT moving files from the public folder to the phpVMS folder;
    2. Go to your XAMPP control panel;
    3. And in "Config" button of Apache, select the file httpd.conf;
    4. Search for this line: DocumentRoot "C:/xampp/htdocs/" and change to DocumentRoot "C:/xampp/htdocs/phpvms/public"
    5. Close XAMPP completely and open it again.

     

    NOTE: In both solutions, the link to phpvms will be "http://localhost", this means that other projects that are in the htdocs folder will NOT work. If you want to go back to normal (other projects working), you will have to go to httpd.conf again, and change the DocumentRoot to the default (DocumentRoot "C:/xampp/htdocs/").

     

    Solution by @Laurent and @Nabeel (Thank you so much again!)

    • Like 1
  12. 10 hours ago, LuxuryCEO said:

    I still say u should make a few skins for vms7 as its Gina be newer and vms5 will soon be obsolete once vms7 is released give or take a few months after release tho

    Yes, my idea was initially to do it for phpVMS 7, but due to my stress in the installation part, I ended up giving up and doing it for phpVMS 5. Even because my idea was to do several innovative things, something I would not be able to do with phpVMS 7 because of my knowledge and modules.

     

    Let think this: how many modules does phpVMS 5 already have? Are these modules essential for a larger reality? Yes! Fltbook and Airmail are examples, they are essential for a greater reality, however these modules still do not have for phpVMS 7, that's why I believe that phpVMS 5 will not be obsolete now, it will still be for a GOOD GOOD GOOD time.

    When phpVMS 7 launches, it has more modules, like a new Fltbook, Airmail, Events, among others, it would not be a bad idea to make a skin. Because if I had started a skin now, I would just leave default, without any module with nothing, especially without the "Reservation by the map".

  13. 10 hours ago, Mickey said:

    Is there a way to do this with openstreetmap? @web541

    Yeah, there is a way yes, and it’s not that complicated. Yesterday I posted my new skin, it has the map on the reservations page (using Leaflet/openstreetmap), if you want to download just to see the code feel free, i can't send you the code now because i'm not on the computer.

  14. 50 minutes ago, Nabeel said:

    Looks like it's a parser error with the backticks. Maybe post a bug report for Visual Studio Code or whatever the PHP plugin for syntax highlighting is

    Yes may be. Other errors also appeared in other files, but I knew there was no error in them, what happened was that I had some PHP Intelephense extensions in Visual Studio, and it was because of them that these errors appeared (in this case, this is the extension's function, but the errors appeared because he did not find the other files, e.g. a function in another file and I used it in another file, and there was an error because I did not find that that function it was in the other file). I deleted the extensions and the errors disappeared, but the error with the backticks didn't disappear, which leads me to think that the problem is with Visual Studio itself or my Visual Studio configuration.

  15. 1 hour ago, ProAvia said:

    I used Notepad++

    Ohhh, thanks!

     

    1 hour ago, ProAvia said:

    If you deleted the original RanksData.class and created your own - you are on your own. What was the purpose of deleting the original? What did you change in the one you "created"?

    I didn't create my own, I just deleted it and created it again, with the original code. Just to see if I hadn't inserted something without realizing it, that could give the error.

     

    1 hour ago, ProAvia said:

    It appears you are using MariaDB - if it is any version other than 10.1, you will probably experience issues. Change to MariaDB 10.1 or to MySQL 5.6 or 5.7.

    Apparently it is working now! You were right, I was with MariaDB, I already upgraded to MySQL and reinstalled phpVMS again, all from scratch and it's working now. 

    In my Visual Studio, the file is still the same as that photo, this is probably an error in my Visual Studio, but at least the code is working, that's what matters haha.

     

    So, Avia, thank you so much for your help! ❤️

  16. 1 hour ago, ProAvia said:

    I couldn't tell you if its a Visual Studio issue or not as I don't use it. Are you getting any errors in the error_log file or in the Chro e browser console?

    May I ask which editor do you use? I like to discover more programs haha, sorry for the question.

    I'm using XAMPP, so I have two errors log.

     

    In my XAMPP log:

    PHP Parse error:  syntax error, unexpected '' . $rank .' (T_CONSTANT_ENCAPSED_STRING) in C:\\xampp\\htdocs\\phpvms\\core\\common\\RanksData.class.php

    In core/logs:

    Backtrace: DB::write_debug > DB::get_row > RanksData::getNextRank > include > TemplateSet->getTemplate > TemplateSet->showTemplate > Template::show > include > TemplateSet->getTemplate > TemplateSet->showTemplate
    Query: SELECT * FROM phpvms_ranks WHERE minhours> ORDER BY minhours ASC LIMIT 1
    Error: (1064) - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY minhours ASC LIMIT 1' at line 2

     

    1 hour ago, ProAvia said:

    What exact file did you delete and create anew?

    I deleted RanksData.class.php, created it again and added the code (original, which was on github) again.

     

    1 hour ago, ProAvia said:

    Have you in any way edited the original downloaded files?

    None of the common files.

     

    EDIT: I installed phpVMS again, completely original, without editing anything, and it continues with the error.

     

    PHP Version: 7.2.19

    Apache: 2.4.39

    MySQL: I don't know where to see in XAMPP

  17. I don't know if it's just me (because Visual Studio does some crazy things), but in some common files, this happens:

     

    RanksData.class.php

    P62mBQF.png

     

    CronData.class.php

    5j2uAs9.png

     

    I don't know if it's a Visual Studio error, because if I use any of the functions above, they don't work, because they're in orange (I don't remember the name of this, like string... 🤔

    I already deleted the file and create new one, but all the same...

  18. 22 minutes ago, ProAvia said:

    No worries - just wanting to know the origin of the base templates. And not wanting anyone to step outside of the licensing of the template. Kin of keeps everyone safe - you and users of your skins.

     

    As a suggestion, include the original template license with your skins (you may already be doing this, just mentioning it here as a reminder to all). And maybe state in your documentation that the skin is based on <insert name and link here> template.

     

    Good luck with your new skins!!

    You are absolutely right, unfortunately I ended up not putting it in the right way on my old skin, I already corrected it, but I know it is a completely serious mistake, but I will be more attentive now, thank you very much.

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

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

  21. 7 minutes ago, ProAvia said:

    What base template are you planning to use for there two skins?

     

    I will probably make two skins and an admin panel, or an admin panel and one crewcenter. 

    I already started the crewcenter with the Stisla Admin Template, free version. For the admin panel, I will probably use the Argon Admin Template, also a free version. If I make another crewcenter, I will probably use the Purple Admin Template, also free version.

    But this is all just in my head, I'm very indecisive, so I'm not sure.

     

    I would love to receive your opinion, I appreciate you, moreover, in case I make a mistake, sorry, because I know that on the other skin I made a mistake, but I already fixed it.

     

×
×
  • Create New...