An Event Calendar Mod

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi lg,

it works very well for me. FF 0.7 - 1.5/ IE 5.5 - 6.0/ Opera 7.21

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Sir Erazor
Posts: 72
Joined: Sat 18. Jun 2005, 10:41

Post by Sir Erazor »

Hey,

Danke!

Das Problem war wieder mal die Seitencache... deaktiviert und - Pling - alles läuft perfekt....

-----

the problem was the cache-function of phpwcms... deactivated and - everything was perfect!
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi,

bei Sonderfunktionen wie Kontaktformular, Suchen, Kalender usw. muss der Cache für diese Seiten ausgeschaltet sein.

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Jakim José
Posts: 77
Joined: Fri 18. Feb 2005, 18:55
Location: Portugal/Aveiro

Post by Jakim José »

DF6IH wrote:Hello Jakim,

as far as i understood:

There are several div Tags and a table. The table is fixed to (in my install) 150 px. The only thing that could happen, is that inside the small calendar width can grow bigger than the coded width. Then, different browers make different views as well, caused by different interpretation. I have no pixel meassure instrument :wink: but the thing fits to template.

I have a 10 row php in the template, which takes a **** emergency service out of the database, siwtches "daydriven" the service and put the monthly small cal just beneath of that. Quite easy with big effect in 150px :P

greetz

Jürgen
The font letters of the days (monday, twesday,...) are very big. In this way, I don't obtain 150px of width.

How to modify?
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Post by juergen »

Hi Jakim,

When you use the calender tag {Cal ......}, you use 2 filenames, in the first (? have to look this up) XXXX.noevent-links.php (something like this) the width is hardcoded.. as i think to remember 167 px .. date numbers and all the rest format comes from css.

You know, reset cache after each change inside css to see the result as soon as possible

Jürgen
haedjin
Posts: 18
Joined: Mon 6. Feb 2006, 11:47

Post by haedjin »

Great hack! Excellent job.

Although, all 's (aphostofe) aren't excaped when inserting events...
Hopefully you can fix this.

[EDIT]
In calendar.classes.php, on line 616 is already a addslashes call, but it's commented out. If you remove the // from the front of the line, you can safely use ' inside calendar event fluff.

Any idea on why this was commented out?
haedjin
Posts: 18
Joined: Mon 6. Feb 2006, 11:47

Post by haedjin »

If you replace the showCategories function in main.functions.php with the following, the category will be pre-selected when you edit an event in the backend.

Code: Select all

function showCategories($value) {
	$result = mysql_query("SELECT * FROM " . $GLOBALS['tables']['cal_categories'])
		or die("There was an error<br /> " . mysql_error() . "<hr />");
	$select .= "<select name=\"category\">";
	while ($row = mysql_fetch_array($result)) {
		$select .= "<option value=\"$row[id]\"";
		if($value==$row[id]) {
			$select .= ' selected';
		}
		$select .= ">$row[name]</option>\n";
	}
	$select .= "</select>\n";
	return $select;
}
macmukka

events for 1 month only

Post by macmukka »

Is there anyway to specify all events for just one month, I need to show events from just January for example:

{CAL: Jan} or {CAL: 01/2006}?

I need to show individual event lists for all 12 months without the calendar.

Anyone know how to do this?

Thanks - enjoying the mod.
volkman
Posts: 179
Joined: Wed 13. Jul 2005, 12:52
Location: Hamburg, Germany

Post by volkman »

this would be working through the url (after you setup the calendar)
exapmle:

Code: Select all

www.yoursite.com/index.php?eventpage&month=4&year=2006
I don`t know how to display the events of a complete year without fiddling with the code.

volkman
macmukka

Post by macmukka »

I may be being stupid!! But I dont think I explained probably, I'd like to do something in the template like this:-

<div> {CAL JAN/06}</div>
<div> {CAL FEB/06}</div>
etc etc...
<div> {CAL DEC/06)</div>

perhaps I have to change the code, or can I change the templates to do this and just call a different template file ie. show.events.jan06.php, show.events.feb06.php etc

Thanks volkman for your suggestion! Jim
volkman
Posts: 179
Joined: Wed 13. Jul 2005, 12:52
Location: Hamburg, Germany

Post by volkman »

Hi Jim!
the templates (the ones in the mod /include/inc_module/mod_calendar/inc_front/templates) are only for setting up how to display the calendar and wich part (calendar, menu selection, events). The templates are called through the reptag into the target-page (structure with article in it) you selected (like events).
The displayed month is the actual (normally). Via URL (&month=6&year=2006) you may call events from other months.
I dont know if this works: Try to call the events with someting like

Code: Select all

{CAL:4:cal_eventsonly.php:events_listing.php:eventpage&month=4&year=2006:2}
aso

I won't have time before weekend to try this one and give you some feedback, lots of "regular" work. If this is ok with you, stay tuned.

volkman
User avatar
oeconom
Posts: 337
Joined: Fri 13. May 2005, 09:33
Location: Stuttgart
Contact:

Google Calendar

Post by oeconom »

Hallo zusammen,

hat schon jemand mal nen Blick auf Google Kalendar geworfen?
--> http://calendar.google.com
Ich finde das Ding ziemlich gelungen!
Wenn wir jetzt noch einen Weg fänden, das entsprechend geschickt in phpWCMS zu integrieren (Calendar API ?!), fände ich das ziemlich genial und würde einige Probleme lösen.

Viele Grüße,
FELIX

update:
Sorry, in english as well:

Anyone had a look at Google Calendar, yet?
--> http://calendar.google.com
I like this thing and it's functionality!
If we'd now find some way to integrate it into phpWCMS in a smart way (Calendar API ?!), I'd appreciate that and it would save a lot of problems.

Greetings,
FELIX
Last edited by oeconom on Tue 25. Apr 2006, 19:19, edited 1 time in total.
...alles wird gut!
still alive...
Experimenting with phpwcms and hoping to have time one day to get a site live... :wink:
One Site finished! :P
macmukka

Post by macmukka »

Thanks volkman

that doesnt work! which is a shame! but I will carry on looking. If you have further help & time to look at the weekend, I would be very grateful - best, JIm
zed
Posts: 25
Joined: Sun 5. Jun 2005, 17:25
Location: Basel/Zürich, Switzerland
Contact:

Post by zed »

Can't get the mod working under 1.2.6 :(
I'm using volkmans mod version 3.0

I can edit the premade event but can't add new ones.

Someone has simular problems??

cheers zed
macmukka

show events from whole year?

Post by macmukka »

I want to show all events for the next year:-

so from todays date to next year. ie. 05 May 06 -> 05 May 07 in an event list.

I guess I need to change the SQL query in calendar.classes.php

$sql = "SELECT * FROM " . $GLOBALS['tables']['cal_events'] . " WHERE " .
"(MONTH(date) + (YEAR(date) * 12) <= $month + ($year * 12)) AND " .
"(MONTH(DATE_ADD(date, INTERVAL(span - 1) DAY)) + " .
"(YEAR(DATE_ADD(date, INTERVAL(span - 1) DAY)) * 12) >= $month + ($year * 12)) AND " .
"approved=1 " .
"$extra_sql ORDER BY date ASC ";

but I dont know how!

Can anyone help me? Thanks

Also I have changed the calendar to display completly with CSS instead of a table, if anyone is interested. I can supply the code. It has a few problem in Firefox, but this is an easy fix I think. It means you can easily change the width of the calendar to fit smaller columns.

----> UPDATE

easy fix, should just try these things - for anyone who's interested

change line 284 to:
"( YEAR(date)* 12 <= $year * 12 ) AND " .
Post Reply