I´m wondering if i can do this with modx, and how.
I have a pavilion used for fairs and conventions, that pavilion is divided into 5x5 spaces.
I wanted to rent those spaces online through a modx website.
The 5x5 spaces have unique denominations (ex. AB1, AB4, etc).
An image map of the pavilion with the space localization and a list of ’available’ and ’reserved’ spaces would be available onsite.
I would like the spaces on the list and image map to be clickable so they could be reserved online.
When somebody reserved a space he/she could add a link for their website and a small description on that space, the color of the space would change to a color of choice by the ’client’ on the image map and stop being available for rent, (color change and active link to website) and inserted in the ’Reserved’ list.
The other option was instead of the image map being clicable before reservation, was having a list with ’available’ spaces, after somebody reserved a space the image map would change to reflect that, color change and active link to website, and the space inserted into the ’Reserved’ list.
I can do this manually without using modx coding manually everytime somebody reserve a space, but it seems like I could automatize much of the work using it.
I would appreciate any thoughts on how to do this, any doubts about the idea please ask (it might be a bit confusing)
Best regards
My personal choice would be to avoid a clickable image map, as I don’t think they are accessible. Maybe you can use a table or something? That part depends on the layout of your pavilion. So I guess a lot of how you can solve the problem depends on how you will display the map of the pavilion. Using a table? CSS floats? An image? It would be a lot easier if you can avoid using an image for the pavilion map as dynamic image generation can be a pain and slow.
Andy
hi there....
I would second using a table.
Your going to open a can of worms if you go messing with image maps!!!
Cheers
I´m using a table with a list of the places. And also an image map, or maybe a flash application able to read an external file that will inform if the place is reserved or not.
Not sure how to do it yet,but I´m working on it using modx.
Create a custom database table called something like reservations. Possible fields include:
- location
- date
Write a snippet called "display" to display the pavilion map. The snippet should:
- check the database table for reservations on specific dates
- output a HTML table reflecting the current reservations
Construct a form using eForm that allows a person to enter the reservation details. Supress emailing of the form data.
Use eform2db to process the submitted data:
- check the database table to see if the selected location is already reserved
- if it isn’t reserved then store the reservation based on the form data
- if it is reserved then display a message to the user
Reloading of the page with the display snippet should reflect the new reservation. Make sure to call it uncached.
This is just a rough outline, and you may need to customize some aspects.
Andy