Zen Cart Logo
Forums / Addon Admin Tools / Scheduled Events Add-On

Scheduled Events Add-On

Views: 45,672

Results 41 to 60 of 231
23 Apr 2009, 8:14 PM
#41
batman36 avatar

batman36

New Zenner

Join Date:
Jan 2008
Location:
Herkimer, New York, United States
Posts:
25
Plugin Contributions:
0

Scheduled Events Add-On

I have installed this mode but still get a black page... i tried using the eventz folder.. entered a sample but it doesn not show up in zen events page. I checked the databs and all fields are present.

23 Apr 2009, 10:08 PM
#42
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,830
Plugin Contributions:
17

Re: Scheduled Events Add-On

Did you load the contents of the directories titled "CUSTOM" to the correct directory in your site.

using cnyapparel as an example:

  • includes/languages/CUSTOM/english.php should go into includes/languages/cherry_zen/english.php
  • includes/templates/CUSTOM/templates/tpl_events_default.php should go into includes/templates/cherry_zen/templates/tpl_events_default.php
    PLEASE NOTE: if you have modified the existing cherry_zen english.php file, you will need to copy your changes to the new english.php
6 May 2009, 11:26 PM
#43
april_may avatar

april_may

New Zenner

Join Date:
Apr 2009
Posts:
52
Plugin Contributions:
0

Re: Scheduled Events Add-On

Questions about this module....

Does this module have the ability for me to upload a block of html code into it? either after the text - or in place of the text.

Instead of showing plain lines of text with the event info, I want to use different fonts, sizes & colors.. and add pictures. I could do that if I could upload html table in a section of the listing.

Also,.... Can I change the layout so the DATE is shown first- uppler left- then the title under that

And... Does the listing automatically roll off when expired?

any help would be appreciated...
thanks, april_may

7 May 2009, 12:23 AM
#44
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,830
Plugin Contributions:
17

Re: Scheduled Events Add-On

Part of the beauty of Zen Cart is that you can customize to your heart's content.
This add-on utilizes a table in the database and is therefore limited to the amount of characters it will accept in each field. Of course, you can change that by changing the size of the fields. Don't know if you can fit much of a table in 255 characters, but you can try to put as much code in the tpl as possible.
The fields WILL accept html. Thus the ability to put Google maps in the Driving Directions portion.
I would not recommend putting font size or any other css-related info in the database. I'd add a few IDs and classes to the tpl_events_default.php and define them in the stylesheet.
The tpl_events_default.php (in the includes/templates/CUSTOM/templates directory) can be modified to present the items in any order you wish.
Lastly, The system will automatically drop an event at midnight on the last day of the event.

7 May 2009, 2:06 AM
#45
april_may avatar

april_may

New Zenner

Join Date:
Apr 2009
Posts:
52
Plugin Contributions:
0

Re: Scheduled Events Add-On

Hey thanks for the quick response!

I'm reallly glad it drops off after the event!
Sounds good-
guess I'll give it a try! I'll play with it and see what I can get.
Can the text field (255 characters) be changed to a text area?
That may work????

I'll let you know how this turns out.

april_may

7 May 2009, 5:19 AM
#46
meltdown avatar

meltdown

Totally Zenned

Join Date:
Jun 2006
Location:
My family and I live in Brighton, England
Posts:
947
Plugin Contributions:
0

Re: Scheduled Events Add-On

dbltoe:

Lastly, The system will automatically drop an event at midnight on the last day of the event.
Is this true for all versions of the mod?

FYI I'm getting a page_not_found when I click on this mod link in your sig

7 May 2009, 5:17 PM
#47
april_may avatar

april_may

New Zenner

Join Date:
Apr 2009
Posts:
52
Plugin Contributions:
0

Re: Scheduled Events Add-On

dbltoe,
I am having trouble installing module.
I believe the problem has to do with me merging the information.php and the english.php files, but I am not sure. I do not want to do a straight install as written as it would blow out all my custom english and information files setting for other stuff on the site.

I just installed WinMerge... I compared the files, but the lines are all different so it was too hard to compare it. (I have to learn how to use that program) Therefore, I copied and pasted your events code into my files so as not to disturb all my other custom code.

The scheduled events (I named it Art Events rather than scheduled events) is showing up in the Information bar (I moved it to 2nd position... under About us)
After FTPing the files and then clicking on "Art Events" as per the instructions, I keep getting an error message. This is the error message I am getting (less my account#)
1146 Table '(removedmyprivateaccountfile#) .events' doesn't exist
in:
[SELECT * FROM events WHERE (EndDate >= NOW()-1) ORDER BY StartDate]

What am I doing wrong? My cart is in a folder names "gallery" - not the root folder- so is that making a difference?
And since I have it set up this way, will the "eventz" file go in the root folder (outside of Zen cart) or inside the "gallery" (inside Zen cart folder?

Possible suggestion....I installed another module- "About US" page and it has SEPARATE files for the information and english, etc. so it adds to and it doesn't overwrite existing files and info. Can this be done for this module? Here is the link- look at the structure for this one. I had no hassle installing it. It did not overwrite anything. The files are written independently and do not require any merging of Zen regular files. http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=182

This is windy... thanks for your patience
I appreciate your help.
april_may
view my ZC at http://artsales.net/gallery

7 May 2009, 5:37 PM
#48
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,830
Plugin Contributions:
17

Re: Scheduled Events Add-On

april_may:

1146 Table '(removedmyprivateaccountfile#) .events' doesn't exist
in:
[SELECT * FROM events WHERE (EndDate >= NOW()-1) ORDER BY StartDate]
Don't know if you can see the red dot in the quote, but this happens sometimes if you have an unusual database prefix setup.
You might try loading the mySQL file through the Admin >> Tools >> Install SQL Patches.
One of the things I need to put in the instructions.:blush:

7 May 2009, 5:57 PM
#49
april_may avatar

april_may

New Zenner

Join Date:
Apr 2009
Posts:
52
Plugin Contributions:
0

Re: Scheduled Events Add-On

yes, I see the red dot
I DID install the patch through Admiin- Tools _Install SQL patches

so now what do I need to do?

april_may

7 May 2009, 5:59 PM
#50
april_may avatar

april_may

New Zenner

Join Date:
Apr 2009
Posts:
52
Plugin Contributions:
0

Re: Scheduled Events Add-On

ps... as far as the file setup stuff....guess I should mention.. I am hosted on GoDaddy...

april_may

7 May 2009, 6:25 PM
#51
april_may avatar

april_may

New Zenner

Join Date:
Apr 2009
Posts:
52
Plugin Contributions:
0

Re: Scheduled Events Add-On

another ps... I just re-installed the patch.. just in case. I still get the same error message. Do I have to uninstall the patch before re-installing? or does it just overwrite the previous patch?

april_may

7 May 2009, 7:23 PM
#52
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,830
Plugin Contributions:
17

Re: Scheduled Events Add-On

$result = $db->Execute("SELECT * FROM (DB_PREFIX . 'events') WHERE (EndDate >= NOW()-1) ORDER BY StartDate");
$eventData = array();
while (!$result->EOF) {
$eventData[] = $result->fields;
$result->MoveNext();Again, take a look at the red. This is from the includes/modules/pages/events/header_php.php.
It's where the system looks for the table, adds the prefix for the look, and selects events that have not expired.
You should not be seeing a . in the error. If your prefix is fribble, you would see fribble_events versus fribble.events.
I'd have a better idea if you PM the entire error to me.
You can also use phpMyAdmin to check if the database table events has the proper prefix.

7 May 2009, 8:12 PM
#53
april_may avatar

april_may

New Zenner

Join Date:
Apr 2009
Posts:
52
Plugin Contributions:
0

Re: Scheduled Events Add-On

OK, now I am entirely lost. I am new to Zen and to php. This has been a crash course for me. I don't know the lingo here, so please bear with me.:blink:
First... what do you mean by " if you "PM" the entire error to me." what is PM? how/what? ... and fribble...was that just a made up name for an example.

Is this what you are talking about?...see red ..here is what is on the includes/modules/pages/events/header_php.php file:

<?php // $Id: header_php.php 2008-12-31 08:07:26Z 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 events WHERE (EndDate >= NOW()-1) ORDER BY StartDate"); $eventData = array(); while (!$result->EOF) { $eventData[] = $result->fields; $result->MoveNext(); } $breadcrumb->add(NAVBAR_TITLE); ?>

Am I supposed to change something on this page?????

7 May 2009, 11:08 PM
#54
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,830
Plugin Contributions:
17

Re: Scheduled Events Add-On

PM is private message.

Try changing> $result = $db->Execute("SELECT * FROM events WHERE (EndDate >= NOW()-1) ORDER BY StartDate");

to> $result = $db->Execute("SELECT * FROM (DB_PREFIX . 'events') WHERE (EndDate >= NOW()-1) ORDER BY StartDate");

9 May 2009, 1:26 AM
#55
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,830
Plugin Contributions:
17

Re: Scheduled Events Add-On

Sorry, I've been away from the computer.
When I mentioned to PM me the error, that was only because you were concerned about revealing part of your path.
It's best to keep the rest of the conversation in the forum so that others can learn from what we are doing to fix your situation.
It appears that your major problems are in the tpl and header. And, I'm not sure which is the problem. One time, it looks as if you have hard-coded information versus letting the variables work for you. The other looks like a problem getting the correct prefix working.
Let's try putting a copy of your header_php.php and the tpl_scheduled_events.php here in the forum.

9 May 2009, 1:31 AM
#56
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,830
Plugin Contributions:
17

Re: Scheduled Events Add-On

MeltDown,
Sorry I missed your post.
The includes/modules/pages/header_php.php file looks for> WHERE (EndDate >= NOW()-1) ORDER BY StartDate")This makes sure that no expired events are selected and then sorts them by the start date.

9 May 2009, 4:36 AM
#57
april_may avatar

april_may

New Zenner

Join Date:
Apr 2009
Posts:
52
Plugin Contributions:
0

Re: Scheduled Events Add-On

Hi- Ok
Recap so we can keep everyone up to date in the forum...

I tried the code you provided in last post and still did not work
I sent you the PM - with my codes...
from phpMyAdmin (first time I've been into the phpMyAdmin file... not familiar with that program yet, but studied it today to familiarize myself with it.) The events table is there. I gave you the prefix for it.

Today, I downloaded the module again, just in case there was something wrong with the files.
I reloaded everything except the english.php and the information
since I only copied and pasted the few lines into the my already customized files.

Still not working. Thought of something- I am on GoDaddy with a Lunix-php server... would that make a difference?

My header_php.php and the tpl_scheduled_events.php are "straight out of the box" I did not alter them.(now or before)


(red text is the original code since I reloaded the file)
header_php.php is:

<?php // $Id: header_php.php 2008-12-31 08:07:26Z 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 events WHERE (EndDate >= NOW()-1) ORDER BY StartDate"); $eventData = array(); while (!$result->EOF) { $eventData[] = $result->fields; $result->MoveNext(); } $breadcrumb->add(NAVBAR_TITLE); ?>

tpl_scheduled_events.php is:

<?php // $Id: tpl_events_default.php 2008-12-31 08:07:26Z dbltoe $ ?> <div class="centerColumn" id="events"> <h1 id="eventsDefaultHeading"><?php echo HEADING_TITLE; ?></h1><hr /> <?php // Display the text of each event in a paragraph foreach($eventData as $eventInfo) { echo "<h5>" . $eventInfo["Event"] . "</h5><hr />"; echo "<blockquote>"; if ($eventInfo['Place'] != '') echo "<strong>Place: </strong>" . $eventInfo["Place"] . "<br />"; if ($eventInfo['StartDate'] != '') echo "<strong>Start Date: </strong>" . zen_date_short($eventInfo["StartDate"]) . "<br />"; if ($eventInfo['EndDate'] != '') echo "<strong>Stop Date: </strong>" . zen_date_short($eventInfo["EndDate"]) . "<br />"; if ($eventInfo['Comments'] != '') echo "<strong>Comments: </strong>" . $eventInfo["Comments"] . "<br />"; if ($eventInfo['Special'] != '') echo "<strong>Special: </strong>" . $eventInfo["Special"] . "<br />"; if ($eventInfo['Location'] != '') echo "<strong>Booth Location: </strong>" . $eventInfo["Location"] . "<br />"; if ($eventInfo['Map_Txt'] != '') echo "<strong><a href=" . $eventInfo["Map_Txt"] . ' target="_blank">Driving Directions</a></strong>'; echo "</blockquote><hr />"; } ?> <div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div> </div> ______________________________________

OK- where do we go from here?
april_may

9 May 2009, 4:57 AM
#58
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,830
Plugin Contributions:
17

Re: Scheduled Events Add-On

change header_php.php to```php

<?php // $Id: header_php.php 2008-12-31 08:07:26Z 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 (DB_PREFIX . 'events') WHERE (EndDate >= NOW()-1) ORDER BY StartDate"); $eventData = array(); while (!$result->EOF) { $eventData[] = $result->fields; $result->MoveNext(); } $breadcrumb->add(NAVBAR_TITLE); ?>
9 May 2009, 7:12 AM
#59
april_may avatar

april_may

New Zenner

Join Date:
Apr 2009
Posts:
52
Plugin Contributions:
0

Re: Scheduled Events Add-On

Thanks for the code.

Tried it.
I'm still getting the same error message.

back to square one.
any other suggestions?

9 May 2009, 11:19 AM
#60
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,830
Plugin Contributions:
17

Re: Scheduled Events Add-On

Are you still getting the "******.events" in the error where it talks about database table?