Jump to content

[SOLVED TEMP FIX] index.tpl header.tpl and editorial.tpl


Recommended Posts

I've been reading forums all day and playing around and I cannot seem to make some changes to these files.

I am trying to add a gallery and some custom html code into the centre colum on the homepage.

The gallery requires adding extra css and script file links between the head tags. I understand that this code must be placed into the header.tpl file in the relevant theme folder. When I place the links into header.tpl refresh my homepage and view the sorce the links are not showing up. That's problem number 1.

Problem number 2. I want to place the gallery code and some other html into editorial.tpl and display this on the homepage. I placed my code between the

tags, refreshed the homepage and there was no change at all, despite deleting the code that was already in editorial.tpl for displaying text and an image the old text and image still remained there. I have refreshed all cache and deleted tempoary files etc. I can change the text using the module in the back office and these changes show, but any change to the code in editorial.tpl does not show at all.

As a last resort I tried inserting code directly into index.tpl and as with editorial.tpl no change could be seen in the front office.

I've searched around all day trying to find a solution for this, theres many people with similar problems but there doesn't seem to be any solutions on the forums. I've run out of things to try so any help would be appreciated, thanks.

Kind regards, Mitchell Ransom

Code I want inserted into the header file:
    [removed][removed]
   [removed][removed]
   [removed][removed]
   [removed][removed]

   <link rel="stylesheet" href="homegallery/css/layout.css" type="text/css" media="screen" charset="utf-8" />
   <link rel="stylesheet" href="homegallery/css/jd.gallery.css" type="text/css" media="screen" charset="utf-8" />



Code I want inserted into the homepage centre colum:

[removed]
var myGallery;
function startGallery() {
    var myGallery = new gallery($('myGallery'), {
    timed: true,
    delay: 8000,
    showArrows: true,
    showCarousel: false,
    showInfopane: true
});

     var galleryDiv = $('myGallery');
     galleryDiv.addEvent('mouseenter', function() {
   myGallery.clearTimer();
});
     galleryDiv.addEvent('mouseleave', function() {
   myGallery.prepareTimer();
});

}
window.addEvent('domready', startGallery);
[removed]




Corsair Obsidian Series 800D Full-Tower Case

The Obsidian Series 800D is built to last through years of motherboard, power, memory, cooling and component upgrades! Perfect for gaming enthusiasts and professionals.




NVidia GEFORCE GTX 580

Fast. Quiet. Deadly. The perfect weapon behind enemy lines. Meet the worlds fastest graphics card.

 






Extra HTML and Text I want to add here.

Link to comment
Share on other sites

OK I found a tempoary solution which is better than no solution I guess but it seems like a huge amount of work for something so simple.

I've created a new module to replace the home text editor. This module is virtually blank and has no configuration, it simply allows you to insert your own html code however you like. Unfortunatally it doesn't seem to accept scripts so the solution for that is to make a custom html page and upload it to your website, then use an iframe tag inside my module to display the content you want. I'm still looking for a better solution so if anyone has ideas please contact me with them. Below is my module code so I hope it helps.

<?php
class HomeChanger extends Module
{

private $_html = '';

function __construct()
{
$this->name = 'homechanger';
parent::__construct();

$this->tab = 'Homepage';
$this->version = '0.1.1';
$this->displayName = $this->l('Homepage Changer');
$this->description = $this->l('Use this module to edit the homepage html.');
}


   public function install()
   {
       parent::install();

       if (!$this->registerHook('home'))
           return false;
   }

   public function hookHome()
   {
       return '

<!-- MODULE Homepage Changer -->
<!-- Add your own HTML between these 2 comments and it will display on the homepage. -->

   <iframe width="550" height="200" scrolling="no" name="homeGallery" src="http://www.neonflame.co.uk/homegallery/homegalleryDefault.html" frameborder="0"></iframe>

<!-- /MODULE Homepage Changer -->

';
   }



}
// End of: homechanger.php

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...