|
Author
|
Topic: CSXport Plug-In (export events to a delimted file)
|
michaelest Member
|
posted December 30, 2002 07:10 PM
Just completed a beta version of a new CSXport plug in. As its name implies, it will enable you to export events as a delimited file and save/open the file on your desktop.From the admin control panel, you can choose which fields from your Events and Schedule DB's will be exported (and which fields won't). You can also set the delimiter to TAB, COMMA or PIPE. The function appears at the top of the SEARCH RESULTS page. If there are "No Matches", the link will not appear. The plug in uses the same results from a "just completed" search to populate the exported file. You can check it out at http://www.estigoy.com/csremind/calendar.cgi . Click on "Search" and find some events (just enter the letter 't' in the Title field). On the results page, you'll notice the CSXport link at the top. If you go to the control panel, select CSXport Setup to play with the parameters. Epoch's are converted to YYYYMMDD. All other data is left unchanged. I'm packaging it up and will release it (in beta) soon. - Michael ------------------ michael@estigoy.com http://www.estigoy.com/csremind [This message has been edited by michaelest (edited December 30, 2002).] IP: Logged |
DanO Administrator
|
posted December 30, 2002 07:32 PM
Sounds useful.Dan O. ------------------
IP: Logged |
DanO Administrator
|
posted December 31, 2002 12:46 PM
quote: I gotta work on not opening this window - didn't have time to address this yet.
I would think just not opening a new window with your JavaScript code would do that. Just using a window.location.href = "http://...csx_export=yes&ids=5+6" should work provided your mod is returning the proper HTTP headers to initiate the download (like it appears to be). quote: window.open('h t t p ://www.estigoy.com/csremind/calendar.cgi?command=search&view=Search&csx_export=yes&ids=5 6', 'csxport',
I think you're going to run into problems with the space between the events IDs (highlighted above) in some browsers though. Dan O. [This message has been edited by DanO (edited December 31, 2002).] IP: Logged |
michaelest Member
|
posted December 31, 2002 01:21 PM
Dan O,Thanks for the feedback and tips. Explorer, NS7.0, and Opera 6.5 tend to do o.k., but NS4.7 doesn't like the spaces. I orignally had the ID's listed as a visual reference to the info I should be expecting in the data file, and, well, just left it there. I tried the window.location and it still results in a new window. I was hopeful though. The way the script works, it first parses the initial search returns to get a list of the matching event ID's. The actual data for the events, doesn't get parsed until the user clicks on the link and sends the parameter back to the script(&csr_export=yes). This results in a new window. I use a new window because I do not want to lose the current state of the screen output. I have to separately parse the DBfiles (to address the arbitrary field selections, and to get information not normally displayed in the typical results), generate temp file, and then pass a reference to a supporting script (which initiates a new session/new mime type). I can't change mime types in the current session since that is already declared as "text/html" and the browser will parse all output generated by the script as a web page. I'm just getting started with perl and javascript and welcome the information. Your feedback and existing plug ins have aided immensely in creating these. Thanks, Michael ------------------ michael@estigoy.com http://www.estigoy.com/csremind [This message has been edited by michaelest (edited December 31, 2002).] IP: Logged |
michaelest Member
|
posted December 31, 2002 04:21 PM
Here's the beta package. Should work o.k. as an admin tool. Still some items to polish up for end user experience (or not?).Let me know if you run into any problems. Read the release notes in the package. -Not tested in a Windows Server environment. -Not Netscape 4.7 friendly yet. -Internet Explorer, Netscape7.0 and Opera 6.5 seem to work fine. http://www.estigoy.com/csremind/csxport06b.zip - Michael ------------------ michael@estigoy.com http://www.estigoy.com/csremind [This message has been edited by michaelest (edited January 01, 2003).] IP: Logged |
DanO Administrator
|
posted December 31, 2002 04:26 PM
** I can't change mime types in the current session since that is already declared as "text/html" and the browser will parse all output generated by the script as a web page. **There is a variable $no_header in calendar.pl that negates output of the standard Content-type headers. In fact it is used by the script when called via SSI. I would think it should be possible to set that variable to 1 and add a routine to output the appropriate headers to initialize downloading of whatever is output after that? That way the download box would popup and the current calendar view not be affected. Dan O. ------------------
IP: Logged |
michaelest Member
|
posted January 01, 2003 10:35 PM
Dan O.,What a great tip! I was able to implement it, but it took me awhile to figure out the correct method. New beta available at http://www.estigoy.com/csremind/csxport06b.zip . However, I still need a secondary script. Since CSX is an "AFTER" routine, I had to create a small script that executed at the getInput() stage, prior to the $no_header/$no_session variables being set. I took me a bit longer than I thought it would, but with window.location=href and the new routine executing at the getInput stage, I was able to pull it off. Thanks again for your assistance! - Michael ------------------ michael@estigoy.com http://www.estigoy.com/csremind IP: Logged |
DanO Administrator
|
posted January 02, 2003 02:28 PM
Did you implement the mod at your site yet? I tried it searching for just "t" like before and clicked on the "Click to export and save results as a text file" link. The download box came up without effecting the current calendar. I downloaded the file which was titled "event.txt" in the download box but it is an HTML page with the calendar display but with the error message: quote: Search query must not be blank! Error requiring custom function file '/u/web/estigo/csremind/calendarscript/plugins/csxport/display_after_search.pl'. The error is: [Can't modify constant item in list assignment at /u/web/estigo/csremind/calendarscript/plugins/csxport/display_after_search.pl line 156, near "))" Compilation failed in require at (eval 5) line 1. ]
Dan O. PS. You might also want to consider sending a header to suggest the file name to be saved and incorporate the date into it somehow. Eg. file-01022003.txt [This message has been edited by DanO (edited January 02, 2003).] IP: Logged |
michaelest Member
|
posted January 02, 2003 02:45 PM
I was screwing around with another test.Try it again. should work fine (even in Netscape 4.7). BTW, I added a "get all" keyword feature. If you enter '!allevents' in either the title or description, All Events (within the date restrictions) can be exported (note: the search results will be null, but the link at the top will say "export all to file"). There's one other issue I'm working on, and it has to do with retrieving ALL occurrences of an event. Right now, csxport only retrieves the first occurrence. - Michael ------------------ michael@estigoy.com http://www.estigoy.com/csremind IP: Logged |
DanO Administrator
|
posted January 02, 2003 07:07 PM
** Try it again **Seems to work now Ok. Good work! When you're working on the ALL occurrences, how about the file name thing I mentioned. I know it's a little thing but while you're there...  Dan O. [This message has been edited by DanO (edited January 02, 2003).] IP: Logged |
michaelest Member
|
posted January 02, 2003 07:34 PM
Name thingy completed. Filename = MMDDYYYY.txt.Good idea. Still working on all occurrences, although it seems as though this is a bug that Matt might be working on? I've read some earlier posts and responses - CS doesn't include the recurring events in the search results if the first occurrence of the event falls outside of the date boundaries. If this is already being looked at, maybe I should just wait? 07b available at http://www.estigoy.com/csremind/csxport07b.zip . - Michael ------------------ michael@estigoy.com http://www.estigoy.com/csremind [This message has been edited by michaelest (edited January 02, 2003).] IP: Logged |
DanO Administrator
|
posted January 02, 2003 08:07 PM
Great! That was fast.I just noticed a couple of other things that could use some work before a final release. It looks like you're just printing the link from the script but that causes it to be printed at the very top of the calendar page, even before the <HTML> tag. That really isn't really good. I believe there is a method that if used will print the code in an appropriate place in the page code, maybe something like: $Template::userMessage .= $link_code_here. "<B>"; Secondly, since the download popup box is displaying and the calendar is not being replaced when that link is clicked, the link doesn't need to be JavaScript any more. Just a thought. Keep up the good work! Dan O.
[This message has been edited by DanO (edited January 03, 2003).] IP: Logged |
DanO Administrator
|
posted January 04, 2003 05:38 PM
On looking at your code and thinking about it more, writing the results to a file could be problematic on calendars where multiple people could be searching at the same time, one overwriting the other. Not to mention the clean-up problems you stated still had to be worked out.I think the display_before_search.pl calendar script hook would be better suited and outputting the results directly to the browser a better way to go. I have some ideas on implementing that if you're interested in hearing them. Dan O. ------------------
IP: Logged |
michaelest Member
|
posted January 07, 2003 02:15 PM
Dan O., I sent you a message via email in response to the above.I'm also wrapping up some new fixes and mods to the CSXport plug in - ETA 2 days. There was a time bug (I was using local and should have used gmtime in a a sub) and I've managed to get All Occurrences of an Event to be returned as well. I'll pick up our discussion in a couple of days. Thanks, Michael ------------------ michael@estigoy.com http://www.estigoy.com/csremind IP: Logged |
DanO Administrator
|
posted January 07, 2003 05:59 PM
** I've managed to get All Occurrences of an Event to be returned as well. **Great. I look forward to seeing how you accomplished that. Dan O. ------------------
IP: Logged |
michaelest Member
|
posted January 13, 2003 05:10 PM
I'm going to be away taking care of some other business and will not be back to post for another week. Sorry for the delay on CSXport - I'll wrap it up when I return. (eta 1/21)- Michael ------------------ michael@estigoy.com http://www.estigoy.com/csremind IP: Logged |
phaseol Junior Member
|
posted July 22, 2003 03:28 PM
Curious as to the development of this plugin...we are looking for something that will allow us to grab all the events or certain events from our calendar script and put it into Outlook....------------------ Phase Of Life IP: Logged |
mgsupport Junior Member
|
posted September 08, 2003 09:34 AM
Greetings,Does anyone know what the latest verion of CSXport is? According to the link in the board it would be csxport07b . If this is not the latest version could someone provide a link to the most current version. Thanks. IP: Logged |
paulmarx Junior Member
|
posted October 24, 2003 08:37 AM
OK, it looks like mr. estigoy's stuff has basically vanished from on-line, which you will see if you try any links involving www.estigoy.com . So this plugin (or any of his other ones) are no longer available on-line unless it's archived someplace else. Anybody care to point to a site where they can be found? I have server space to host these kind of things as well.------------------
IP: Logged |
DanO Administrator
|
posted October 24, 2003 01:14 PM
** Anybody care to point to a site where they can be found? **Have you tried contacting Michael via email? Dan O. ------------------
IP: Logged |
DanO Administrator
|
posted October 24, 2003 03:22 PM
BTW. I found I had a copy of the plug-in files and have upload and linked them from the Unofficial CalendarScript - Mods and Plugins site. If Michael objects, I'll remove them.Dan O. ------------------
IP: Logged |
michaelest Member
|
posted November 12, 2003 12:58 PM
sorry bout that. I've been distracted with development of other sites and let mine almost expire. ack.My site is back up, but hey, feel free to post copies of the plug in's elsewhere. I can't promise any consistent responses, but if there are some outstanding issues, let me know and I'll try to work them in. I can't do em all, but can focus on a few. - MichaelEst ------------------ michael@estigoy.com http://www.estigoy.com/csremind IP: Logged |
DanO Administrator
|
posted November 12, 2003 01:53 PM
** feel free to post copies of the plug in's elsewhere. **I think I will... just in case. If you could just let me know (or post here) when any updates become available so I don't keep outdates files available would be great. ** distracted with development of other sites and let mine almost expire. ** You're lucky it didn't get forwarded to a porn site.  Dan O.
[This message has been edited by DanO (edited November 12, 2003).] IP: Logged |
In Japan Junior Member
|
posted January 04, 2004 03:33 AM
I have just installed the Plug-in. I have one problem that is when going to the search page I get the following message on the page : Error requiring custom function file 'D:\webs\websites\ycac.or.jp\fpdb\/calendarscript/plugins/csxport/display_after_getInput.pl'. The error is: [Can't locate D:webswebsitesycac.or.jp pdb/calendarscript/plugins/csxport/display_after_getInput.pl at (eval 1) line 1. ] Error requiring custom function file 'D:\webs\websites\ycac.or.jp\fpdb\/calendarscript/plugins/csxport/display_after_search.pl'. The error is: [Can't locate D:webswebsitesycac.or.jp pdb/calendarscript/plugins/csxport/display_after_search.pl at (eval 2) line 1. ]I guess it is because of the line 'D:\webs\websites\ycac.or.jp\fpdb\/calendarscript.... But how do I modify it ? The rest of the calendar seems to be working fine for the last three years. Thank you. ------------------
IP: Logged |
In Japan Junior Member
|
posted January 12, 2004 09:32 PM
I have resolved the path issue. Now I can register the CSEport plug-in without an error message.My problem now is that each time I enable the plug-in, my search feature times out. If I disable the plug-in, then it works again. Any idea ?? ------------------
IP: Logged |
bodie Junior Member
|
posted April 20, 2004 03:55 PM
I would love to get this working, but when I try to save any changes to the CSXport Setup Screen, I continue to get the following error:
code:
An ERROR occurred while trying to save the configuration: Error running custom function 'command_save_csxconf'. The error is: [Undefined subroutine &main::getErrorMessage called at /home/httpd/cgi-bin/webcal/calendarscript/plugins/csxport/command_save_csxconf.pl line 15. ]
I am using the .07b posted on the CalendarScript Mods and Plugins site (http://www.much2.com/calendarscript/index.html). Any suggestions? thanks in advance, ~chris p. ------------------
IP: Logged |
Toni Junior Member
|
posted May 07, 2004 01:16 PM
I got the plugin to show up in the admin screen - but the txt file turns up blank! Any ideas? perms are set to 755.------------------
IP: Logged |
jgold723 Junior Member
|
posted November 01, 2004 02:38 PM
Hey, me too! Anyone have and ideas?John
------------------
IP: Logged |
jgold723 Junior Member
|
posted November 03, 2004 11:59 AM
I figured out my problem. See this thread if you're having a similar issue: http://www.calendarscript.com/support/forum/Forum5/HTML/000290.html ------------------
IP: Logged |
afoster Junior Member
|
posted December 15, 2006 01:57 PM
I'm having the same problem as 'In Japan' and was wondering if this issue was resolved in some way. Thanks------------------
IP: Logged |