View Full Version : Exporting data.
Aaron_Stanley
05-30-2008, 02:27 PM
I work for a newspaper that is in need of a good community events calendar. I think I have found it here. Problem is that we want to export the data out in a couple of various formats to publish weekly in print.
I have looked at a couple of threads and it looks like gathering the database info is easy. Where I run into trouble is that I want the date and times formated and I want the Categories to be right.
I can't see how I would be able to get at the categories list to replace the 0[1X with "Events".
Has anybody tried to do this? And if so any pointers?
ve9gra
05-30-2008, 05:22 PM
The best way to export is actually to use the List mode. Modify the template to the format that you want and view it online. If you absolutely want to export to a format like a CSV, then use PHP's output buffering functions to save the output to a variable then send that out to a file.
That will take care of the formatting of the date/time and will also take care of keeping track of repeating or floating events.
To fill in the category name, that would require custom coding as there's nothing built in to get the category name out in text. Usually, the easy option for this is to create a duplicate sub-category with all the same selections, that way the text shows up in the event along with the color coding.
Hope this helps.
Aaron_Stanley
06-02-2008, 10:41 AM
The best way to export is actually to use the List mode. Modify the template to the format that you want and view it online. If you absolutely want to export to a format like a CSV, then use PHP's output buffering functions to save the output to a variable then send that out to a file.
That will take care of the formatting of the date/time and will also take care of keeping track of repeating or floating events.
To fill in the category name, that would require custom coding as there's nothing built in to get the category name out in text. Usually, the easy option for this is to create a duplicate sub-category with all the same selections, that way the text shows up in the event along with the color coding.
Hope this helps.
This helps but raises more questions. We have a specific format that our calender of events is printed in the newspaper. Here's an example:
EVENTS
Mon, Jun 2
Event 1 Title. Hours. Description.
Event 2 Title. Hours. Description.
Event 3 Title. Hours. Description.
Tue, Jun 3 - Fri, Jun 6
Event 4 Title. Hours. Description.
ETC.
Wed, Jun18
Event 5 Title. Hours. Description.
Event 6 Title. Hours. Description.
Now, I can see that formatting the template will affect the way that the events are represented but since I am looking at grouping and sorting it goes beyond basic template changes.
Does the script have the versatility to work in this setting? Obviously I can't change the script yo work for me but are there variables that I can manipulate that will produce these results?
ve9gra
06-02-2008, 07:15 PM
The only way to achieve this kind of sorting is by using the list part of the Blog mode and looping through it for every day.
I do have the code you will need to do this (it can also omit days with no events), but it is one of my paid-for solutions. If you are interested and want more details, use the link below.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.