Jump to content
Sign in to follow this  
DreamWolfMage

Event Calendar Contribution

Recommended Posts

Hello ...

 

I need to make some modifications to the Event Calendar ? One being the ability to have a text link to display ?All Events? and to display ?Current Month Events?, and if there are no events to be displayed I need there to be a text line that says ?No events to display at this time.?

 

I need the ability to set each event to ?Active? or ?Archived? via the admin as well as the ability to add additional fields into the event details.

 

Is there anyone out there that can help me do these modifications? I would greatly appreciate the help! :D

Share this post


Link to post
Share on other sites

I also would like to have the events calendar improved.

 

- The session id dissappears when you click inside the iframe

- Would like the date range for an event to appear. A horizontal line display is one idea.

- On mouse rollover, I would like name of event to display, instead of having to click on every individual date.

 

Is this possible, any one motivated by $$$$?

Share this post


Link to post
Share on other sites

Whilst we are putting together a wish list, I need there to be an extra set of fields for:

 

Location - town and country

Event Type - holiday, retreat, seminar etc.

Topic - health, martial arts etc.

 

Also:

 

an input screen for registered customers to enter events

the ability to view events sorted by location, date or type of event

 

I don't use the iframe bit of the program at all.

Edited by radders

Share this post


Link to post
Share on other sites

Some possible improvements/ideas:

 

- Annotate/colour coded dates: e.g. Red = delivery date new stock, Green = last day for orders

- register globals 'off' compatibility!

- wrap in osc infobox

Share this post


Link to post
Share on other sites

Has anything came up yet?

 

I am currently modifieing this Even Calendar contribution myself. But i'm sure not a programmer :P

I dont use the IFrame box, only an event calendar page.

 

I'm currently working on event groups or category's. As I dont use Manufactures in my shop i just changed that pulldown menu to a event_calendar_category menu. It already works, and displays the category at the frontpage of my admin (event_manager) with the content from the Database, only problem is, i had put the category name into my db, so the pulldown is visible at the edit/create page, but doesnt work yet :s

 

My futures (that i need):

* A link to show all events

* A link to show current months events

* Categories or groups for my events (like david says: topic), could be something like: Events, Holiday, Closed... [status: Working on it]

* CSS style of a event changes according to group, for ex. Event posted in Holiday will have a red background [status: Working on it... classes...]

* On mousover/rollover an event shows a box with info so you dont have to click it.

 

 

Current problem:

 

<?php
$heading = array();
$heading[] = array('align' => 'center', 'text'  => TEXT_CHOOSE_CATEGORY);
//$events_category_query = tep_db_query("select events_category_id, events_category from " . TABLE_EVENTS_CALENDAR . " order by events_category");

  $select_box = '<select name="events_category_id" onChange="();">';
 $select_box .= '<option value="0">--- Selecteer een optie ---</option>';
 $select_box .= '<option value="1"><font color=red>Feestdagen</font></option>';
 $select_box .= '<option value="2">Gesloten</option>';
 $select_box .= '<option value="3">Beurs</option>';
 $select_box .= '<option value="4">Nieuw Product</option>';		
  $select_box .= "</select>";

$info_box_contents = array();
$info_box_contents[] = array('form'  => '', 'align' => 'left', 'text'  => $select_box );
$box = new box;
echo $box->menuBox($heading, $info_box_contents);
?>

 

I know, some of it is hardcoded for now, thats because i'm still developing, i can change it later to be more osC-like....

So my problem is prob with the onChange... thats where i should give in the function to put the selected option into the db... i yet have to find out how this work, any help is much appreciated....


Even in this dark place, yes, I am afraid of my own shadow.

 

 

 

Contributions | KnowledgeBase | osCommerce 2.2 pdf

Share this post


Link to post
Share on other sites

Well, i gave up on adding a mousover infobox effect. All solutions i found where browser independant en use javascript. I have spent hours on this yesterday, and am gonna leave it now for what it is. However, I still think it could be done quet easy with using some sort of css and javascript kind of dropdownmenu principle.

 

But right now, i need my category's/groups/topics to work!

Is there anybody who can help me with basic things like the above example of putting the stuff in the DB???

Thnx


Even in this dark place, yes, I am afraid of my own shadow.

 

 

 

Contributions | KnowledgeBase | osCommerce 2.2 pdf

Share this post


Link to post
Share on other sites

includes/classes/calendar.php

 

		// Make sure we know when today is, so that we can use a different CSS style
	$today = getdate(time());
	$start_day = $this->getStartDay();
	$click = BOX_CLICK_LINK;
	while ($d <= $daysInMonth)
	{
		$s .= "<tr>\n";
		for ($i = 0; $i < 7; $i++)
		{
			$class = (($i < (6-$start_day) &! $i <= $start_day) ? (($year == $today["year"] && $month == $today["mon"] && $d == $today["mday"]) ? "calendarToday" : "calendar" ) : (($year == $today["year"] && $month == $today["mon"] && $d == $today["mday"]) ? "calendarToday" : "calendarWeekend"));

			if ($d > 0 && $d <= $daysInMonth)
			{
			 $link = $this->getDbLink($d, $month, $year);
			 $s .= (($link == "") ? "<td class=\"$class\" align=\"left\" valign=\"bottom\">" : "<td class=\"$class\" onclick=top.window.location=\"$link\" align=\"left\" valign=\"bottom\" style=\"cursor: hand;\">" );
			 if($show == 1){
			 $s .= (($link == "") ? $d : "<a href=javascript:// onClick=top.window.location=\"$link\" title=\"$click\">$d</a>");
			 }else{
			 $s .= (($link == "") ? $d : "<a href=\"$link\" title=\"$click\">$d</a>");
			 }
			}
			else
			{
				$s .= "<td class=\"empty\"> ";
			}
			  $s .= "</td>\n";	   
			$d++;
		}
		$s .= "</tr>\n";	
	}
	$s .= "</table>\n";
	$s .= "</td></tr></table>\n";
	return $s;	  
}

 

This is the only reference i could fine in the Calendar contribution that changed or said what class the day has, so I am assuming this is the code that i need to alter to have my events show up with another class (css) too!

Am i right?

Like i said, i already made a category and a category_id table inside my events_calendar table in DB...

The info is put in correct too. So now i just call whats in my category_id table? and then asign different styles to each different ID??? or how i do that???


Even in this dark place, yes, I am afraid of my own shadow.

 

 

 

Contributions | KnowledgeBase | osCommerce 2.2 pdf

Share this post


Link to post
Share on other sites

IS this contrib realy dead? i need someone who made, modified or understand this contribution cause i'm realy stuck here :(

 

And i need this future!! I think even for someone not familier with the contrib, but knows php can easely do the things i ask .. i guess.. or guide me - or tell me where to look....

 

I'm here to learn...


Even in this dark place, yes, I am afraid of my own shadow.

 

 

 

Contributions | KnowledgeBase | osCommerce 2.2 pdf

Share this post


Link to post
Share on other sites

	  // Make sure we know when today is, so that we can use a different CSS style

	##### BOF change class for event
	$class_id = tep_db_query("select events_category_id from " . TABLE_EVENTS_CALENDAR ); // get the events category id 
	##### EOF change class for event
	$today = getdate(time());
	$start_day = $this->getStartDay();
	$click = BOX_CLICK_LINK;
	while ($d <= $daysInMonth)
	{
		$s .= "<tr>\n";
		for ($i = 0; $i < 7; $i++)
		{

			##### BOF change class for event
			if ($class_id == 1) { // check whats in $class_id, if that equals one :
				$class = 'calendarEvent'; // then $class has calendarEvent
			} else { // else:
			###### EOF change class for event
			$class = (($i < (6-$start_day) &! $i <= $start_day) ? (($year == $today["year"] && $month == $today["mon"] && $d == $today["mday"]) ? "calendarToday" : "calendar" ) : (($year == $today["year"] && $month == $today["mon"] && $d == $today["mday"]) ? "calendarToday" : "calendarWeekend"));
			} ###### end of Else from 310
			if ($d > 0 && $d <= $daysInMonth)
			{
			 $link = $this->getDbLink($d, $month, $year);
			 $s .= (($link == "") ? "<td class=\"$class\" align=\"left\" valign=\"bottom\">" : "<td class=\"$class\" onclick=top.window.location=\"$link\" align=\"left\" valign=\"bottom\" style=\"cursor: hand;\">" );
			 if($show == 1){
			 $s .= (($link == "") ? $d : "<a href=javascript:// onClick=top.window.location=\"$link\" title=\"$click\">$d</a>");
			 }else{
			 $s .= (($link == "") ? $d : "<a href=\"$link\" title=\"$click\">$d</a>");
			 }
			}
			else
			{
				$s .= "<td class=\"empty\"> ";
			}
			  $s .= "</td>\n";	   
			$d++;
		}
		$s .= "</tr>\n";	
	}
	$s .= "</table>\n";
	$s .= "</td></tr></table>\n";
	return $s;	  
}

 

 

This is what i tried... seems logical to me - but it isnt working.... not a tiny bit even..... :( :( :( :( :( :(

Edited by Darklings

Even in this dark place, yes, I am afraid of my own shadow.

 

 

 

Contributions | KnowledgeBase | osCommerce 2.2 pdf

Share this post


Link to post
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
Sign in to follow this  

×