-
Scheduled Events Add-On
This add-on provides the admin/owner the ability to display upcoming events where their product(s) can be seen or purchased.
It allows the admin/owner to display- The name of the event
- The address or name of the event place.
- The start date for the event.
- The ending date for the event.
- Comments for the event (i.e. Parking is free next door)
- Special information for the event (We'll have fribbitts at 50% off OR Tell us you love Zen Cart and get a 10% discount on any purchase).
- Your location at the event, i.e. Second floor next to the escalator.
- Lastly, you can enter a link generated by any map program like Google that will be presented as a link.
Included in the add-on is a simple enter/edit program to enter and edit items in the database table "events" that is created by an included sql patch.
The add-on consists of two folders. One folder (includes), contains several folders with a total of seven files to be uploaded to your site. All files are in override areas but MAY have already been modified with some other item on your site.
Those of you familiar with database updates and inserts may not need to upload the other folder (eventz) as it is only used to enter/edit events.
A read_me file and installation/user's guide is included in the zip. It's been tested with several different templates and settings but ONLY in version 1.3.8a.
As always... BACKUP! BACKUP! BACKUP!
-
Re: Scheduled Events Add-On
Where might we download this?
Thanks
-
Re: Scheduled Events Add-On
-
Re: Scheduled Events Add-On
Hi There
Sounds like a great tool but I just installed this mod, when I go to the eventz url, I get the following:
MySQL error 1146
Table 'xxxxxx_xxxxxx.events' doesn't exist
MySQL error 1146
Table 'xxxxxx_xxxxxx.events' doesn't exist
phpMyEdit error: invalid SQL query
SELECT `PMEtable0`.`EventID` AS `qf0`,`PMEtable0`.`Event` AS `qf1`,`PMEtable0`.`Place` AS `qf2`,`PMEtable0`.`StartDate` AS `qf3`,`PMEtable0`.`EndDate` AS `qf4`,`PMEtable0`.`Comments` AS `qf5`,`PMEtable0`.`Special` AS `qf6`,`PMEtable0`.`Location` AS `qf7`,`PMEtable0`.`Map_Txt` AS `qf8` FROM `events` AS `PMEtable0` ORDER BY `PMEtable0`.`EventID` LIMIT 0, 159.532 miliseconds
Im using the latest version of zen and installed it as described
Any ideas?
Thanks in advance
Quote:
Originally Posted by
dbltoe
This add-on provides the admin/owner the ability to display upcoming events where their product(s) can be seen or purchased.
It allows the admin/owner to display
- The name of the event
- The address or name of the event place.
- The start date for the event.
- The ending date for the event.
- Comments for the event (i.e. Parking is free next door)
- Special information for the event (We'll have fribbitts at 50% off OR Tell us you love Zen Cart and get a 10% discount on any purchase).
- Your location at the event, i.e. Second floor next to the escalator.
- Lastly, you can enter a link generated by any map program like Google that will be presented as a link.
Included in the add-on is a simple enter/edit program to enter and edit items in the database table "events" that is created by an included sql patch.
The add-on consists of two folders. One folder (includes), contains several folders with a total of seven files to be uploaded to your site. All files are in override areas but MAY have already been modified with some other item on your site.
Those of you familiar with database updates and inserts may not need to upload the other folder (eventz) as it is only used to enter/edit events.
A read_me file and installation/user's guide is included in the zip. It's been tested with several different templates and settings but ONLY in version 1.3.8a.
As always... BACKUP! BACKUP! BACKUP!
-
Re: Scheduled Events Add-On
Perhaps the sql file did not work. Did you apply the patch from the admin, PhPmyAdmin, or.....?
-
Re: Scheduled Events Add-On
Dbltoe,
Sounds like a great mod! Can I see it in action somewhere?
Tina
-
Re: Scheduled Events Add-On
Third link in the sig (toads) will get you to one. Fifth link (vinegar) will show one that is modified to use for recipes. I hope to finalize the events mod into spin-offs for recipes and business outlets.
-
Re: Scheduled Events Add-On
Dbltoe ~
thanks for the lnks! This mod looks like something I'm gonna have to have!
Tina
-
Re: Scheduled Events Add-On
One thing about this that I may not have emphasized enough in the directions. Be sure to rename the eventz directory to something that will work for you and keep prying eyes out.
-
Re: Scheduled Events Add-On
Quote:
Originally Posted by
dbltoe
Perhaps the sql file did not work. Did you apply the patch from the admin, PhPmyAdmin, or.....?
Hi There
Thanks for getting back to me,
Yes I installed it from zen admin, first by pasting the sql, then when that did not work by browsing and uploading the sql.
Just to check, zen using by default the templates "classic" and "template_default" which should I have set the CUSTOM folder to ?, I set it to classic - was this right....
Thanks again.
-
Re: Scheduled Events Add-On
Please don't take this the wrong way, but you should not be using classic or template default. Any upgrades will wipe out all your hard work and make your life miserable.:no:
There might be one small argument for not using a custom directory, but the only one I can think of is that you will totally abandon your current cart on upgrade.
Anyway, if you do a View Page Source in your browser by right-clicking on your site, you should see what folder the system looks in for the stylesheet.css. There will be a line near the top of the view source that shows it loads the stylesheet.css. That folder should be your custom, but, if you see classic or template_default, that is what you would use in your case.
I'd still investigate the override system in the Tutorials?FAQs section. As Monk says, "You'll thank me later."
-
Re: Scheduled Events Add-On
Nice one. Thanks a lot! I have just installed it - I tweaked a little with the layout etc.
www.redinstead.com.au/index.php?main_page=events
-
Re: Scheduled Events Add-On
Thanks! Glad it's working for you.
The beautiful thing about Zen Cart is that we take the cart or a mod and tweak a little here and there. Next thing you know, we have a unique presence on the web.
Lookin' good, mate!:bigups:
-
Re: Scheduled Events Add-On
Hello again,
Hey not taken in the wrong way at all, im glad of the advice !
I will try and see if I cant get this working over the weekend.
Many Thanks
Quote:
Originally Posted by
dbltoe
Please don't take this the wrong way, but you should not be using classic or template default. Any upgrades will wipe out all your hard work and make your life miserable.:no:
There might be one small argument for not using a custom directory, but the only one I can think of is that you will totally abandon your current cart on upgrade.
Anyway, if you do a View Page Source in your browser by right-clicking on your site, you should see what folder the system looks in for the stylesheet.css. There will be a line near the top of the view source that shows it loads the stylesheet.css. That folder should be your custom, but, if you see classic or template_default, that is what you would use in your case.
I'd still investigate the override system in the Tutorials?FAQs section. As Monk says, "You'll thank me later."
-
Re: Scheduled Events Add-On
Hi there,
Just downloaded the schedule.
All seems to be working except I still get a blank page.
I have the link, I have the admin portion under extras okay as well as the eventz portion working too.
I am using 1.3.8a and have no other mods in play.
Any reason why my mainpage for the events is blank?
I am workin on my local server for testing.
Bill
-
Re: Scheduled Events Add-On
Hi,
I also went to phpMyAdmin and saw the table and the 2 listings I added, so the sql patch worked out.
Bill
-
Re: Scheduled Events Add-On
-
Re: Scheduled Events Add-On
Bill,
Do you still have the no-go when you switch back to Classic?
I notice the site you gave is pulling that template.
I haven't had time to really research, but I think you may find it smoothes out with classic.
Also, it would be nice to see a page source for your events page to see where it stops.
-
Re: Scheduled Events Add-On
Thank you for your speedy reply,
If I remember correctly I tried the classic template, and no link showed up.
I am not at home but will confirm tonight, because I am testing it locally.
Am I also to assume that the eventz folder is optional as well?
Bill
-
Re: Scheduled Events Add-On
I was in a hurry myself and failed to mention that you would need to load the files designed for a custom folder into the template_default directory when switching to classic.
The eventz folder (which should be renamed if installed) is for those folks who aren't comfortable with the phpMyAdmin manipulations. phpMyAdmin on your local machine is probably faster.
-
Re: Scheduled Events Add-On
Hi,
Just went through the same process with the classic template.
have the same situation.
Not sure where I am going wrong, walking through your steps.
Will continue to decipher.
Bill
-
Re: Scheduled Events Add-On
JenRed, I was wondering how you made it so that the WHEN: Field on your site www.redinstead.com.au/index.php?main_page=events looked like: Saturday 23 May, 2009 instead of 07/19/2000
Quote:
Originally Posted by
JenRed
-
Re: Scheduled Events Add-On
Hello,
This could be a long shot but since "Events" was the last mod I added yesterday I thought I'd ask for your help.
First, love the mod plus everything on it is working well.... But all of a sudden after entering new info in the Define Pages Editor, for Privacy and Conditions, these EZ- Pages disappeared (actually all ezpages are gone) form the footer nav bar and showed up in the sideboxs. Yet, I have the EZ-Pages Select set to "Green" for "Footer" and "Red" for "Sideboxs" Also, for these pages I have the Define Page Status set to 1 and the pages are ordered.
So my question, did I possible place a file in the wrong spot that may disable the ez-pages. Say the "Sideboxs"? The links for these pages work, they just can't be moved or placed were I would like them.
Thanks in advance for any ideas!
-
Re: Scheduled Events Add-On
I'm confused...
The mod does not touch the ez pages.
Privacy and Conditions are not ez pages.
You may have entered a bad character in the Privacy or Conditions page editor that is causing bad things to happen.
A URL would be helpful in looking at the problem.
-
Re: Scheduled Events Add-On
Your confused, I'm confused...
I thought it was a long shot, as to the "Scheduled Events" mod doing something.
Here's the site: http://74.220.219.77/~thirstyi/huntface
Thanks for the reply.
-
Re: Scheduled Events Add-On
solved it. forgot to go back into the ez-pages settings and change the 0's to 2's for the pages in question. i will read on so that i understand the difference between ez-page and define page.
thanks again for the post as well as the great mod.....
-
Re: Scheduled Events Add-On
Glad you got it going. And, thanks for letting folks know what it took to get it going.
-
Re: Scheduled Events Add-On
Quote:
Originally Posted by
brenjt
hi Brent - I didn't see this question so I'm sorry it took a while to get your answer!
In the file includes/templates/YOUR_TEMPLATES/templates/tpl_events_default.php change this:
Code:
if ($eventInfo['StartDate'] != '') echo "<strong>Start Date: </strong>" . zen_date_short($eventInfo["StartDate"]) . "<br />";
to this:
Code:
if ($eventInfo['StartDate'] != '') echo "<strong>Start Date: </strong>" . zen_date_long($eventInfo["StartDate"]) . "<br />";
ie. change to
(in my case I also changed "Start Date:" to "when:" to fit more with the style of my site)
Hope that helps! :)
Jen
-
Re: Scheduled Events Add-On
Thanks for this great mod - It came along at a great time!
A bit of a problem on install: Everything seems to be in place, including a green light on the SQL install. However, I am getting a MySQL error 1146 when I click on the Scheduled Events link sidebox link. It also also apparent when I visit my http://www.yoursite.com/eventz page:
Quote:
MySQL error 1146
Table 'xxxxxxxx_zc2.events' doesn't exist
I've re-uploaded extra_pages_filenames.php and confirmed that other files are in place. What else could be causing a 1146 error?
Thanks in advance
-
Re: Scheduled Events Add-On
Check to make sure the events table got added to your database. If it's not there, go to in the admin Tools >> Install SQL Patches and reload the events.sql file.
You can also use phpMyAdmin to load the file. Open phpMyAdmin and click on your database. In the right-hand window click on the Import tab. Use the Browse button to browse your computer for the events.sql file and let it do the work for you.
-
Re: Scheduled Events Add-On
Good call on using phpMyAdmin - I had re-installed the SQL numerous time without success but using phpMyAdmin made the difference!
I hope I'm not stepping on any toes but I wanted to make a suggestion / comment: It is necessary to slightly modify includes/languages/CUSTOM/english.php (just one define must be added), a file that will almost certainly have been modified previously. To achieve this you have included an updated version of the original english.php with the define in place. My fear is that those new to Zen Cart might inadvertently over-write the all-important english.php with that version, wreaking havoc on their site (Although you have indeed given the proper warnings). Rather, maybe you could just include the following instructions in the events_installation_users_guide:
In includes/languages/CUSTOM/english.php, Under the heading:
Quote:
// information box text in sideboxes/information.php
add this define:
Quote:
define('BOX_INFORMATION_EVENTS', 'Scheduled Events');
The same could even be said for includes/modules/sideboxes/CUSTOM/information.php, since it is just one if statement.
In includes/modules/sideboxes/CUSTOM/information.php, Under the heading:
Quote:
unset($information);
add this if statement:
Quote:
if (DEFINE_EVENTS_STATUS <= 1) {
$information[] = '<a href="' . zen_href_link(FILENAME_EVENTS) . '">' . BOX_INFORMATION_EVENTS . '</a>';
}
To my way of thinking, making 2 minor additions is quicker, easier and less daunting of a task then comparing files using Win-Merge etc. if indeed the files have been modifed previously.
Thanks again for this great add-on!
-
Re: Scheduled Events Add-On
Good Call.
I'm tweaking things now to try to get this where all can be done in the admin. Will include dual instructions with the next upgrade.
I have found that most folks fear inserting/changing/removing code and went that way at first.
However, I understand that warnings are like operating instructions. Often read AFTER the problem occurs.:no:
Ahhh to be once again in the pre-Alps of Friuli........
-
Re: Scheduled Events Add-On
Quote:
Originally Posted by
dbltoe
Ahhh to be once again in the pre-Alps of Friuli........
Things change slowly here, they will be awaiting your return more-or-less just as they were when you left... :P
If I could inject one more item for the wish-list: It would be nice to be able to turn this mod off and on from the admin.
-
Re: Scheduled Events Add-On
...would it be possible to have it turn off automatically if there are no scheduled events? I can imagine that it might be difficult because of the if statement added to information.php. Although maybe the if statement itself could be set to not display if there are no events? :huh:
-
Re: Scheduled Events Add-On
But Porcia, Roveredo and Pordenone have left me behind.:(
The move to the admin will include the on/off switch and the ability add/change/delete columns.
When this is where I want it, it will next morph into Recipes and Retail Outlets. It's already easy to modify events to do both of these, but I want to wait till I like Events a little better.
ciao
-
Re: Scheduled Events Add-On
One of my zen carts is a dual language site, the second language being Italian. Unless I'm missing something, this mod doesn't really lend itself well to multiple languages, correct? It does have an includes/english file that houses the events.php file, allowing me to properly name the NAVBAR_TITLE & HEADING_TITLE in both languages. However, the content itself is defined in tpl_events_default.php at templates/CUSTOM/templates/, which, unless I'm mistaken cannot have a language over-ride.
Is this true, or am I not seeing something obvious? :huh:
-
Re: Scheduled Events Add-On
Sorry for the late reply, been recovering from the Rodeo.
You are correct and I apologize that I didn't take into consideration other languages with this version.
I'll be taking this and your other suggestion into account when looking at this mod again this month.
-
Re: Scheduled Events Add-On
Quote:
Originally Posted by
dbltoe
Sorry for the late reply, been recovering from the Rodeo.
You are correct and I apologize that I didn't take into consideration other languages with this version.
I'll be taking this and your other suggestion into account when looking at this mod again this month.
Hey, don't sweat it - I appreciate the effort you and other folks put into these community modules, often while juggling day jobs, family life and some semblance of a social life at the same time. :D
-
Errors when using Install SQL Patches
:oops:
Some have reported errors when using "Install SQL Patches" in the admin to install the included .sql file
A problem occurs when you have a database prefix set in your two configure.php files.
Install SQL Patches will automatically add the DB_PREFIX to the database events table name. For example, events becomes zen_events if your DB_+PREFIX is "zen_".
The mod files are set to access the events table without any prefix.
The quickest fix is to rename the table after it is loaded.
If you are using phpMyAdmin, do the following:
- Open phpMyAdmin and click on the database containing the table.
- Click on the table to rename. (probably zen_events)
- Click on the Operations Tab in the right-hand screen.
- Under the "Table Options" section, enter "events" (without the quotes" in the "Rename table to" block.
- Click the "Go" at the bottom-right of the "Table Options" section.
- You should get a message in yellow background stating, "Table events has been renamed to events"
- Your events should now be working.
The next release will include a check to see if a DB_PREFIX exists and cure this problem.
-
Re: Errors when using Install SQL Patches
I love this mod so thank you very much! I just wondered... (it can't hurt to ask, right?)
I have a wordpress blog at www.jenleheny.com and I would love to have a sidebar widget to display the events list that is at my zen cart shop site at www.redinstead.com.au/index.php?main_page=events
Do you have any experience with widget making or does anybody else know how (or if) this is possible?
-
Re: 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.
-
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
-
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
-
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.
-
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
-
Re: Scheduled Events Add-On
Quote:
Originally Posted by
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
-
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?ma...roducts_id=182
This is windy... thanks for your patience
I appreciate your help.
april_may
view my ZC at http://artsales.net/gallery
-
Re: Scheduled Events Add-On
Quote:
Originally Posted by
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:
-
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
-
Re: Scheduled Events Add-On
ps... as far as the file setup stuff....guess I should mention.. I am hosted on GoDaddy...
april_may
-
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
-
Re: Scheduled Events Add-On
Quote:
$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.
-
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?????
-
Re: Scheduled Events Add-On
PM is private message.
Try changing
Quote:
$result = $db->Execute("SELECT * FROM events WHERE (EndDate >= NOW()-1) ORDER BY StartDate");
to
Quote:
$result = $db->Execute("SELECT * FROM (DB_PREFIX . 'events') WHERE (EndDate >= NOW()-1) ORDER BY StartDate");
-
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.
-
Re: Scheduled Events Add-On
MeltDown,
Sorry I missed your post.
The includes/modules/pages/header_php.php file looks for
Quote:
WHERE (EndDate >= NOW()-1) ORDER BY StartDate")
This makes sure that no expired events are selected and then sorts them by the start date.
-
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
-
Re: Scheduled Events Add-On
change header_php.php to
PHP Code:
<?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);
?>
Make sure there are no spaces after the ending ?>
-
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?
-
Re: Scheduled Events Add-On
Are you still getting the "******.events" in the error where it talks about database table?
-
Re: Scheduled Events Add-On
Yes, I get the same message no matter what code I've tried. Makes me wonder if something else is over-ridding it.
april_may
-
Re: Scheduled Events Add-On
When you look in the database, is the table named events or something else? Perhaps zen_events?
-
Re: Scheduled Events Add-On
it is zen_events
An unrelated question... you say the events roll off when expired. Is there a way to have an option to have them "reset" if the event is a monthly re-occuring event.
Example: I list 2nd Saturday Art Walk events. They are always on the 2nd sat of the month, so as soon as one expires and "rolls off" can it be programmed to re-set to show it for the next month?
april_may
-
Re: Scheduled Events Add-On
Let's try this as the header_php.php
PHP Code:
<?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 zen_events WHERE (EndDate >= NOW()-1) ORDER BY StartDate");
$eventData = array();
while (!$result->EOF) {
$eventData[] = $result->fields;
$result->MoveNext();
}
$breadcrumb->add(NAVBAR_TITLE);
?>
-
Re: Scheduled Events Add-On
Tried it. Still does not work - still getting same error message
-
Re: Scheduled Events Add-On
Could it be in the files where I copied and pasted rather than WinMerging?
in the informatio.php file I copied and pasted this code:
if (DEFINE_EVENTS_STATUS <= 1) {
$information[] = '<a href="' . zen_href_link(FILENAME_EVENTS) . '">' . BOX_INFORMATION_EVENTS . '</a>';
}
is this the ONLY code snip that you added to this file?
Maybe I am missing something here.
-
Re: Scheduled Events Add-On
Quote:
Originally Posted by
april_may
Tried it. Still does not work - still getting same error message
The EXACT SAME message as before or does it now contain "zen_events"?
-
Re: Scheduled Events Add-On
exact same message as before... the error message has never changed no matter what code we've tried.
-
Re: Scheduled Events Add-On
could this be it? In the extra_pages_filenames.php
?php
// $Id: extra_pages_filenames.php 2008-12-31 08:07:26Z dbltoe $
// define the extra page filenames
define('FILENAME_DEFINE_EVENTS', 'define_events');
define('FILENAME_EVENTS', 'events');
?>
should I change it to
define('FILENAME_EVENTS', 'zen_events');
-
Re: Scheduled Events Add-On
No.
If you can hold off to later today after I get out of the flea market my wife talked me into, we'll look at this a little more in depth.
-
Re: Scheduled Events Add-On
-
Re: Scheduled Events Add-On
for later... I went ahead and tried changing it and that did not work either.
"talk" later
-
Re: Scheduled Events Add-On
Hi. Thank for the MOD. It's awesome and very useful for my site. Although I loved it, I don't know a thing to tweak it. Thanks to genius people here. :smile:
Can someone tell me how to add a "Start Time" (ie. 8:20am) and "End Time" ? (ie. 4:20pm) in the form? This is for a yardsale community I'm building. I want it to show as:
What: (Already working)
Where: (Already working)
When: (Already working)
Time: ----need help here---
Notes: (Already working)
Driving Directions: (Already working)
Thanks in advance guys! :smile:
-
Re: Scheduled Events Add-On
Actually, when I developed the mod, I wanted to avoid putting too much code into the works. It was important to track the start and stop date in order for the system to sort the events and drop them from the list when they were done.
For that reason (and the varying times of servers) I chose to use the Comments section for the information about event times. Entering "We'll be open 9 to 5 Thursday, 10 to 6 Friday, and 12 to 6 Sunday" is kinda hard to code.:P You can see why I tried to make it flexible.
If every one of your events were going to have static times for each day OR all events are for one day only, that's another matter. You could use the start or end date to insert the time and extract it in the tpl file.
Let me know if you need to go that way and I'll help with the code, but I think you can get by with using comments.
-
Re: Scheduled Events Add-On
Quote:
Originally Posted by
dbltoe
You could use the start or end date to insert the time and extract it in the tpl file.
Let me know if you need to go that way and I'll help with the code, but I think you can get by with using comments.
Thanks for the reply! :-) I actually want to post concert events too and others that has the start and end time. I did notice a 00:00:00 but just don't know how to go about it.:blush:
-
Re: Scheduled Events Add-On
Hi,
Works nice and so useful! But I have a puzzle in my mind is if there would be a chance that someone else would enter the 'eventz' folder by accident and input something like spam there!
regards,
-
Re: Scheduled Events Add-On
Matters not what the folder is named. It doesn't show in the sitemap and add an underscore to the name can help as well.
Naming it differently will help or you can access the events table through phpMyAdmin or some other database program. Navicat has a free tool that is nice.
The eventz folder was created for those who were uncomfortable with having to dive into the database.
-
Re: Scheduled Events Add-On
hi im using a fresh install of 1.3.8 i have some addons but nothing that conflicts with these folders
i have installed the sql patch and everything seems to be great except the events main page shows as blank, despite me having set up a dummy event for it to display, i cant work out what is causing it to not show up? i have scanned this board over and over and ive seen a couple of posts relating to this but no solution unless i am missing something? any help would be much appreciated :smile:
thankyou
-
Re: Scheduled Events Add-On
my mistake, i entered a past date for the dummy event i put in, school boy error! working now lol
-
Re: Scheduled Events Add-On
Glad you got it going:clap:
For others' reference. --- When the events page comes up with the title and no information, either there's no information or the information is outdated.
-
Re: Scheduled Events Add-On
Extra sidebox created.
When I installed the mod two sideboxes were added to my admin/layout page....one called sideboxes_information.php and the other called sideboxes_information.php.bak
I don't know if it's related, but I also got an error in either box when I clicked on the link in the store. Subsequently found in this forum info to rename database files sans prefix and the proper page now loads.
I tried erasing the bak file from its folder and that just leaves the the entry on the admin/layouts page but with a big red 'error - file missing' message.
Anyone know how I can get rid of that second box? It doesn't appear to interfere....but I'd like to de-clutter.
-
Re: Scheduled Events Add-On
Please provide a link and we'll try to help.
-
Re: Scheduled Events Add-On
No link to my site as I'm doing this on test site 1.3.8 local server before I update live site from 1.3.7
I did resolve the duplicate sidebox issue by removing all the files, including the .bak file and reloading (with no .bak file ). Still not sure why it happened but suspect the DB prefix somehow related.
The mod is up and working and I really like it.
Now, for my next task.... I tried to move the link for Events from a sidebox to the CSS Flyout Header. Amazing to me, I got the link to place itself in the header, but the link can't find the actual Events page.
I put FILENAME_DEFINE_EVENTS in templates/my temp/common/tpl_dropmenu.php. and I put HEADER_TITLE_DEFINE_EVENTS in languages/english/extra_definitions/my temp/headermenu.php
In both cases I copied code used for another item in same header, and this worked as far as physically placing the link where I wanted it.
Is there a file address I should be popping in somewhere to direct the link?
I was planning to repeat the exercise using url instead of file name to see if that works. And/or to use the url to place the link in my upper nav bar. (The object being to eliminate the Information sidebox).
-
Re: Scheduled Events Add-On
Found quick and easy solution in CSS Flyout forum to add Scheduled Events to my Horizontal Information Menu.
A single line of code added in includes/templates/my template/common/tpl_dropmenu.php
<li><a href="index.php?main_page=events">Events</a></li>
I placed this in the file relative to other links for where on the menu I wanted it to appear.
Thanks for doing this mod!
-
Re: Scheduled Events Add-On
This mod looks like a great start to what i need for my site. I need two other functions though and would lioke to know how difficult it would be to modify this to support them as foolwos.
1. categorise the events based on the product categories
2. have the advanced searc ported to search the events table.
thanks in advance
Roy
-
Re: Scheduled Events Add-On
You can always add a category column to the database and add it to the sort as a group by.
-
Re: Scheduled Events Add-On
Thanks 2 questions.
1. I could add a category column but is there a way to use the existing product categories?
2. Where\what do i edit to add the column to the sort as group by?
-
Re: Scheduled Events Add-On
You'd have to tie the two together with IDs. To me it would be simpler to just fill in the column than trying to get the lookup working with the simple search it now uses.
The Select statement is in inlcudes/modules/pages/events/header_php.php.
HTH
-
Re: Scheduled Events Add-On
OK Thanks, I'm using the multisite mod and wanted to use it to restrict events by category as well.
-
Re: Scheduled Events Add-On
how would i go about uninstalling this add on please?
-
Re: Scheduled Events Add-On
The quickest way is to delete the includes/extra_datafiles/extra_pages_filenames.php
The other files and the database info will still be there, but the option to view events will not.
You can delete the files using the paths in the add on if you want to remove them all.
It' just a reversal of the install.
Did you have problems or just want to go a different way?
-
Re: Scheduled Events Add-On
Quote:
Originally Posted by
dbltoe
Did you have problems or just want to go a different way?
no problems at all, ive just decided to put on my events as saleable products as i need to sell places on courses and am not really advanced enough to modify the add on
thanks for your help :D
-
Re: Scheduled Events Add-On
can we add images to the events.
-
Re: Scheduled Events Add-On
You can add them one of two ways.
Create an extra field in the events table called images or enter the image into one of the other categories. Comments, Special, and Location will all accept 200 or more characters so a link should work in any of those.
If you create an extra field, make sure the type is varchar, the length is 255, and the Allow Null is checked. Then, you'd need to edit the includes/templates/CUSTOM/templates/tpl_events_default.php to add the display of the image field.
Either way, you'll enter html link code for the picture you plan to use. Enclosing them in a div with an id or class will allow you to control the image with the stylesheet.
Remember to use relative links and that the image must be in an accessible directory of your site.
HTH
-
Re: Scheduled Events Add-On
The shopping cart, is visible only after logging in. Hence the events addon also goes there.
But I want that the events can be viewed without the user logging in.
Pl. suggest.
-
Re: Scheduled Events Add-On
Hi,
Great mod, thanks for you time and effort.
I have a suggestion regarding the Eventz addon. If you put the Eventz folder into your admin folder it becomes as secure as the back end (ie SSL)
I have to point out that anyone with the admin folder named admin should see https://www.zen-cart.com/tutorials/index.php?article=33
You could then further add to this by add link to the page in the Tools menu - I'm looking at this now and will follow up with the info if / when I figure it out!
hope this helps
Regards
Natty.
-
Re: Scheduled Events Add-On
Does anyone have this installed? I'd like to see an example of what it does.
-
Re: Scheduled Events Add-On
haredoDOTcom russianradiantsaDOTcom hornedlizardcreationsDOTcom diamondwwesternDOTcom for a few.
I'm in the process of making this a little simpler, but it does work with 1.3.9d and 5.3 is not a problem either.
-
Re: Scheduled Events Add-On
Thanks for the links, it looks really good.
-
Re: Scheduled Events Add-On