View Full Version : Styling a homepage link calendar
kmullenger
04-20-2009, 10:46 AM
Im trying to link a small calender from my homepage to the main event calendar. I can get the calendar to appear but it is not pulling through the styling. This is the code i am using on my index.php
<?php
//$TOC=1; // UNCOMMENT THIS LINE TO SHOW TEXT ON CALENDAR
unset($epcAltLink); $epcAltLink="http://www.caterhamssp.co.uk/ssconew/calendar/index.php"; // UNCOMMENT THIS LINE TO USE THE ALT LINK FEATURE
$showTheme="calendar/theme/default/esstyle.css";
require("calendar/calendar.php");
?>
My website url in www.caterhamssp.co.uk/ssconew/index.php (http://www.caterhamssp.co.uk/ssconew/index.php)
Any help would be greatly appreciated.
Thanks :classic:
Brian
04-20-2009, 10:54 AM
You may be missing the CSS section of calendar code as detailed in the Integration / Important section of the instructions. Can you verify you have added this code to your page?
kmullenger
04-20-2009, 11:13 AM
Yes just added and it works, thank you. In order to style it without affecting the main calendar page. Do i just create a new css file?
Brian
04-20-2009, 11:16 AM
Yes. Just copy/paste a new theme directory and modify it.
kmullenger
04-20-2009, 11:36 AM
Thank you i have copied the default folder, renamed it and modified the esstyle.css.
The following link is in the top of my index.php<?php $CSS=1; require("calendar/calendar.php"); ?>
And then to call the calender used the following
$showTheme="calendar/theme/mini/esstyle.css";
require("calendar/calendar.php");
The calender is showing but seems to be using the css from default style which is styling my main calendar. Do i need to amend anything else, or am i missing something?
Thanks
Brian
04-20-2009, 12:29 PM
You need to have the showTheme before the CSS code.
kmullenger
04-20-2009, 01:27 PM
Im sorry but where do you mean the before the CSS. There is no CSS within my index.php (homepage file). I tried putting it above the <?php $CSS=1; require("calendar/calendar.php"); ?> tag in the <head> tags. Other than that im slightly confused.
Brian
04-20-2009, 03:03 PM
It should go here:
<?php $CSS=1; $showTheme="YourThemeName"; require("calendar/calendar.php"); ?>
Replace YourThemeName with the name of the theme you want to use. Capitalization is important. And make sure your changes are uploaded to the server. If it can't find the theme, it will use the default.
kmullenger
04-20-2009, 06:09 PM
Thank you i understand the line of code now but it still does not seem to be working. I have the theme of mini uploaded already to the server. You will see in the attached that i am unsure where to place the line of code in the head tag or where i want to call the calendar in the page? Sorry for not understanding first time, this is still very new to me. I do appreciate your help.
Brian
04-20-2009, 08:59 PM
You have it in the right spot, but $showTheme="YourThemeName"; should be your actual full theme name.
What is the name of the new theme? Put that there.
kmullenger
04-21-2009, 04:42 AM
Yes i have added the theme name in but it still is just blank.
<?php $CSS=1; $showTheme="HomepageMiniCal"; require("calendar/calendar.php"); ?>
On the index.php the line above shows in two places line 12 and line 58 is this correct?
Should the theme name just be the actual name of the folder that sits in the theme directory or do i need to put the whole file path?
ve9gra
04-21-2009, 08:09 AM
The theme name is the name of your folder. No path, no file.... just folder.
kmullenger
04-21-2009, 11:55 AM
Yes it is the name of the folder $showTheme="HomepageMiniCal"; but it is not pulling through the calendar at all. Does the code go int the head tag as well as where you want to display the calander. As in my reply 11
Brian
04-21-2009, 12:01 PM
Does the theme appear in the Setup Manager list of themes?
kmullenger
04-21-2009, 01:04 PM
Yes it is now but still nothing pulling through. Do i have the line of code in two many places. Shouldnt it just be in one place?
kmullenger
04-21-2009, 01:36 PM
Thank you that has worked an dthen i added $showTheme="default"; to my main calendar to style that differently. Is that the right hting to do?
Many Thanks for your help
Brian
04-21-2009, 04:24 PM
Thank you that has worked an dthen i added $showTheme="default"; to my main calendar to style that differently. Is that the right hting to do?
Many Thanks for your help
I'm not sure what you mean there? :confused:
Did you get it to work?
kmullenger
04-22-2009, 10:28 AM
Yes thank you i have now got it all to work. Thanks for your help
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.