Longhaul444 Posted December 24, 2014 Report Posted December 24, 2014 No problem I was even looking at maybe adding to the hubs database on the server to see if it took as a work around. No rush, especially with the holidays. This can wait till after. enjoy yourself and your family Quote
VAF55 Posted April 11, 2015 Report Posted April 11, 2015 Got one issue: Can't get the hub manager name to display on the Hub View pages. How is that accomplished? Quote
Strider Posted April 12, 2015 Author Report Posted April 12, 2015 You have to edit the airports table in the db, and add that to the database structure. Quote
VAF55 Posted April 12, 2015 Report Posted April 12, 2015 You have to edit the airports table in the db, and add that to the database structure. I've added the item, hubmanager, to the table, phpvms_airports. I don't see that field on the Airports form in the Admin Console. So there's no way to indicate the hub manager for an airport. When I created the item in the database table it was named, hubmanager, type=text, collation=utf8_unicode_ci. Is there any other information needed or files to be edited? Quote
natcret Posted November 2, 2015 Report Posted November 2, 2015 Followed the instructions. The only thing that is unclear is the "insert airports" under the instructions. I just want to make sure that I am inserting via the admin panel within phpvms. I do see all of the airport hubs that I had previously setup before using the Hubs Module. However, I get the following error: Strict standards: Non-static method HubData::get_hub() should not be called statically, assuming $this from incompatible context in C:\wamp\www\core\modules\Hub\Hub.php on line 19 I know from working with other modules that sometime you have to insert "static" between the public and function statement in the hubs.php file. However, when I do, I get this error: Fatal error: Using $this when not in object context in C:\wamp\www\core\modules\Hub\Hub.php on line 19 Any ideas? Quote
Strider Posted November 2, 2015 Author Report Posted November 2, 2015 It was made before php 5.5 came out so I have to look at updating it to current standards. Quote
natcret Posted November 3, 2015 Report Posted November 3, 2015 Thanks Strider for creating such a cool module and for responding back. Regards Quote
Strider Posted November 3, 2015 Author Report Posted November 3, 2015 the problems have been fixed it is now php 5.5 compatible Quote
natcret Posted November 5, 2015 Report Posted November 5, 2015 Thanks again! All is working fine. I do get the following at the top when you view the hub: "$manager = HubData::get_hubs($hubs->icao);" I assume that is related to the post a little ways above regarding adding to the database? Just so I understand, I should add the item "manager" to the specific hub airport's data table. Quote
Strider Posted November 5, 2015 Author Report Posted November 5, 2015 Is it showing on the page or are you seeing it in the code? Quote
natcret Posted November 6, 2015 Report Posted November 6, 2015 Is it showing on the page or are you seeing it in the code? Showing on the hubview page as recreated below: information $manager = HubData::get_hubs($hubs->icao); Hub ICAO: KCVG Airport Name: Cincinnati Northern Kentucky International Airport Latitude: 39.0488 Longtitude: -84.6678 Hub Manager: KCVG map Quote
Strider Posted November 6, 2015 Author Report Posted November 6, 2015 <?php $manager=HubData::get_hubs($hubs->icao);?> That piece of code should change that, and stop that from showing on the page. Quote
natcret Posted November 7, 2015 Report Posted November 7, 2015 Thanks Strider! Who would a thought...two spaces Worked like a charm! Quote
TAV1702 Posted May 8, 2016 Report Posted May 8, 2016 (edited) So its safe to say that the download link in the first post is now accurate of a few fixes? I do have the original module that was released and have been itching to get it updated and working right. One thing, in the admin center, it has a area for Pilot ID.... What? And obviously the hub manager is self explanatory. Is that feature fixed now as well and the airport image? Thanks for the module either way. Edited May 9, 2016 by TAV1702 Quote
in2tech Posted May 18, 2016 Report Posted May 18, 2016 How do I show the retired or inactive pilots? Quote
mattsmith Posted July 12, 2016 Report Posted July 12, 2016 (edited) Could someone show me how to get the hub managers showing. Edited July 12, 2016 by mattsmith Quote
Strider Posted July 12, 2016 Author Report Posted July 12, 2016 You have to add them manually to the db, you will have to create the row in the airports db, look at the code and you will know what to call it. Quote
ShredMountains Posted July 25, 2016 Report Posted July 25, 2016 Sorry to bring this back from the dead but I would love to use this and no matter how I add this info to the database it almost seems like nothing at all will show up? Any help on this would be great! Quote
Strider Posted July 26, 2016 Author Report Posted July 26, 2016 Sounds like it is either corrupt, you may need to reinstall it, or you are missing a file or have named something wrong. Quote
ShredMountains Posted July 26, 2016 Report Posted July 26, 2016 Hmm, just went to your github link download and over wrote everything. Im copying the lat and long from inside phpvms that it gives me for KDEN. The Pilot ID i put as 1 for me, and the name I just put my full name? Maybe that is where I went wrong? Looking in the database this is what I see in the attached mysql database. Quote
Strider Posted July 26, 2016 Author Report Posted July 26, 2016 make sure the pilot id matches exactly what it does in the pilots db, iif not, it wont show as it wont find it. Quote
ShredMountains Posted July 27, 2016 Report Posted July 27, 2016 (edited) I used both on the backend of phpvms and in the database is set to 1 and the int value set to 1 for the hub manager, but it does not show anything, also I tried to change the type from int to text and changed the text to KVT0001 and then edited it in phpvms but still shows a blank? Could it have something to do with the phpversion?? Edited July 27, 2016 by KnoxVegas Quote
web541 Posted July 27, 2016 Report Posted July 27, 2016 Shouldn't have anything to do with the PHP Version (I don't think), but you're more than welcome to let us know what it is anyway Try deleting the phpvms_hubs table in your database and running this SQL Query again. CREATE TABLE IF NOT EXISTS `phpvms_hubs` ( `hubid` int(11) NOT NULL AUTO_INCREMENT, `hubicao` varchar(4) NOT NULL, `image` varchar(255) DEFAULT NULL, `hubname` varchar(255) NOT NULL, `lat` float NOT NULL, `lng` float NOT NULL, `manager` varchar(100) NOT NULL, `pilotid` int(11) NOT NULL, PRIMARY KEY (`hubid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; Then don't touch anything in the database and re-add the hub manager via the admin panel and see if anything happens. Just to confirm you are on the .tpl version of phpvms? Quote
ShredMountains Posted July 28, 2016 Report Posted July 28, 2016 (edited) Yes, im sure im running whatever old version in on the main phpvms github, but yes its the .tpl files. Did the above and still run into the same thing... But upon doing this and then going to see if it put anything into the database it looks as though its not even putting what I enter from the admin panel into the database? Edited July 28, 2016 by KnoxVegas Quote
web541 Posted July 28, 2016 Report Posted July 28, 2016 hmm, can you verify that your table prefix is phpvms_ and not something else. In other words, the table name is phpvms_hubs Quote
Strider Posted July 28, 2016 Author Report Posted July 28, 2016 Having the table prefix as phpvms_ doesn't matter, as I havge coded it to whatever the prefix you use is, you can always change the name of the db table phpvms_hubs to whatever prefix you use for your phpvms installation. If using simpilots version of phpvms make sure the template files are .php not .tpl as they wont work if they are .tpl. Quote
web541 Posted July 28, 2016 Report Posted July 28, 2016 (edited) Having the table prefix as phpvms_ doesn't matter, as I havge coded it to whatever the prefix you use is, you can always change the name of the db table phpvms_hubs to whatever prefix you use for your phpvms installation. If using simpilots version of phpvms make sure the template files are .php not .tpl as they wont work if they are .tpl. He's stated here that he's using .tpl files and not all of your code has the ".TABLE_PREFIX." code in it. Edited July 28, 2016 by web541 Quote
ShredMountains Posted July 29, 2016 Report Posted July 29, 2016 (edited) I'm using like 2.1.936 is there a newer version of phpvms that I'm missing? Edited July 29, 2016 by KnoxVegas Quote
web541 Posted July 29, 2016 Report Posted July 29, 2016 Yeah, it's phpvms 5.5.x by Simpilot found here but that shouldn't be an issue (thought I do recommend upgrading for the future as most people have ported over) Can you go into your core/local.config.php file and find these Config::Set('DEBUG_MODE', false); Config::Set('DEBUG_LEVEL', 1); // 1 logs query errors, 2 logs all queries And change them to this Config::Set('DEBUG_MODE', true); Config::Set('DEBUG_LEVEL', 2); // 1 logs query errors, 2 logs all queries Once done, go to your admin panel, add a new hub as normal and then open up core/logs/log.txt and post what you have in there. (NOTE: it may take a few goes to get it to log) Once that's done, you can go into your core/local.config.php file and change these back to the original Config::Set('DEBUG_MODE', false); Config::Set('DEBUG_LEVEL', 1); // 1 logs query errors, 2 logs all queries That should allow you to see if it is a query issue or not. Also (I know it's already been suggested) but do check to see if you have the correct files in the correct places. Quote
ShredMountains Posted July 29, 2016 Report Posted July 29, 2016 Number one question for sure, how can I upgrade everything I have now to to the new version? Since I already have a install is there a post somewhere on this? Also also here are the results from the suggestions above. Does not look like it has anything to do with the hub info though? ===== Time: 07.29.16 10:53:40 ===== Time: 07.29.16 10:53:40 Backtrace: DB::write_debug > DB::query > PilotData::updateProfile > Auth::ProcessLogin > Login->ProcessLogin > Login->login > Login->index > call_user_func_array > MainController::RunAllActions Query: UPDATE phpvms_pilots SET `lastlogin`=NOW(), `lastip`='ipaddresshere' WHERE `pilotid`= Error: (1064) - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ===== ===== This was all I got though.. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.