Jump to content

ahughes3

Members
  • Posts

    205
  • Joined

  • Last visited

Posts posted by ahughes3

  1. Thanks a lot Web541, I appreciate you sparing the time and giving me a comprehensive response.

    I've created a new folder inside the admin "libs" folder. In there are my files for the skin I want to create including css, js etc. Just as a test I thought I would switch the default admin skin to the 'layout_dark' skin in the index.php file that sits in the main 'admin' folder. Nothing changed on my admin skin. It is still showing the default one.

    Am I changing the wrong thing? No matter what I change it too, it always stays on the default skin.

  2. Solved. Took an entire day, but solved. I've found a solution and it works for me, but please backup core/codon.config.php and core/classes/TemplateSet.class.php.

    Open up codon.config.php and scroll down a bit until you see all the define() declarations. Add the following at the bottom:

    define('ADMIN_PATH', SITE_ROOT.'admin');
    

    Then, at the end of the file, add:

    $admin_skin = Config::Get('ADMIN_SKIN');
    define('ADMIN_SKINS_PATH', ADMIN_PATH.DS.'lib'.DS.$admin_skin);
    

    Save your changes and close. Then, navigate to core/classes and open TemplateSet.class.php. Scroll down to the getTemplate() function, should be line 198. Replace the existing function with the following one:

    public function getTemplate($tpl_name, $ret=false, $checkskin=true, $force_base=false)
    {
    
    /* See if the file has been over-rided in the skin directory
    */
    if(strstr($tpl_name, $this->tpl_ext) === false)
    {
    $tpl_name .= $this->tpl_ext;
    }
    
    if(defined('ADMIN_PANEL') && ADMIN_PANEL === true){
    if(defined('ADMIN_SKINS_PATH') && file_exists(ADMIN_SKINS_PATH . DS . $tpl_name)){
    $tpl_path = ADMIN_SKINS_PATH . DS . $tpl_name;
    }
    else
    {
    $tpl_path = $this->template_path . DS . $tpl_name;
    }
    }
    
    if($force_base === true)
    {
    
    $old_tpl = $this->template_path;
    $this->template_path = Config::Get('BASE_TEMPLATE_PATH');
    
    if($checkskin === true)
    {
    if(defined('SKINS_PATH') && file_exists(SKINS_PATH . DS . $tpl_name))
    {
     $tpl_path = SKINS_PATH . DS . $tpl_name;
    }
    else
    {
     $tpl_path = $this->template_path . DS . $tpl_name;
    }
    }
    }
    if((!defined('ADMIN_PANEL') || $force_base == true) && $checkskin == true)
    {
    
    if(defined('SKINS_PATH') && file_exists(SKINS_PATH . DS . $tpl_name))
    {
    $tpl_path = SKINS_PATH . DS . $tpl_name;
    }
    else
    {
    $tpl_path = $this->template_path . DS . $tpl_name;
    }
    }
    
    if($force_base)
    {
    $this->template_path = $old_tpl;
    }
    if(!file_exists($tpl_path))
    {
    trigger_error('The template file "'.$tpl_path.'" doesn\'t exist');
    return;
    }
    
    extract($this->vars, EXTR_OVERWRITE);
    
    ob_start();
    include $tpl_path;
    $cont = ob_get_contents();
    ob_end_clean();
    
    # Check if we wanna return
    if($ret==true)
    return $cont;
    
    echo $cont;
    }
    

    Save that too and close it. Now, you should be able to copy your files from admin/templates into admin/lib/[skin] and edit them there.

    Any problems, let me know.

    Ok, I'm just starting to experiment with the admin skin and I've followed your instructions above to point the admin templates to my skins folder. I have a few questions if you don't mind.

    1. For the main site, you choose the skin through the "general settings" in the admin dashboard which then points to the folder with your skin in it. How does it work with the admin one? I see there is no reference to a folder, so do I just copy all the templates I want for the admin skin into the main "skins" directory?
    2. For the main site, there is a template called "layout" which is the master file for the overall layout structure, then you get templates such as "fontpage_main" for the homepage content. How does it work with the admin as there is no "layout" file? Is it the "dashboard" file in the admin templates folder, or is it the index file in the main admin folder itself?
    3. I am trying to work out where to include my css and script link references. Should these be in the core_htmlhead template along with the other phpvms references? For the main site I have them in the "layout" file.

    Apologies for the questions, I'm just trying to get my head around quite where to start as it's a bit different to skinning the main site.

    Thanks

    Harry

  3. Put this in your controller function:

    $this->title = 'My Title';
    

    Brilliant, thanks simpilot.

    Just for anyone else who wants to do this, you would need to find your module for the page's title you want to change. Then find this piece of code in the php file inside the folder:

    <?php
    class Dubaihub extends CodonModule //Name can be any names.
    {
    
     public function index()
     {
    		 $this->render('dubaiinternational.php');
     }
    }
    ?>
    

    and add the code simpilot mentions as so;

    <?php
    class Dubaihub extends CodonModule //Name can be any names.
    {
    
     public function index()
     { $this->title = 'Your page title goes here';
    		 $this->render('dubaiinternational.php');
     }
    }
    ?>
    

    Thanks again simpilot :)

    • Like 1
  4. Ok I think I spoke to soon. The jQuery.noConflict at the end of all scripts has indeed fixed the "no routes passed" problem but it has created another one. I have a "latest news" banner at the top of my pages which is driven by jQuery. When I add the noConflict at the end, it breaks the news banner and if I include it within the script, but place the whole thing at the end of my scripts, it then won't pass the routes again.

    I have tried placing the noConflict script inside, outside, before, after and also multiple methods for writing the noConflict script but it's always the same. Either the news doesn't work and the routes does, or the other way around.

    The script that seems to be causing the problems is as follows:

    jQuery(window).load(function(e) {
      jQuery("#bn1").breakingNews({
       autoplay :true,
       timer  :6000,
      });
    });
    

    and this is how my header looks:

    <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/jQuery.js');?>"></script>
       <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/jquery-migrate-1.2.1.min.js');?>"></script>
       <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/modernizrr.js');?>"></script>
       <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/asset/js/bootstrap.min.js');?>"></script>
       <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/jquery.fitvids.js');?>"></script>
       <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/owl.carousel.min.js');?>"></script>
       <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/nivo-lightbox.min.js');?>"></script>
       <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/jquery.isotope.min.js');?>"></script>
       <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/count-to.js');?>"></script>
       <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/jquery.textillate.js');?>"></script>
       <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/jquery.lettering.js');?>"></script>
       <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/jquery.easypiechart.min.js');?>"></script>
       <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/jquery.nicescroll.min.js');?>"></script>
       <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/jquery.parallax.js');?>"></script>
       <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/mediaelement-and-player.js');?>"></script>
       <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/script.js');?>"></script>
       <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/ajax.js');?>"></script>
       <script type="text/javascript" src="http://static.tsviewer.com/short_expire/js/ts3viewer_loader.js"></script>
    <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/jquery.appear.js');?>"></script>
       <!--[if IE 8]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
       <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
    
       <!-- SimBrief Script -->
    <script type="text/javascript" src="<?php echo fileurl('lib/js/simbrief.apiv1.js');?>"></script>
    <script>
    jQuery(window).load(function(e) {
      jQuery("#bn1").breakingNews({
       autoplay :true,
       timer  :6000,
      });
    });
    </script>
       <script>
    jQuery.noConflict();
    </script>
    

    Any suggestions greatly welcome. :)

  5. Hi,

    I am interested in this too. I'd like to know..........if I want to make each page title unique but not the default page title name, how might I achieve it. I have seen the $page_title on line 64 of the index.php. If I changed each page that I wanted a different page title on, to $page_title="whatever page name"; would that kind of thing work (ignoring my poor syntax issues :P)?

  6. I believe that you are missing the jquery ui in your header, you have;

    <script type="text/javascript" src="http://www.virginatlanticvirtual.co.uk/lib/skins/margo-full-width/js/jquery-1.11.2.min.js"></script>
    

    but it should be

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
    

    Take a good look at the ending of what you should actually be loading for a file, unless you are trying to load jquery twice, which could also be an issue, either way the second link in your template is returning a 404 error.

    Have you tried using it on the default crystal template? If it does not work there I am guessing you are getting the out of memory error in the background as it looks like you have a rather lengthy airport list which has to populate twice in that view. Looking at the source you have about 1180 airfields which is being populated twice so realistically it is nearly 2400. Try making a bunch inactive and see if the problem goes away.

    The no route passed is definitely a javascript error somewhere but without being logged in and being able to try the function it would just be a guess.

    I did have the original jquery library references in place, I'd switched them to see if it was the issue and just forgot to set them back, thanks for the nudge. Although it didn't make any difference to the problem sadly.

    The airports issue is an odd one. Even in the crystal skin, when I click on "View schedules" it opens a plain white page with a form for searching. Each search element then has it's own dropdown box. I don't remember it being like that in the older versions. You simply had a single drop down box and you clicked on the element you want to search by which I assume then changed the content you saw in the dropdown. It does it on both my clean installation and the Virgin site. Simpilot, I am more than happy to give you access to the admin centre and web content if you wanted to take a nosey for yourself. :)

    Give this a try -

    <script>
    jQuery.noConflict();
    </script>
    

    Put it after ALL libraries have been loaded. It would fix the multiple versions of jQuery problems that would result in the error you have.

    I used the jQuery.noConflict(); in a couple of different places within the scripts themselves that I was trying to load. I think I also tried it on it's own but in front of all the other scripts I'm sure of it. Anyways, that's why the forums are so effective, your suggestion seems to have fixed the problem. I can now search and bid and the bid gets passed! :) Thanks a bunch.

    I would still like to try and work out why my "search schedules" page is not showing the old, original page and instead just a blank page with the form on it. As you say SimPilot, it is then just returning all the results for all of the dropdowns.

  7. Ok thought I'd repost this as it's still an issue. I've now tried coding out almost every piece of jquery and scripting that is acting on the page and I get no difference in results. the route search form is always returned without site formatting like it's lost connection to the css. Then when I search for routes, it gives me the list of routes as per normal. When I then click on "add to bid" I just get "no route passed".

    Whilst it's not the end of the world as we use Smartcars, I still would like to get it working again as some of our pilots use kACARS and need to book via the website.

    Any help anyone can give would be greatly appreciated. Is there any way to get hold of an error log somewhere? Might point me in the right direction a bit more.

    Thanks

  8. Hi all,

    I am trying to get my pilot's awards to show on their Pilot Centre page. This is the code I am using which is pretty much the standard built into phpvms. The award images show just fine, but for some reason the name and description won't.

    <div class="inner-content-box">
        <ul class="icons-list">
      <?php
      if(!$allawards) {
       echo '<li><i class="fa fa-trophy icon-large"></i> No awards yet</li>';
      } else {
    
       /* To show the image:
     <img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" />
       */
    
      ?>
    	 </ul>
      <ul class="icons-list">
       <?php foreach($allawards as $award){ ?>
       <li><img src="<?php echo $award->image?>" alt="<?php echo $award->name ?> - <?php echo $award->descrip?>" /></li>
       <?php } ?>
    
    
      </ul>
      <?php
      }
      ?>
    	 </div>
    

    Any ideas anyone? I've tried various combinations of coding but the name and description just never show up.

  9. Hello All,

    Discovered a problem on our site today. Our bids are not being passed. I've seen this already a lot on the forums and I've tried a number of things to fix it but it still persists so I'm hoping you geniuses (or is it Geni') can help.

    I'll try and describe the problem as simply as poss.

    I am using a skin I have developed and added bits too so I am fully expecting it to be a case of jQuery conflicts, be here goes.

    When you click on "View Schedules" in the pilot centre, it returns the usual page, but there is no styling or PHPVMS headers or anything. If I look at the source code, it looks as if it is literally just the template with no header or meta tags or anything.

    You can then select a departure airport ok and click find which will return a page of results.

    The page of results then looks perfectly normal, with CSS styles and all the other PHPVMS bits.

    The problem comes when I click on "add to bids". The next screen is when I get "no route passed".

    What I have tried so far.

    I have tried reorganising the jQuery scripts to see if it is an ordering issue.

    I have tried deleting my skins jQuery script and just leaving PHPVMS default ones.

    I have tried it the other way round and just leaving mine.

    I have tried commenting out different scripts to see if that sorts it.

    I have used the noConflict rule to try and see if that helps.

    So far nothing has made any difference what so ever. Even when I remove what looks like the only additional jQuery item I've added.

    So I'm stumped and need to call for back up :)

    The site is www.virginatlanticvirtual.co.uk

    Let me know if you want any source code pasted etc.

    Waiting in anticipation....

    Andy

  10. Could the issue be something to do with the fact that two different flight tables are asking for the same information at the same time through the page? If so, would someone be able to help me identify how to alter the code so that rather than the "database call" running twice, it runs once and then the coding for both of the flight tables that use the information just processes it in their cells. Does anyone think that would alleviate the problem?

  11. That won't tell us anything on it's own, we need to see the head content and the other coding to see if something is missing. Quite often these issue tend to be either PHPVMS not picking up your filepath references and therefore not including the relevant files it needs to show your content, or it might be a phpvms version issue between you using .tpl and .php files or something.

    Post the entire page code and then we can see what's what.

  12. Did you download the PHPVMS from the standard Github repository? If so then that should be fine if your host is running PHP5+ which is likely. Check which version of PHPVMS you have as a starting point. When I first tried to install it, I had the same issue and it was because I had download on old version which had out of date files in it.

  13. Mine keeps doing the same thing but it's intermittent. I thought I had found an answer but then the problem happened again. I have since set up a separate airline email, then I exported the pilot table from PHPMyAdmin, I converted it to a vcard and uploaded it to "Mailbird" which is my email client, now I just use that. Not ideal but at least it's more reliable.

  14. I have searched through the phpvms files for a couple of hours now but I still can't find anything that relates to changing the width of the live flight map. The code I have in the main template file is:

    style="width:<?php echo  Config::Get('MAP_WIDTH');?>;
    

    I am trying to work out where the "map_width" setting is coming from, but had no luck so far. Anyone know where to find it?

×
×
  • Create New...