Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Availibilty Calendar

  1. #1
    Join Date
    Feb 2003
    Posts
    39

    Default

    I am in the process of building a holiday web site. It would be great if OR could suport this with a calendar showing booked and empty weeks.
    I have found a way to do this with a little work, but it is not perfect!

    I am currently pasting the line

    <?
    include_once('calendar/calendar.php');
    showcalendar();
    ?>

    into listingview.php

    This indeed pastes the calendar script nicely onto the bottom of the listing view page. However, it pastes the same calendar onto every listing page. I am trying to make each listing have its own calender. This means that I need to make a different calender directory for each listing. ie. instead of calender/calender.php I would need to call it listing18/calander.php for listing ID18 and listing19/calender.php for listing ID 19 etc
    This is not a great problem as it takes seconds to install 10 or so calender directorys.
    The problem comes when I try to link to the individual calenders for the listingview pages.
    So the question is how do I change this line from..

    <?
    include_once('calendar/calendar.php');
    showcalendar();
    ?>

    to...

    <?
    include_once(' ż listing ID number which would change in each individual listing on listing view ??/calendar.php');
    showcalendar();
    ?>
    raven

  2. #2
    Join Date
    Jan 2003
    Posts
    201

    Default

    You could store the value for calendar in a variabale equal to listingID and call it that way. Try this:

    Code:
    $calendar = $listing_id; //or whatever the variable name is you're passing for listing ID
    include_once&#40;"listing".$calendar."/calendar.php"&#41;;

  3. #3
    Join Date
    Apr 2003
    Location
    Charleville / Australia
    Posts
    1,421

    Default

    <?
    include_once('calendar/$listingID.php');
    showcalendar();
    ?>
    This allows you to name the calander as a match to the listing id. it is then called as a match
    I use simlar to this with virtual tours and it seems to work fine i make minor changes to allow for if there is no file to open but overall this is it.

    listing 1 opens and calls calandar/1.php

  4. #4
    Join Date
    Feb 2003
    Posts
    39

    Default

    Thankyou for your help. It now works fine.
    If anyone needs a calender to show availabilty, let me know and I will send you the script
    raven

  5. #5
    Join Date
    Aug 2003
    Location
    France
    Posts
    14

    Default

    MAIL TO THIS PROGRAMMER
    geniusd@mail.ru

    HE SEND ME A NEW VERSION OF THE SCRIPT

    Take a look at my beta OR site

    http://www.scout-massilia.com/pieret...hp?listingID=6

    Then to
    http://www.scout-massilia.com/pieret...hp?listingID=2

    or
    http://www.scout-massilia.com/pieret...hp?listingID=1



    This is the mail I received from him with new script attached
    ----------------------------------------------------------------------------------
    now added folder /calendar/events
    in this folder saved all events-files for different subjects.

    for example if you insert to your exist srcipt :

    include_once('calendar/calendar.php');
    showcalendar($_GET['listingID']);

    and listingID=3

    it will try load events data from file /calendar/events/event3.txt

    it is simply. but main difficulties in admin part.
    i don`t know how develop your admin side of site. But i think you have
    some admin page for change detail about each house? i right?
    for add feature to change events for each house you need insert in it
    page link to events_admin.php file with parameter events_prefix.

    for example you can insert link
    <a
    href="/calendar/events_admin.php?events_prefix=<?=$_GET['listingID']?>">Calendar</a>


    alos you must set permission 777 on folder /calendar/events/!!!!


    if you have some question or you need solve some trouble i will glad
    to help you.

    --
    Best regards,
    Dmitry mailto:geniusd@mail.ru

  6. #6
    Join Date
    Dec 2002
    Posts
    1,883

    Default

    Where can I get this script and what open source script was used to make it.

    Please let me know.

  7. #7
    Join Date
    Sep 2003
    Posts
    1

    Default

    I would be very greatful if someone could supply the script.

    Thanks

  8. #8
    Join Date
    Apr 2003
    Location
    Charleville / Australia
    Posts
    1,421

    Default

    MAIL TO THIS PROGRAMMER
    geniusd@mail.ru

  9. #9
    Join Date
    Dec 2002
    Posts
    1,883

    Default

    Hi I tried, I wanted was to show the calendar for each rental space. As discussed above.

    I created three files and called them events1.php, events2.php and events3.php and stored my event1.txt events 2.txt and event3.txt in events folder inside the calendar folder that part is working ok. but the problem is calling the same on my listingID page as I tried all the things as discussed above but nothing seems to be working.

    Can you help on the same like what directory structure do I need and what changes do I need to make in all php files etc. to show with open-realty

    Thanks :cry:

  10. #10
    Join Date
    May 2005
    Posts
    1

    Default The admin link.

    Hi

    Just been playing with an admin link for this calender.

    Basically, under the links for VRtours and image uploads on the edit_my_listings.php page, add this link.

    <a href="../calendar/events_admin.php?events_prefix=<?php echo $edit ?>">Edit Calendar</a><br><br>

    Same as cool run sugested but just a little different.

    It basically adds the listingID to the prefix.

    I also added the includes for admin_top and user check thingys and it fits right in with my site. Checked it over and evry time I changed the dates/bookings they apear on the respective listing calender.

    Hope that helps someone.

    Now for the bit of code to generate an eventxxx.txt in the events folder everytime someone makes a new listing.

Similar Threads

  1. Found a calendar now.......? (SOLVED!!!!)
    By west4me in forum HELP (CLOSED)
    Replies: 11
    Last Post: 08-07-2004, 02:05 PM
  2. Anyone have a Rental Avl. Calendar
    By west4me in forum General Discussion
    Replies: 1
    Last Post: 06-24-2004, 06:44 PM
  3. Replies: 1
    Last Post: 06-17-2004, 02:46 PM
  4. Appointment Calendar popup a day out
    By Anonymous in forum HELP (CLOSED)
    Replies: 4
    Last Post: 02-09-2004, 10:56 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
  •