Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Nov 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    big ugly confused question.. PLEASE HELP!

    DISCLAIMER:
    I've never worked at all with databases, and I'm more of a graphic designer than a programmer. I'd really appreciate being pointed in the right direction.

    --

    Making a website for some friends with an art gallery. Click here for a rough idea of how we want to lay it out.

    Basically I need a calendar where different dates will be linked to pages with the event that takes place that day. Those pages will load in an iframe.

    Here's where it gets tricky. I need to build an upload form of some sort, for the client, where they will enter in events: a date, a title, a description, and images. Then the form will update the calandar, creating the link, and dropping the event info into some kind of template that will load in the iframe.

    The calendar should allow visitors to the website to browse backwards and forwards to past and upcoming events. And I guess there will also need to be some kind of edit form so the client can go back and add/change/subtract content from a given event.

    PLEASE HELP.

    Thank you in advance.

  • #2
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,043
    Thanks
    19
    Thanked 42 Times in 42 Posts
    you even started on this? got code? or looking for Paid Work
    this isnt some 5 minute job, some one will probably want paying for coding all this

  • #3
    New to the CF scene
    Join Date
    Nov 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hey, im not asking someone to code a whole website for me. i just thought perhaps there were some scripts out there i could get started with or modify. just looking to be pointed in the right direction. if the job proves too difficult for me, sure i'd be into paying someone to help out. thoughts?

  • #4
    Regular Coder
    Join Date
    Sep 2006
    Location
    Vermont, USA
    Posts
    154
    Thanks
    0
    Thanked 6 Times in 6 Posts
    There are tons of gallery scrips - not sure if there is one correlated with a calendar though. The concept is *simple* - although that term is relative to one's knowledge. You should probably be able to find a free calendar script on any script site, and then it's just finding the code where it makes the date cell, and then searching through your database for any events/whatever that correspond with that date.

    Not an ideal solution, but one a "do-it-yourselfer" might find useful. Best way would be to have a script know what month is being looked at, pull all events/whatever from the database relative to that month, order by day, and then include them in the correct day cell (<td>). This way you're only making 1 "educated" call to the database, storing the results in an array, and then using a pointer to step through it by day.

    PHP Code:
    <?php
    $year 
    = !isset($_GET['year']) || !is_numeric($_GET['year']) ? date('Y') : $_GET['year'];
    $month = !isset($_GET['month']) || !is_numeric($_GET['month']) || $_GET['month'] < || $_GET['month'] > 12 date('m') : $_GET['month'];

    $qr mysql_query('select name from events where date BETWEEN "'.date('Y-m-\1 00:00:00',strtotime($year.'-'.$month)).'" AND "'.date('Y-m-t 23:59:59',strtotime($year.'-'.$month)).'" order by date');

    $events = array();
    while(
    $rs mysql_fetch_assoc($qr))
    {
    $day date('j',strtotime($rs['date']));
    $events[$day][] = $rs;
    }

    ** 
    calendar building code here **
    ?>
    The above might just confuse you, but at the end, you're left with an array with somethign similar to: array(1 => array(event 1 stuff,event 2 stuff,...)) where the 1 in 1 => represents the first day of the month.

    Yea, probably just more confusing and odds are that code would need to be cleaned up a little bit. It also makes a few assumptions about your database ... anyway, chalk it up to me being bored and over helping/assuming.
    Last edited by syosoft; 11-05-2006 at 02:47 AM.
    Active PHP/MySQL application developer available for immediate work.
    syosoft.com mavieo.com - Remote Web Site Administration Suite - Reseller Ready

  • #5
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,024
    Thanks
    2
    Thanked 314 Times in 306 Posts
    If you search on hotscripts.com for "event calender" within the PHP category, there are a number of results that at least by the description do most of what you want.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •