PDA

View Full Version : How to get the Calendar to work in Simple Template


twum
11-30-2005, 01:57 PM
Hi,

I'm trying to get the calendar to work but can't figure out what I'm doing wrong.

- I'm using the simple template that came with pixelpost 1.4.3

- I've added <SITE_CALENDAR> to the image_template.html file like this:
<!-- Main Image -->
<a href="index.php?showimage=<IMAGE_PREVIOUS_ID>">
<img src="images/<IMAGE_NAME>" alt="<IMAGE_TITLE>" title="<IMAGE_TITLE>" width="<IMAGE_WIDTH>" height="<IMAGE_HEIGHT>" id="photo" />
</a>
<SITE_CALENDAR>
<!-- Previous / Next -->
<div id="image-navigate">
<span class="image-previous"><IMAGE_PREVIOUS_LINK></span>
<span class="image-next"><IMAGE_NEXT_LINK></span>
</div>

- In the folder addons, there is a file called calendar.php.

- In the admin section, I've tried choosing both options, Normal and Horizontal. Anytime I choose one and click on Update, after the page refreshes, when I go back to see what has been chosen, it shows "No Calendar" in the section Calendar Type.

And lastly, I have added this to the dark.css
.calendar {position:absolute;top:45px;left:20px;width:auto;m ax-width:82%;padding:0;font-size:10px;font-weight:110;letter-spacing:-1px;}
.td-calendar-days-vz {padding:1px;text-align:center;border-top:0 solid inherit;border:0 none inherit;}
.td-calendar-days {padding:1px;text-align:center;border:1px none inherit;}
.td-calendar-navi-vz {border:0 none inherit;text-align:center;letter-spacing:1px;word-spacing:5px;}
.td-calendar-navi-vz a {text-decoration:none;}
.td-calendar-navi {border-top:0 none inherit;border:0 none inherit;text-align:left;letter-spacing:1px;word-spacing:5px;}
.td-calendar-navi a {text-decoration:none;}
.td-calendar-days-imagefound {padding:1px;text-align:center;border:1px dotted black;}
.td-calendar-days-imagefound:hover {border:1px solid red;}
.td-calendar-days-imagefound a {text-decoration:none;}
.td-calendar-days-imagefound a:hover {text-decoration:none;color:#fff;}
.table-calendar {font-size:9px;padding:0;margin:0;width:600px;border:2px none inherit;}
.table-calendar-vz {font-size:9px;padding:0;margin:0;width:200px;border:0 none inherit;}

I did a search twice here, but could find any info, so any help or ideas are most welcome.

Kind Regards and thanks in advance
twum

Connie
12-01-2005, 08:31 AM
a link to your PixelPost would be nice

Calendar must not be so tricky.... please give us your URL

twum
12-02-2005, 02:44 PM
Sorry about that, here's a link, http://www.tdako.com/photoblog/index.php

I agree with you that it does not have to be tricky. I have an older version running at http://www.tdako.nl/photoblog/index.php and there the calender works. I tried to compare the codes and it all seemed to be the same, but it is still not showing in the new site.

Connie
12-02-2005, 04:12 PM
please fix all the HTML-errors in your template and then try again
I know that when there are some HTML-errors, other parts of a site possible won't show

I checked the simple template at http://www.bildgier.de/pp/143/ and the calendar is working
it is not a PP fault

check whether you really activated the calendar in admin/options/template, please

twum
12-02-2005, 09:17 PM
Hi Connie,
Thanks for the advise. I haven't changed much of the html as I took it just like it is, but I'll open the original and compare. Otherwise, what I wrote above is exactly what I've done.

Like I mentioned, I did activate it in the admin options, but when I go back to check, it shows that it is not activated.

Thanks again and I'll check it properly this weekend.

twum
12-02-2005, 10:03 PM
Maybe this can be explained....

If I go to Admin -> Options to set the layout of the calender, if I choose Normal,. then it shows as it is showing now. But if I choose Horizontal, like I would like it, it doesn't show at all. I compared the code to the original and there is no difference in the html that could warrant such an issue.

Any ideas?

Connie
12-03-2005, 10:01 AM
I don't have any idea

I use the 1.4.3-installation
I use the 1.4.2-installation
I use a 1.5-alpha installation and everywhere the calendar works

If I deactivate it, it is not shown
If I use horizontal, it is horizontal
if I use normal, it is normal

??????

twum
12-03-2005, 10:57 PM
Thanks very much for your help. I'll keep trying to find out why and maybe I'll find the reason, if not, then I'll just keep it as it is now.

vielen dank
twum

boufa
12-04-2005, 08:58 PM
I had the same problem with the horizontal calendar not working. So I looked at the source on the page for the OPTIONS screen, and found that the options for "normal, horizontal, etc" were coded differently.

I checked options.php in the admin folder, and found the typo. Here is how you fix it....

Change
<option value'Horizontal'>Horizontal</option>

to read
<option value='Horizontal'>Horizontal</option>

you are only adding the = after value. Save and then re-upload that file. You should be good then.

Kevin

twum
12-04-2005, 10:56 PM
Kevin, anytime you pass thru Amsterdam, make sure you let me know....I'll buy you a beer.
Thanks a million, but that did the trick. I'll reposition my calender in my template code tomorrow and change it to horizontal in Admin, Options.

I owe you one.
T

Connie
12-05-2005, 05:30 AM
Boufa, thank you for pointing this out,

how could I miss that error?

Twum, please excuse this!

(I still wonder why it's working at some installations and some not)

twum
12-05-2005, 08:42 AM
Connie, no worries. I guess it's just one of those things where we forget to look at the basics. And because at some places it works and some it doesn't, that is why it's not easy to have thought of that.
In fact, let me change the position in my code and see how it shows up.

cheers
twum