Jump to content

Hubs page module


Strider

Recommended Posts

  • 3 months later...

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?

Link to comment
Share on other sites

  • 6 months later...

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 6 months later...

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 by TAV1702
Link to comment
Share on other sites

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

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.

post-50275-0-97930600-1469557446_thumb.png

Link to comment
Share on other sites

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 by KnoxVegas
Link to comment
Share on other sites

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 :P

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?

Link to comment
Share on other sites

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 by KnoxVegas
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by web541
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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