Jump to content
monkeypaw201

Brilliance v1 With jQuery Pilot Center

Recommended Posts

Kind Bump.

i have a different skin but ran into the same problem then finaly resolved it hope this help i pasted this into the Layout file close to bottom and it work you can see it here on my site www.toronto-virtual-atc.com hope this helps you im just a noobee trying to get by :D

<h4>Pilots Online</h4>

<?php

$shown = array();

foreach($usersonline as $pilot)

{

if(in_array($pilot->pilotid, $shown))

continue;

else

$shown[] = $pilot->pilotid;

echo "<p>";

echo '<img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot->location).'" />';

echo " {$pilot->firstname} {$pilot->lastname}<br />";

echo "</p>";

}

?>

<h4>Guests Online</h4>

<p class="txt-red10">Currently

<?php echo count($guestsonline);?>

guest(s) visiting.

</ul>

Share this post


Link to post
Share on other sites

Thanks for posting the code. My apologies for not coming back and saying that I got it working.

And as far as the side area goes, it is located inside the layout.tpl file.

Look for a comment line that says sidearea starts here and another one that says side area ends here.

Share this post


Link to post
Share on other sites

Thanks for posting the code. My apologies for not coming back and saying that I got it working.

And as far as the side area goes, it is located inside the layout.tpl file.

Look for a comment line that says sidearea starts here and another one that says side area ends here.

Thanks! And How Do I make Seperators? Like lines or tabs?

brilliance.png

Share this post


Link to post
Share on other sites

You need to get in to you css file and create them. I can not give code since I have not even done mine yet. I am going to eventually, just have not got around to it yet.

Share this post


Link to post
Share on other sites

You need to get in to you css file and create them. I can not give code since I have not even done mine yet. I am going to eventually, just have not got around to it yet.

Oh, Okay Big Thanks! Maybe if you could tell us how it needs to be in css file? Do you want to make it an image based tab or just html color code sort of thing?

Share this post


Link to post
Share on other sites

Oh, Okay Big Thanks! Maybe if you could tell us how it needs to be in css file? Do you want to make it an image based tab or just html color code sort of thing?

Well, you could just make it look kind of blocky and use color in the css or you can use the new rounded corners stuff in the css and use an image but I have never done that yet. Hopefully a pro will chime in here and lead you down the right path. I am still doing things the old fashioned way.

I'm sorry I can be of no better assistance to you on this one. The last time I did it to a template, Simpilot helped me out and that has been some time back now.

Share this post


Link to post
Share on other sites

Hey guys,

Any luck on getting the schedules to work?

Are you referring to the route not passed error? If so then yes. I did. I had to remove a line of javascript from the header. It was being called twice by phpVMS and that was causing the error.

If you do a quick search for that error, I posted the line of code I had to remove.

Share this post


Link to post
Share on other sites

Here you go. Have a look at this. I found my post. Once I did what I said in that post, it was smooth sailing after that.

BUT, if you decide to hide the sidearea on all the pages except for the home page, I wish you all the luck in the world. I did it to mine and I ended up editing every single tpl file you can think of to get it to work right.

Good luck with the java. It is real simple. Remove two lines and you got it whooped.

Share this post


Link to post
Share on other sites

I think i have fallen in love with your template :)

Just put it onto our server made a few graphical changes, Is there any restrictions to what can be done?

Ill post the screen shot up when I am done but i dont want to annoy you by changeing something.

Share this post


Link to post
Share on other sites

What template would that be? My Thunder VA template? If Thunder VA, it is not Brilliance. It is Obsesblue version 1 with some minor tweaks. It is pretty much default out of the box template.

The hiding the side area on that template was not so bad compared to hiding the one on Brilliance.

Share this post


Link to post
Share on other sites

Yeah it is not bad, but when you go adding features, the side area gets in the way REAL fast. I hid mine on all pages but the front page. Was a PITA to do, but it works. Maybe sooner or later I will get it off of my dev server and make it live so people can see it.

Share this post


Link to post
Share on other sites

Yeah, I was wondering about that side news and how I can remove it, there is not need for it as it only duplicates whats on the main pg and gets in the way of some of the other pages info.

Share this post


Link to post
Share on other sites

i have a different skin but ran into the same problem then finaly resolved it hope this help i pasted this into the Layout file close to bottom and it work you can see it here on my site www.toronto-virtual-atc.com hope this helps you im just a noobee trying to get by

<h4>Pilots Online</h4>

<?php

$shown = array();

foreach($usersonline as $pilot)

{

if(in_array($pilot->pilotid, $shown))

continue;

else

$shown[] = $pilot->pilotid;

echo "<p>";

echo '<img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot->location).'" />';

echo " {$pilot->firstname} {$pilot->lastname}<br />";

echo "</p>";

}

?>

<h4>Guests Online</h4>

<p class="txt-red10">Currently

<?php echo count($guestsonline);?>

guest(s) visiting.

</ul>

Wwith reference to above how can I include this on the side bar of the site, I know you said you copy and pasted it into your layout but where would I place it?

Share this post


Link to post
Share on other sites

open your layout.tpl file.

Find

</div><!-- Sidearea Ends -->

Add your code BEFORE. That should get you where you need to be.

Share this post


Link to post
Share on other sites

Thanks for that.

I found that </div><!-- Sidearea Ends -->

and just above </div><!-- Sidearea Starts -->

so put it in between them but did not come out right, some of it was at the bottom of the main page, I will play with it and see if I can get it to work.

This is what the code looked like;

</div><!-- Sidearea Starts -->

<h4>Pilots Online</h4>

<?php

$shown = array();

foreach($usersonline as $pilot)

{

if(in_array($pilot->pilotid, $shown))

continue;

else

$shown[] = $pilot->pilotid;

echo "<p>";

echo '<img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot->location).'" />';

echo " {$pilot->firstname} {$pilot->lastname}<br />";

echo "</p>";

}

?>

<h4>Guests Online</h4>

<p class="txt-red10">Currently

<?php echo count($guestsonline);?>

guest(s) visiting.

</ul>

</div><!-- Sidearea Ends -->

Share this post


Link to post
Share on other sites

It should have worked. I could copy and paste my code for you but it won't work since I renamed all of my divs.

That is the only place that can go. Yeah please do show us a screenshot. It will be handy. Might have a bum div tag.

Share this post


Link to post
Share on other sites

Try this. Copy your current sidearea and save it to a notepad or dreamweaver, what ever you use and then paste this right over your side area.

Now Replace everything in your sidearea with what I have put here. I know it works. I just tried it on a test install.

<!-- Sidearea Starts -->
		<div id="sidearea">
			<h2>Latest News!</h2>
			  <?php MainController::Run('News', 'ShowNewsFront', 1); ?>
			  <br />
			<h2>Newest Pilots></h2>
			  <?php MainController::Run('Pilots', 'RecentFrontPage', 5); ?>
			   <br />
			<h2>Pilots Online</h2>

<?php
$shown = array();
foreach($usersonline as $pilot)
{

if(in_array($pilot->pilotid, $shown))
continue;
else
$shown[] = $pilot->pilotid;

echo "<p>";
echo '<img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot->location).'" />';
echo " {$pilot->firstname} {$pilot->lastname}<br />";
echo "</p>";

}

?>

<h4>Guests Online</h4>

<p class="txt-red10">Currently

<?php echo count($guestsonline);?>

guest(s) visiting.


</ul> 
		</div>
	<!-- Sidearea Ends -->
	</div>

Share this post


Link to post
Share on other sites

<!-- Sidearea Starts -->
		<div id="sidearea">
			<h2>Newest Pilots></h2>
			  <?php MainController::Run('Pilots', 'RecentFrontPage', 5); ?>
			   <br />
			<h2>Pilots Online</h2>

<?php
$shown = array();
foreach($usersonline as $pilot)
{

if(in_array($pilot->pilotid, $shown))
continue;
else
$shown[] = $pilot->pilotid;

echo "<p>";
echo '<img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot->location).'" />';
echo " {$pilot->firstname} {$pilot->lastname}<br />";
echo "</p>";

}

?>

<h4>Guests Online</h4>

<p class="txt-red10">Currently

<?php echo count($guestsonline);?>

guest(s) visiting.


</ul> 
		</div>
	<!-- Sidearea Ends -->
	</div>

Ok I did as you said and for the most it worked, I removed the latest news part as we don't want it on the side bar, however I am getting a warning coming up. I even put the latest news back in but still got the same warning.

Warning: Invalid argument supplied for foreach() in /home2/fivstar6/public_html/phpvms/lib/skins/brilliancev1/layout.tpl on line 175

175 foreach($usersonline as $pilot)

http://5starvirtualaviation.com/phpvms/index.php/

any ideas?

every thing is starting to come together now and thanks for all your help.

Share this post


Link to post
Share on other sites

I have the info now showing, but it is at the bottom of the page and not on the sidebar where it should be!!!

I will keep looking and trying.

Share this post


Link to post
Share on other sites

Hmmm It should not be on the bottom. Look for a div tag not closed. I had that issue once before and that's what it was.

Share this post


Link to post
Share on other sites

I have managed to get it back on the side area, but still have a warning

Warning: Invalid argument supplied for foreach() in /home2/fivstar6/public_html/phpvms/lib/skins/brilliancev1/layout.tpl on line 177

177 foreach($usersonline as $pilot)

so just got work out why that is a issue now. next how to add latest flights :huh:

Share this post


Link to post
Share on other sites

I have managed to get it back on the side area, but still have a warning

Warning: Invalid argument supplied for foreach() in /home2/fivstar6/public_html/phpvms/lib/skins/brilliancev1/layout.tpl on line 177

177 foreach($usersonline as $pilot)

so just got work out why that is a issue now. next how to add latest flights :huh:

Put this at the VERY top of your layout.tpl file. It should make that error a thing of the past.

<?php
$allpilots = PilotData::getAllPilots();
foreach($allpilots as $pilot)
{
}
?>

Share this post


Link to post
Share on other sites

<!-- Sidearea Starts -->

<div id="sidearea">

<h2>Our Newest 8 Pilots</h2>

<?php MainController::Run('Pilots', 'RecentFrontPage', 8); ?>

<br />

<h2>Our Pilots Online</h2>

<?php

$shown = array();

foreach($usersonline as $pilot)

{

if(in_array($pilot->pilotid, $shown))

continue;

else

$shown[] = $pilot->pilotid;

echo "<p>";

echo '<img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot->location).'" />';

echo " {$pilot->firstname} {$pilot->lastname}<br />";

echo "</p>";

}

?>

<h2>Guests Online</h2>

<p class="txt-red10">Currently

<?php echo count($guestsonline);?>

guest(s) visiting.

</div>

<h4>Latest Flights</h4>

<?php MainController::Run('PIREPS', 'RecentFrontPage', 5); ?>

</ul>

<!-- Sidearea Ends -->

</div>

Ok so here is the code I have put in place.

2 things stand out,

1st the warning on line 177

2nd the latest flights shows up but is set too far off to the left.

Take a look.

http://5starvirtualaviation.com/phpvms/index.php/

any ideas on how to move the latest flight over in line with the pilots on lines and what is wrong with line 177, foreach($usersonline as $pilot)

I also added right at the top of the layout.tpl line 1

<?php

$allpilots = PilotData::getAllPilots();

foreach($allpilots as $pilot)

{

}

?>

at the very top and all it did was move the error down a few lines. very odd I fear and I don't know what I am doing but am learning very quickly.

Share this post


Link to post
Share on other sites

Tell ya what I can do, I will nix my code and send you a copy of the frontpage and layout in perfect working order and maybe you can scrape something together from there. Give me until sometime tomorrow though. I am getting ready to go to bed now. Early day tomorrow. I'll see what I can do to help out man. ;)

Share this post


Link to post
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...