Jump to content

Hubs page module


Strider

Recommended Posts

  • 1 month later...
  • 1 month later...

I have a quick question.

I'll set the scene, I fill in Hub ICAO, PID, Name and all the info required and I click submit. Nice! However I made a mistake with the image link. Ok so I go and click edit hub and now all fields are blank and I can not simply edit the image link I have to fill in all that info again.

Is there a way we can pre populate those fields with already saved info so all we have to do is edit one filed or the other and not have to fill it all out again from scratch?

Edited by TAV1702
Link to comment
Share on other sites

Is that the case for all hubs? If not it could be that it is hiding the inactive pilots, if you go to line 115 in hubview.tpl/php either comment out that line or delete it, same with line 116 it is hiding all pilots with 0 hours. comment out or delete that and it will show all pilots, if that doesn't work it could be having a problem with talking to the db

Link to comment
Share on other sites

DOH! Yeah at least 1 hub is inactive. Nice catch. thanks for pointing that out. it is a new site and 2 hubs with 2 pilots. one at each hub. 1 has filed a pirep, the other has not.

Since we now know that culprit, that leaves the other hub where I am active and have filed 2 flights. the following is what I see.

http://prntscr.com/d2cmu5

And thanks for the reply and the module. I really appreciate it.

Ray

Link to comment
Share on other sites

New development in my saga.

When there is NO pilots assigned to a hub, I get the suggested message as coded, sorry but no pilot assigned to this hub or what ever it says. The second I assign a pilot to a hub, that message goes away, no pilots are shown and all it says is: Back

**EDIT**

On a side note, I commented this pagination code out and the pilot roster came to life.

<script type="text/javascript">
$(document).ready(function() {
$('#plist').dataTable( {
 "sPaginationType": "bootstrap"
} );
} );
 </script>
Edited by TAV1702
Link to comment
Share on other sites

  • 4 weeks later...

Hi Strider. Just a quick update.

I have the Blue Ice template by Eddie and a bootstrap template that I am working on, and onboth instances if I leave the pagination script in, it destroys the page layout and I will have no pilots list.

<script type="text/javascript">
$(document).ready(function() {
$('#plist').dataTable( {
 "sPaginationType": "bootstrap"
} );
} );
 </script>

Am I just looking over something real simple? I would love to use the newer style pagination that everyone has now but can go back to the old one if needs be. I'm really stumped. I am going to do a test install of the module on a vanilla phpvms that I have running locally and see if it does it then or not as well.

Link to comment
Share on other sites

I am hold with changing anything. I just found a phpVMS issue that until I get it solved, I can not in good faith alter anyone's code and say it don't work. lol That would be wrong of me.

Oh hey on a side note, I am back to the no fields being filled in thing and for the life of me I can not figure out why. Here is what I got going in exact order so you can follow along with me step by step. I tend to confuse people at times. :(

  1. I go to my admin panel and create a new airport in the phpVMS system and choose it to be an active hub.
  2. I go to the hubs module and before I have even added a new hub, there the airport is that I just added.
  3. Instead of adding a new hub since that one is already there I edit it.
  4. I add all fields necessary and click submit.
  5. I go to the hub page and realize I made a mistake.
  6. I go back to the admin panel, to the hub module, click to edit the hub and the fields are empty.
  7. Just to be sure it stored in the database even though I just saw it working on the hub_view page, I look in the database and sure enough, phpvms_hubs is populated with the hub info I added, but yet the fields in the admin panel remain empty.

I know I had this issue recently and solved it, but I don't know what I did. 1 thing I did try was simply to add a new hub anyhow even though it clearly existed and sure enough, all fields are empty.

Any clues chief? it's not hurting my feelings any lol just more of a aesthetics thing for me I suppose.

Link to comment
Share on other sites

  • 2 weeks later...
14 hours ago, TAV1702 said:

So after it all, i got everything working, except. How do you all get the groups and vatsim ID's and or images to show up? I have my vatsim id in my profile as well as added to groups and them two options don't show on the hubs page pilot list.

Are you talking about this?

http://prntscr.com/dje9kq

Link to comment
Share on other sites

Strange as I left that code in, as it is part of the code I use, so it should get them, check and see if it is trying to get an image that might be that cause. tbh without seeing the site I am unable to give a huge amount of help as I can't really grasp the problem throuogh text alone.

Link to comment
Share on other sites

2 hours ago, Keith said:

Are you talking about this?

http://prntscr.com/dje9kq

Yes, like that Keith. Maybe I set my profile fields up wrong int he admin panel? All these years of phpVMS and I have yet to ever setup a profile field. But here is no way I could set up groups wrong. :-D I did add an extra group just for the sake of doing so and called it something silly, and refreshed everything, cleared cache and all and nothing shows.

 

Hi Strider, thanks for the reply bud. Here is a link http://raybrowell.com/vSunCountry/index.php/Hub/HubView/KMSP 

I know when you see it you will know the code is changed. I can assure you your code is 100% intact. All I did was put on some lipstick and mascara basically.

Link to comment
Share on other sites

Here is what I have .


My custom profile fields.

IVAO ID

VATSIM ID

For VATSIM Column

<?php

$fieldvalue = PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID');

if($fieldvalue != '')

{

   echo '<a href="http://www.vataware.com/pilot/'.$fieldvalue.'" target="_blank"><img src="'.SITE_URL.'/xxxx/vatsim.png" alt="Vatsim ID" border="0" /></a>';

}

 ?>

 

For IVAO

<?php 
$feildvalue = PilotData::GetFieldValue($pilot->pilotid, 'IVAO ID');

if($feildvalue != '')
{
	echo '<img src="http://status.ivao.aero/R/'.$feildvalue.'.png" width="100" height="20">';
    }
    ?>

 

Link to comment
Share on other sites

Ok I'll give it a try. Thanks guys. (Quick update) Code change did not work. I'm thinking of backing up my file and dumping the default one in to try it out and see if it works. Maybe a tweak I made fudged something up. Unless you fellers got another idea. I know it is simple and right under my nose. lol

Any idea on the groups part of it? Not that the groups really matter to me. I could comment that out, I just don't want to alter any code until it is working as should be. I don't think it is fair to an author of code when someone reports an issue when they altered code. Get it to work first, bust out the editor next.

 

Thanks again guys, much appreciated.

Ray 

Edited by TAV1702
Update
Link to comment
Share on other sites

Well, I reverted back to the default template for hubview and it all works, but I have no pilots in the pilots list and the pilot has recorded flights so the pilot should be there. If I remove the java script for the pagination, the pilot shows in the pilot roster for the hub. Also, the Vatsim ID or image still don't show.

Any chance I can hassle one of you fellers in to taking a screenshot of your Profile field in your admin center? If you have extra fields you want to keep proprietary, feel free to blur. All I really need to see if Vatsim. IVAO would be ok to but not necessary.

And is there any screenshots I can get of my php MyAdmin that will show you guys what fields I have and how they are setup?

Link to comment
Share on other sites

Thanks Keith! that was it. My first initial setting was wrong as you all had pointed out previously. I had to make the Title all caps. Now if I can just figure out groups. and i got to come up with an image. I don't like using a default Vatsim image.

 

I thank you much for the help.

Link to comment
Share on other sites

I appreciate that Strider. I got to thinking about it, and if a guy is a member of 4 or 5 groups that little slot on the table is going to get full real fast no? The groups really is not a biggie to me looking back on things, I am more than happy with the module as it sits right now. Let me ponder the groups once more for a few minutes. I might just do a quick comment out of it and leave the code for a later go at it maybe.

Link to comment
Share on other sites

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