Robbie,
Check out post 172 in this thread.
Printable View
Robbie,
Check out post 172 in this thread.
171:blush:
I tried that and it did not work.
I had an event that finished yesterday that disappeared prematurely so I used the CURDATE option. It solved it disappearing yesterday but it didn't disappear today when it should have.
I will try again in case I did something wrong.
No it is still not working.
The page is: http://www.thehorsestall.com.au/stor...in_page=events still with the CURDATE. Where does it pick up the current date? From the PC or somewhere else?
With your server in Sydney, there shouldn't be a problem with your time matching the server.
Must be an error in the code as it doesn't even flip at midnight here.
Can you post your header_php.php here?
It is the latest one with only the CURDATE change.Code:<?php
/**
* @package Header for Scheduled Events 1.6
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: header_php.php 3001 2012-01-18 11:45:06Z dbltoe $
*/
require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
// include template specific file name defines
$define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_EVENTS, 'false');
$result = $db->Execute("SELECT * FROM " . TABLE_EVENTS . " WHERE (event_stop >= CURDATE()-1) ORDER BY event_start");
$eventData = array();
while (!$result->EOF) {
$eventData[] = $result->fields;
$result->MoveNext();
}
$breadcrumb->add(NAVBAR_TITLE);
?>
I would like a little more direction with this please I don't know SQL very well, however, I am good at following directions and I can edit the php files pretty well... I have gotten this wonderful addon to work with my site now and would love to be able to put at least one image (preferably multiple images) for the events on the page with the descriptions. I'm probably making this too difficult but please help, thank you!
my site is http://azadapparel.com/index.php?main_page=events
Very useful plugin... Thanks dbltoe...
However... I just downloaded and unzipped it, and after installing, found that the COMMENTS field was not showing on the web page.
So I looked in the SQL and see:
CREATE TABLE `zen_events` (
`event_id` bigint(20) NOT NULL auto_increment,
`event_name` varchar(100) default NULL,
`event_location` varchar(75) default NULL,
`event_start` datetime default NULL,
`event_stop` datetime default NULL,
`event_comment` varchar(255) default NULL,
`event_booth_location` varchar(255) default NULL,
`special_text` varchar(200) default NULL,
`map` varchar(255) default NULL,
Then I look in tpl_events_default.php and see:
if ($eventInfo['event_location'] != '') echo "<strong>Place: </strong>" . $eventInfo["event_location"] . "<br />";
if ($eventInfo['event_start'] != '') echo "<strong>Start Date: </strong>" . zen_date_long($eventInfo["event_start"]) . "<br />";
if ($eventInfo['event_stop'] != '') echo "<strong>Stop Date: </strong>" . zen_date_long($eventInfo["event_stop"]) . "<br />";
if ($eventInfo['event_comments'] != '') echo "<strong>Comments: </strong>" . $eventInfo["Comments"] . "<br />";
if ($eventInfo['event_booth_location'] != '') echo "<strong>Booth Location: </strong>" . $eventInfo["event_booth_location"] . "<br />";
if ($eventInfo['special_text'] != '') echo "<strong>Special: </strong>" . $eventInfo["special_text"] . "<br />";
if ($eventInfo['map'] != '') echo "<strong><a href=" . $eventInfo["map"] . ' target="_blank">Driving Directions</a></strong>';
echo "</blockquote><hr />";
So I change to:-
// Display the text of each event in a paragraph
foreach($eventData as $eventInfo) {
echo "<h5>" . $eventInfo["event_name"] . "</h5><hr />";
echo "<blockquote>";
if ($eventInfo['event_location'] != '') echo "<strong>Place: </strong>" . $eventInfo["event_location"] . "<br />";
if ($eventInfo['event_start'] != '') echo "<strong>Start Date: </strong>" . zen_date_long($eventInfo["event_start"]) . "<br />";
if ($eventInfo['event_stop'] != '') echo "<strong>Stop Date: </strong>" . zen_date_long($eventInfo["event_stop"]) . "<br />";
if ($eventInfo['event_comment'] != '') echo "<strong>Comments: </strong>" . $eventInfo["event_comment"] . "<br />";
if ($eventInfo['event_booth_location'] != '') echo "<strong>Booth Location: </strong>" . $eventInfo["event_booth_location"] . "<br />";
if ($eventInfo['special_text'] != '') echo "<strong>Special: </strong>" . $eventInfo["special_text"] . "<br />";
if ($eventInfo['map'] != '') echo "<strong><a href=" . $eventInfo["map"] . ' target="_blank">Driving Directions</a></strong>';
echo "</blockquote><hr />";
}
... and everything now works...