Jump to content

Bradpl6

Members
  • Posts

    14
  • Joined

  • Last visited

Posts posted by Bradpl6

  1. You need to fill the variable prior to echoing it.

    explain exactly what you are trying to do. If this page will be customized for each pilot (like the Pilot info Center) then use in the template at the top.

    <?php
    $pilot = AUTH::$userinfo; //Retrieve the logged in pilots info
    $pilotcode = PilotData::getPilotCode($pilot->code, pilot->pilotid);
    ?>

    All of this can be preloaded in the module as such

    $this->set('pilot', AUTH::$userinfo);
    $this->show('my_template.tpl');
    

    or

    Template::Set('pilot', AUTH::$userinfo);
    Template::Show('my_template.tpl');
    

    Thanks, that worked brilliantly!

  2. Ahh thanks. I've just tried to include codon.config.php however I'm finding difficulty in doing this too, absolute directories won't work nor will navigating up a directory using the old ../../ method.

    Edit

    This is what I have in my .htm file in the 'pages' folder.

    <?
    include('../codon.config.php');
      Template::Show('featchartvote.tpl');
    ?>
    

  3. Hi all,

    I'm having a bit of a struggle with the custom .htm pages, I can get php to work however when it comes to things like <? echo $pilotcode; ?> they won't display. I understand it's to do with the defining variable not being passed to the custom page but can't figure out how to solve it. Any suggestions or solutions?

  4. So how do i get the news off every page??? I only want it in the sidebar

    You need to remove <?php PopUpNews::PopUpNewsList(5); ?> from layout.tpl, you will have it in there twice one for the main content and one for the sidebar. You can identify which one is in the sidebar by looking for a sidebar divider or you might see <!-- sidebar -->. You can modify the way it looks by opening up the module which can be found in core > modules > PopUpNews > Popupnews.php. Sadly if you remove the copyright mark you will no longer receive support on any simpilot module.

  5. www.brtvirtualairlines.com and i will make a test news item

    Ok, It looks like your calling the default news module:

    Open layout.tpl remove <?php News::ShowNewsFront(5);?>

    Open frontpage_main.tpl and put <?php PopUpNews::PopUpNewsList(5); ?> wherever you want your news to show.

    You will need to do the same for your sidebar, the result should be a list with links on your homepage and a list with links in your sidebar.

  6. Basically when i add news from the admin panel. It shows on every page. And also in the popup news module in the sidebar however there's no link to the news item in the sidebar (popup news module). In other words i tried adding news from admin panel and it doesnt work . Because it shows the news on every page.

    It sounds like you have put <?php PopUpNews::PopUpNewsList(5); ?> in a global template, which would explain why the news is showing on every page. As for the links open popupnewslist.tpl and check to see if all is correct, I would show an example but I'm on my phone.

×
×
  • Create New...