Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 02:20:21 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155539 Posts in 21712 Topics by 7737 Members
Latest Member: deanmacullam
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Bookings v2.x  (Read 1686 times)
BlackBird
AddOn Development
*
Offline Offline

Posts: 2069



WWW
« on: August 19, 2010, 04:16:17 PM »

As I am not able to edit my postings in the original Bookings thread (my old forum account was accidentally deleted), I have opened this new thread for questions and/or suggestions related to the Bookings module.

If you're interested in the history of this module, you find the original thread here:
http://www.websitebaker2.org/forum/index.php/topic,10218.0.html

Current version:2.29
Download:http://www.websitebakers.com/pages/modules/calendar-and-time/bookings.php
Homepage (German):http://www.webing.de/webbird/websitebaker/Bookings

Module to show free/booked times on a calendar page. (For vacation apartments or meeting rooms for example.) Dates can be added with or without time of day.

Please note: This module was created to manage ONE vacation apartment. If you need to manage lots of resources (for example, 20 rooms), you will have to add it as many times as you have resources to manage. (20 times in this example.) So it's okay if you have 5 rooms or apartments or something, but may be too awkward to handle more.
« Last Edit: July 15, 2011, 12:33:05 PM by BlackBird » Logged

Alle großen Veränderungen beginnen im Kleinen
tkche

Offline Offline

Posts: 12


« Reply #1 on: October 27, 2010, 12:07:20 PM »

Hi.
Very nice work on the module!

I've found a small bug... after saving an event and opening it for editing i'm getting some odd characters instead of original text on the rental/text field... i'm using Hebrew characters so i guess it has something to do with utf...
Logged
BlackBird
AddOn Development
*
Offline Offline

Posts: 2069



WWW
« Reply #2 on: October 27, 2010, 12:31:31 PM »

Hm, that's not easy for me to reproduce. Wink

First of all, make sure that all components involved use UTF-8. (Browser, WB Settings, Database settings.)
Next, take a look into the database if it is stored right there. (Table mod_bookings_dates, column "name")

Maybe you'll have to change the table collation. (try uft8_general_ci)
Logged

Alle großen Veränderungen beginnen im Kleinen
tkche

Offline Offline

Posts: 12


« Reply #3 on: October 28, 2010, 06:17:51 PM »

oh, you dont speak Hebrew? it's ok, nobody's perfect  wink

thanks for the reply, tried your suggestions. changing to uft8_general_ci failed to fix the issue Sad
The database seems to show the right value up until i edit the booking using WB and then it goes all wrong showing question marks instead of letters...
I've checked the browser, WB settings and DB, all seems to be ok.

now, as i said, the module works great and showing the right info unless you edit the booking... very odd.
Logged
BlackBird
AddOn Development
*
Offline Offline

Posts: 2069



WWW
« Reply #4 on: October 28, 2010, 06:37:31 PM »

Hmmm... So when first storing the booking all goes right, but when changing the text, the UTF8 is lost, right? Strange. I'll try to reproduce this error. Until I find a fix, you'll have to delete and add again instead of editing bookings, I'm afraid. I'm sorry for this.
Logged

Alle großen Veränderungen beginnen im Kleinen
BlackBird
AddOn Development
*
Offline Offline

Posts: 2069



WWW
« Reply #5 on: October 29, 2010, 09:29:26 AM »

Okay, the problem is located in file functions.php, line 1371:

Code:
<input type="text" name="name" value="<?php echo htmlentities($name); ?>" style="width: 200px;" /><br />

If you change this to

Code:
<input type="text" name="name" value="<?php echo $name?>" style="width: 200px;" /><br />

should fix your problem. BUT. You will not be able to enter special chars like ", ', <, > there anymore.

Please try this workaround and tell me if it helps.
Logged

Alle großen Veränderungen beginnen im Kleinen
BlackBird
AddOn Development
*
Offline Offline

Posts: 2069



WWW
« Reply #6 on: October 29, 2010, 09:32:15 AM »

You can also try this:
Code:
<input type="text" name="name" value="<?php echo htmlspecialchars($name); ?>" style="width: 200px;" /><br />

That should allow ", ', <, > and &, but leave the others untouched.
Logged

Alle großen Veränderungen beginnen im Kleinen
tkche

Offline Offline

Posts: 12


« Reply #7 on: October 29, 2010, 07:24:07 PM »

like a charm!
thanks  smiley
Logged
BlackBird
AddOn Development
*
Offline Offline

Posts: 2069



WWW
« Reply #8 on: November 01, 2010, 03:30:37 PM »

Happy to help. grin I will publish a bugfix release on AMASP that includes this fix tomorrow.
Logged

Alle großen Veränderungen beginnen im Kleinen
BlackBird
AddOn Development
*
Offline Offline

Posts: 2069



WWW
« Reply #9 on: November 16, 2010, 08:01:57 AM »

I have released Bookings v2.26 yesterday. No new features; it only generates complete links now instead of using relative ones. This makes it work better with the also renewed Bookings Droplet, available at AMASP.

Bookings module:
http://www.websitebakers.com/pages/modules/calendar-and-time/bookings.php

Droplet:
http://www.websitebakers.com/pages/droplets/downloads.php
« Last Edit: July 06, 2011, 10:58:49 AM by BlackBird » Logged

Alle großen Veränderungen beginnen im Kleinen
BlackBird
AddOn Development
*
Offline Offline

Posts: 2069



WWW
« Reply #10 on: July 06, 2011, 10:58:16 AM »

I somehow missed the release announcement of v2.27. Anyway, I've released v2.28 today. smiley

Details: http://www.websitebakers.com/pages/posts/bookings-v2.28-released-289.php
Download: http://www.websitebakers.com/pages/modules/calendar-and-time/bookings.php
Logged

Alle großen Veränderungen beginnen im Kleinen
BlackBird
AddOn Development
*
Offline Offline

Posts: 2069



WWW
« Reply #11 on: July 15, 2011, 12:34:13 PM »

Unfortunately, the discussion still goes in the old thread. :/

I've release v2.29 that has a new feature: Groups can have a background color now.

Groups are only used in day view.
Logged

Alle großen Veränderungen beginnen im Kleinen
mikejd

Offline Offline

Posts: 160


« Reply #12 on: April 13, 2012, 11:05:02 AM »

I'm not sure whether to post in this thread, the old thread or start a new one. Anyway let's try.

I have been using the bookings module v2.18 with WB 2.7. Two questions:

Can I just overwrite the old files with the new version v2.32 and it should continue to work?

If I upgrade to WB2.8.2 will bookingsv2.18 still work or do I need v2.32?

Thanks.
Mike
Logged
BlackBird
AddOn Development
*
Offline Offline

Posts: 2069



WWW
« Reply #13 on: April 13, 2012, 07:17:37 PM »

I just can't tell. It's a great distance between that versions, both WB and Bookings. I'd suggest to try the upgrade with a copy of your site first. And don't forget to make a database dump before you upgrade.
Logged

Alle großen Veränderungen beginnen im Kleinen
mikejd

Offline Offline

Posts: 160


« Reply #14 on: April 16, 2012, 09:37:42 AM »

Hi Blackbird, thanks.

I will be trying it out shortly.

One other question - I find the 'Add' button a bit hidden at the bottom of the admin interface, particularly after a few entries have been made. I think it would work better as another button alongside the 'Settings' and 'Groups' buttons. I would like to try to change the code to do this but can't work out which file I need to modify. Can you advise me which file contains the html code for the interface?

regards,
Mike
Logged
BlackBird
AddOn Development
*
Offline Offline

Posts: 2069



WWW
« Reply #15 on: April 16, 2012, 09:45:52 AM »

As this was my very first module, it's mixed up code and HTML. No templates. embarassed So you will have to change the functions.php to tune the add link. It's line 1103 ff in v2.32:

Code:
    if ( Bookings_user_can( 'add', '', $section  ) )
    {
   
        if ( basename( $caller[0]['file'] ) === 'modify.php' ) {
            // called from backend
            $action = WB_URL."/modules/bookings_v2/add_bookings.php";
        }
        else {
            $action = $_SERVER['SCRIPT_NAME'];
        }
       
        echo
             "  <tr><td colspan=\"7\" style=\"text-align: right;\">\n",
             "        <a href=\"$action?page_id=$page_id&section_id=$section&add=1\"\n",
             "           title=\"", $TEXT['ADD'], "\">", $TEXT['ADD'], "\n",
             "        <img src=\"", THEME_URL, "/images/plus_16.png\" border=\"0\"\n",
             "           alt=\"", $TEXT['ADD'], "\" /></a>\n",
             "  </td></tr>\n";
 
    }
Logged

Alle großen Veränderungen beginnen im Kleinen
mikejd

Offline Offline

Posts: 160


« Reply #16 on: April 16, 2012, 10:09:05 AM »

Thanks Blackbird. It looks like it may be a little complicated to put an 'Add' button alongside the 'Settings' and 'Groups', perhaps beyond my capabilities. But I should be able to make styling changes to make it more obvious.

Just another query - at the end of the list of links for 'Current year', 'current quarter', etc is 'Span'. Can you advise what this does?

regards,
Mike
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!