Page 11 of 23 FirstFirst ... 91011121321 ... LastLast
Results 101 to 110 of 229
  1. #101
    Join Date
    Jul 2008
    Posts
    59
    Plugin Contributions
    0

    Default Re: Scheduled Events Add-On

    Hi,

    Just installed the add-on - seems to work very well - many thanks.

    I have a question to take it a step further. I'd like to call the event names and dates into a custom text box on the home page.

    I've tried using

    <?php include('\includes\templates\orange\templates\tpl_events_home.php');?>

    Note I've copied tpl_events_default.php and made tpl_events_home.php in the same directory

    I can get text from the file if I add some at the top, (and from a basic php echo 'hello world'), I'm getting nothing from the database. I am not a PHP coder though, just know a few commands.

    Does anyone have any ideas. I could be calling the wrong file for starters...

    Cheers,
    Adam.

  2. #102
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,108
    Plugin Contributions
    11

    Default Re: Scheduled Events Add-On

    When you say text box, are you talking something in one of the sideboxes or a box on the main page?

  3. #103
    Join Date
    Jul 2008
    Posts
    59
    Plugin Contributions
    0

    Default Re: Scheduled Events Add-On

    Hi,

    Sorry, should have been clearer. It'll be a section on the main page (define_main_page.php) where I call in the next 2-3 events from the database.

    e.g

    SCHEDULED EVENTS

    The Peak Open Air Market
    2010-09-25

    Bradbury School Fair
    2010-10-13

    More >>>
    Thanks,
    Adam.

  4. #104
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,108
    Plugin Contributions
    11

    Default Re: Scheduled Events Add-On

    Okay, I'll take a look later this evening. Out on laptop now.

  5. #105
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,108
    Plugin Contributions
    11

    Default Re: Scheduled Events Add-On

    Just a quick look and no guarantees till I can look at it better.

    You'll need the $result call out of includes/modules/pages/events/header.php
    $result = $db->Execute("SELECT * FROM events WHERE (event_stop >= NOW()-1) ORDER BY event_start");
    $eventData = array();
    while (!$result->EOF) {
    $eventData[] = $result->fields;
    $result->MoveNext();
    }
    That will get your data out of the database.

    Next, you will need to change
    <?php
    // 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['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 />";
    }
    ?>
    to use for versus foreach and tell it to list however many you want.
    Bear in mind that this will bomb if set to 3 and you only have 2 events.
    <disclaimer>Not tested and I'm tired from an eleven hour day in the mall.

  6. #106
    Join Date
    Jul 2008
    Posts
    59
    Plugin Contributions
    0

    Default Re: Scheduled Events Add-On

    Many thanks, was out all day yesterday but will give this a try today and let you know how I get on...

  7. #107
    Join Date
    Jul 2008
    Posts
    59
    Plugin Contributions
    0

    Default Re: Scheduled Events Add-On

    Okay, as I suspected my PHP *ahem* skills are not up to the task...

    I understand how tpl_events_default works with regard to displaying the data, so assumed I would be able to call this into another page, in my case 'define_main_page.php', and then simply remove the echo statements for the data I don't want to show.

    I then planned to play around with the PHP to try and limit the events to the next 2-3 on the list (which you've kindly provided some code for). But I can't get the basic idea to work.

    The page call (include) is working. I'm getting the back button displayed, and PHP is working (I've added an 'echo' to the top of tpl_events_default.php to check this)

    Note I've also checked it is working okay when displaying on it's own page (i.e. /index.php?main_page=events) and there is no problem, it looks great (I don't even have to play around with the look of it)!! But I'm having no luck with a call to the DB when trying to diplay it on another page.

    So, where am I going wrong in my asumption I can display the same data on another page? Is it something to do with paths???

    Cheers,
    Adam.



    define_main_page.php
    Code:
    <?php include('\includes\templates\orange\templates\tpl_events_default.php');?>

  8. #108
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,108
    Plugin Contributions
    11

    Default Re: Scheduled Events Add-On

    [FONT=Arial Black]NOTE TO ALL USERS:[/FONT]

    We are redoing this mod to make it less invasive of the core files and give two options for installation.

    Meanwhile... The mod is working with at least 1.3.9f BUT has a small php 5.3 problem that can be fixed by overwriting the phpMyEdit.class.php file in the root directory you are using for your events.

    Extract the zip and load the file to the directory you are using for events.

  9. #109
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: Scheduled Events Add-On

    This might be EXACTLY what the doctor ordered.. Got a potential client that we are contemplating how to use Zen Cart as an events manager tool (Collect RSVPS and payments).. This add-on might be JUST the tool we need to complete this.. Can't wait to see the new version!!

    Quote Originally Posted by dbltoe View Post
    [FONT=Arial Black]NOTE TO ALL USERS:[/FONT]

    We are redoing this mod to make it less invasive of the core files and give two options for installation.

    Meanwhile... The mod is working with at least 1.3.9f BUT has a small php 5.3 problem that can be fixed by overwriting the phpMyEdit.class.php file in the root directory you are using for your events.

    Extract the zip and load the file to the directory you are using for events.
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  10. #110
    Join Date
    Jan 2011
    Location
    Pietrasanta - Lucca - ITALY
    Posts
    8
    Plugin Contributions
    0

    Default Re: Scheduled Events Add-On

    Good add-on!
    The installation is complete now and runs well.
    Congrats on the link to Google Maps. Very useful for those who create events in a professional manner.
    There is a small error message above the table eventz I reach http://locahlost/eshop/eventz and is:

    Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\server\www\myserver.dev\public_html\eshop\eventz\phpMyEdit.class.php on line 3100

    I do not wish to speak on the function set_magic_quotes_runtime() because I see it just me being the administrator of the shop.

    It is now installed on my laptop on the development site where I'm learning about Zen-Cart and where can I test and add add-ons or modules before installing them in the store.
    Thanks. I am every day more pleased to have chosen Zen-Cart.

 

 
Page 11 of 23 FirstFirst ... 91011121321 ... LastLast

Similar Threads

  1. Scheduled sending of eCards
    By cna-tester in forum General Questions
    Replies: 0
    Last Post: 18 Aug 2010, 09:14 AM
  2. Send scheduled email to customers???
    By hifipj in forum General Questions
    Replies: 2
    Last Post: 16 Oct 2007, 02:39 PM
  3. USPS API Updates Scheduled
    By batteryman in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 25 Apr 2007, 09:43 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR