PDA

View Full Version : TOC calendar embedded styles not populating


seators
11-16-2007, 03:32 PM
I've recently added the calendar as a module in mambo. With a bit of tooling, I can now add the TOC calendar to the "calendar" page and the small calendar to sidebar in every other page.

All is going well EXCEPT that it appears the styles that define the background color for the nonbreakingspaces that define category colors for the events is not showing up on the TOC cal (but it is on the mini cal).

Any idea what is up causing those styles to no be written to the page?

Christian

ve9gra
11-16-2007, 05:54 PM
Do you have a URL to your installation so I can examine where's the problem?

seators
11-16-2007, 11:57 PM
The test site is here:

atlantecgroup dat(like we say in baaston) com/mft

Notice the mini cal on the main page. Then click the left nav link for Calendar to see the TOCcalendar..

Thanks in advance.

Christian

ve9gra
11-17-2007, 07:48 AM
Ok, first there's something in your template_css.css file that will make everything in every <td> white...

td{
font-family:arial;
font-size:11px;
color:#fefefe; <---- that's why the text doesn't show up on the calendar
}
I don't understand how your template works... On the main page, you have two $CSS and $OL lines each (they should only be called once). The first ones (the ones that are correctly placed) seem to be working fine, but the ones right above the calendar (in the module) are not working. Then on the TOC page, you still have the two lines that are positioned correctly, but now they don't work.

I would need FTP access and admin access to your Mambo to be able to accurately troubleshoot this.

seators
11-17-2007, 10:15 PM
It appears that the second css reference is being place in on the page right before the module as a result of this (see bold type):

// INCLUDE CSS ROUTINE
if ($CSS!="") {
if (!file_exists($serverPath."config.inc.php")) die ("<font color=red>Server Path Error.</font><br />Please run the Setup Manager to correct this problem.<br /><br />");
require_once($serverPath."config.inc.php");
if ($urlPath=="") {
echo "<link href=\"theme/$currentTheme/esstyle.css\" rel=\"stylesheet\" type=\"text/css\"/>";
require($serverPath."functions/categories.php");
}
else {
if (!isset($showTheme) && $_REQUEST['showTheme']!="") $showTheme=$_REQUEST['showTheme'];
if (isset($showTheme)) {
$checkTheme = $serverPath."theme/".$showTheme."/esstyle.css";
if (file_exists($checkTheme)) {
$currentTheme = $showTheme;
}
}
echo "<link href=\"".$urlPath."theme/$currentTheme/esstyle.css\" rel=\"stylesheet\" type=\"text/css\"/>";
require($serverPath."functions/categories.php");
}
}

What would cause this?

Christian

ve9gra
11-18-2007, 11:03 AM
No no... that's all fine. I know what calendar.php contains...

What I need to see is what you have in your pages (the issue is NOT with the calendar pages).

What instructions did you follow to integrate the calendar in your site? That might point me to why things aren't working like they should.

seators
11-18-2007, 11:21 PM
noooo, i wasn't implying that the calendar was wrong.. never. just wondering what I could be doing wrong to cause that match ;-)

This is a canned mambo theme. Not my templates. It is going to be a proof of concept of some functionality... but the issue will prevail. My assumption is this:

1. Every page in this theme is based on a file called, x.php (lets say).
2. All but one section has the miniCalendar in the sideNav (the TOCcalendar page does not).
3. As such, I have to either put the miniCalendar calls in every page or none..

So the task here is to get that code into the page before the miniCal on all but the one TOCCal page even though they are all based on the same template... I'll look for something unique but consistent in the TOCCal page that I can test for to conditionally leave that out.

If you have any insight, let me know. Otherwise, I'll tinker and get back in touch if i get stuck.

I would just assume that other CMS integrations would have this similar problem and had hoped someone had a quick and easy, "Oh yea, you have to do this..."

Christian

ve9gra
11-19-2007, 07:35 AM
Well normally, you'd want to have the $CSS and $OL lines on all pages (it makes things easier), then depending on what you want to display, you'd insert the code for the mode you want.

So the task here is to get those two lines ($CSS and $OL) in your theme/template file. Once that is done and shown to work, then use the module for Mambo (you'll have to modify it a bit) and through the Mambo interface, get it displayed on all pages except for the TOC page. Finally, code the TOC page.

I never had good luck doing the first part (getting the stuff in the theme) so the module was coded with the $CSS and $OL lines directly in it, instead of where they should be. Now this works for the majority of situations, but may cause issues if you make heavy use of <div>.

Let me know if you'd want me to have a look.

seators
11-20-2007, 12:08 AM
Ok,

1. Markup in head of site template.

<?php $CSS=1; require ("modules/calendar/calendar.php"); ?>
<!-- marker in site template -->
</head>
2. Markup in body of site template.

<body>
<?php $OL=1; require ("modules/calendar/calendar.php"); ?>
3. Both references removed from module.

defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); ?>
<div align="center" class="epc">
<?php require ("modules/calendar/calendar.php"); ?><br>
4. Old module unpublished and deleted.
5. Lighter, faster module uploaded and published.
6. Calendar page modified to only have following code:
$TOC=1; require ("modules/calendar/calendar.php");7. Pages published...

Pages with miniCalendar work OK.
Page with TOCCalendar does everything 'CEPT it does not include the necessary imbedded styles
(rendered source)

<link href="/mft/modules/calendar/theme/default/esstyle.css" rel="stylesheet" type="text/css"/>
<style type="text/css">
<!--
-->
</style>
to color code events on cal and in pop-up.

Thoughts?

Christian

ve9gra
11-20-2007, 09:17 AM
Yes, ok... On the right track.

Now, you have two choices.

1- add "require("modules/calendar/config.inc.php");" right before $TOC

2- open up calendar.php and change two lines (46 and 74) from require_once($serverPath."config.inc.php"); to require($serverPath."config.inc.php");

Either way should work, but the 2nd way you'd have to remember in case you upgraded your install at a later time.

seators
11-20-2007, 12:16 PM
OK,

I've modified calendar.php... adding it to the template didn't seem to do the trick (to be investigated at a later date).

We are ****en EXCEPT... in the calendarTOC, long titles are not being truncated. neither is a long list of events... I swear i've seen this issue before.

...and is it just me or is running your mouse down the long list of events on the 21 a bit dizzying?

Christian

ve9gra
11-20-2007, 01:09 PM
How do I show the complete title when using TOC mode? (https://www.easyphpcalendar.com/support/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=18&nav=0)

Also, in one of your old threads: Ellipses and limiting events for a day (http://www.easyphpcalendar.com/forums/showthread.php?t=6456)

seators
11-20-2007, 07:30 PM
ahh.. the effects of no sleep (three children under 5) on the adult mind.

Yes, the DOCTYPE:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


That, of course, did it.

Nice.

Thanks for all the support!

Christian