Daniel Posted November 27, 2010 Report Share Posted November 27, 2010 Hello, I would like to show the hub the pilot is in the the profile_main and the public_profile... could i have the code please. I did a search and i had saw it here but cant find it. thanks Daniel Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted November 27, 2010 Administrators Report Share Posted November 27, 2010 In the public profile you could use a print_r temporarily to find what info is available in the local variable, in the case of the public profile page it is $userinfo; <?php print_r($userinfo); ?> When you do this you will get a printed string in the page something like stdClass Object ( [pilotid] => 1 [firstname] => Dave [lastname] => Clark [email] => dave.clark@virtualaca.net [code] => ACA [location] => US [hub] => CYHZ [password] => xxxx [salt] => xxxxx [bgimage] => approach.png [lastlogin] => 2010-11-23 [totalflights] => 11 [totalhours] => 20.11 [totalpay] => 1816.5 [transferhours] => 50 [rankid] => 13 [rank] => Chairman Of The Board [ranklevel] => 13 [confirmed] => 1 [retired] => 0 [joindate] => 2010-05-09 13:51:09 [lastpirep] => 2010-07-21 23:50:40 [lastip] => 127.0.0.1 [comment] => [rankimage] => /lib/images/PilotRanks/rank_ceo.png [payrate] => 90 ) If you look through that variable dump you will find that the hub is included. You can print out any piece of the data by using an echo statement, for the hub you can do; <?php echo $userinfo->hub; ?> You can use the same process for the other page, find the variable and then find what is available in it, then echo out what you want. If the data you are looking for is not available then you will have to go back into the module and create a new data call to supply it to the template. 1 Quote Link to comment Share on other sites More sharing options...
Daniel Posted November 28, 2010 Author Report Share Posted November 28, 2010 thank you very much! Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted November 28, 2010 Moderators Report Share Posted November 28, 2010 Dave you make it sound all so easy 1 Quote Link to comment Share on other sites More sharing options...
Daniel Posted November 28, 2010 Author Report Share Posted November 28, 2010 LOL, I kinda get php now a little but other people may not. I just used this part <?php echo $userinfo->hub;?> thanks Sim Pilot Quote Link to comment Share on other sites More sharing options...
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.