Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunityCustomizationHacks and Mods (Moderators: scott, DanO, Marty)advanced searching capability
Pages: 1 2 [3] 4   Go Down
Print
Author Topic: advanced searching capability  (Read 2704 times)
0 Members and 1 Guest are viewing this topic.
tw1000
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #30 on: January 20, 2003, 04:28:00 PM »

The links to the Grid view and List view do not work properly from the search page.

The link from List is:
calendar.pl?view=Search&calendar=default&style=List

The Link fron Grid is:

/calendar.pl?style=Grid&selected_datestring=20030120&calendar=default&view=Search&datestring=20030120&style=Grid

Is there a way to have the Grid view link take the user back to the default grid you or to the previous grid?  

------------------

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #31 on: January 20, 2003, 09:21:00 PM »

** The links to the Grid view and List view do not work properly from the search page. **

As there is only one view available for the search results, those links don't have much to do. It works the same on the demo calendar from te search view.

I have no idea why each of those links have different length URLs on your calendar. On my calendar they're both exactly the same except the &style=List or &style=Grid at the end.

Here are examples of mine after using a Search Link:

calendar.pl?calendar=move&view=Search&duration=14&style=Grid
calendar.pl?calendar=move&view=Search&duration=14&style=List

Here are examples after a regular search:

calendar.pl?duration=14&end_year=2003&start_date=20&fromTemplate=&start_month=1&end_date=22&calendar=move&view=Search&end_month=1&start_year=2003&style=Grid

calendar.pl?duration=14&end_year=2003&start_date=20&fromTemplate=&start_month=1&end_date=22&calendar=move&view=Search&end_month=1&start_year=2003&style=List

Are you sure you looked at them from the same screen and not one before a search and one after? Or more likely, one from before a search and one after moving to the search view page from viewing the Day view of 20030120?

** Is there a way to have the Grid view link take the user back to the default grid **

Sure if you want to code the page that way. But unless you use some if/else statements, it will work the same from all the calendar views.

** or to the previous grid? **

You mean the calendar view they were at before moving to the Search View in the first place? Doubtful, or at least I can't think of an easy way to accomplish it. It wouldn't be done through the plug-in.

Dan O.

------------------

Logged
tw1000
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #32 on: January 20, 2003, 10:49:00 PM »

Thanks, It is not a critical issue and I can live with it , but anything I can do to reduce potential questions from a public user will save me work in the long run.

------------------

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #33 on: January 21, 2003, 01:23:00 PM »

** anything I can do to reduce potential questions from a public user will save me work **

You can remove those options altogether on the search view by editing the default.html template file and putting their code inside an if $view eq "search" (or "Search", I forget which) conditional.

Dan O.

------------------

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #34 on: January 21, 2003, 07:03:00 PM »

** I'll see if I can find if anything in that WYSIWYG hack could effect the Search Link plug-in. **

I don't see anything in that hack that should effect the Search Link plug-in.
It looks like the script is not processing the Search Link's display_before_search.pl
file and I have no idea why that would be.

I have had that happen with other plug-in files but that was caused by an error in the
script (which could include it being uploaded incorrectly). It works on my system
so I'm fairly sure an error in the coding isn't causing it.

I don't know what else to suggest. Sorry.

What are you using to upload that plug-in's files? Maybe you could try uploading the zip
file in binary mode and unzipping it on the server?

Dan O.

[This message has been edited by DanO (edited January 21, 2003).]

Logged
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #35 on: January 27, 2003, 05:44:00 AM »

where would be a good place to start looking at in my code to resolve this?  thanks

------------------

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #36 on: January 28, 2003, 01:30:00 PM »

** where would be a good place to start **

What are you using to upload that plug-in's files? Maybe you could try uploading the zip file in binary mode and unzipping it on the server?

Dan O.

------------------

Logged
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #37 on: January 29, 2003, 05:24:00 AM »

i am using my same FTP prog that i use for everything.  I have tried in both ascii and binary just to test it.  How would i unzip the zip file from the server?

But here is the code for the Search View section in default.html...im not sure if this code matters at all, but i am pretty lost.


<textarea name="ta" cols="50" rows="25"><% } elsif ($VIEW eq "Search") { %><font size="1"> </font></font>
         <FORM NAME="mainform" ACTION="<%= $CGI_URL %>" METHOD="POST">
         <font size="1" face="Verdana">
         <INPUT TYPE="hidden" NAME="QUERY_STRING" VALUE="<%=$QUERY_STRING%>">
         <INPUT TYPE="hidden" NAME="fromTemplate" VALUE="<%=$thisTemplate%>">
         <INPUT TYPE="hidden" NAME="command" VALUE="search">
         <INPUT TYPE="hidden" NAME="view" VALUE="Search">
         </font>
         <TABLE BORDER="0">
         <% if ($userMessage ne "") { %><font face="Verdana" size="1"> </font>
         <TR>
            <TD></TD>
            <TD ALIGN="left" VALIGN="top">
            <FONT COLOR="red">
            <%= $userMessage %><font face="Verdana" size="1"> </font>
            </FONT>
            </TD>
         </TR>
         <% } %><font size="1">
         <%
         $fieldnames = &main: BGetSearchFields($db);
         foreach $field (@$fieldnames) {
         %> </font>
         <TR>
            <TD ALIGN="RIGHT"><SPAN CLASS="text"><B><%= $db->{'properties'}->{$field}->{'name'} | | $field %><font face="Verdana" size="1">
               </font><font face="Verdana" size="1">: </font> </B></SPAN>
               </TD>
            <TD><%= &main::GetSearchFieldInput($db->{'properties'}->{$field},$field,$search_params) %></TD>
         </TR>
         <% } %><font size="1"> </font>
         <TR>
            <TD ALIGN="RIGHT"><font face="Verdana" size="2"><SPAN CLASS="text"><B>
               Between:</B></SPAN></font><span class="text"><b><font face="Verdana" size="2"><br>
               And:</font></b></span><font face="Verdana" size="2"><SPAN CLASS="text"><B> </B></SPAN>
               </font></TD>
            <TD>
            <p align="left">
            <font size="1" face="Verdana">
            <SELECT NAME="start_month" style="font-family: Verdana; font-size: 10pt"><%= &HTML::monthNameOptions($in{start_month} | | $TODAY_MONTH) %></SELECT>
            <SELECT NAME="start_date" style="font-family: Verdana; font-size: 10pt"><%= &HTML::dateOptions($in{start_date} | | $TODAY_DATE) %></SELECT>
            <SELECT NAME="start_year" style="font-family: Verdana; font-size: 10pt"><%= &HTML::yearOptions($in{start_year} | | $TODAY_YEAR) %></SELECT><br>
            <SELECT NAME="end_month" style="font-family: Verdana; font-size: 10pt"><%= &HTML::monthNameOptions($in{end_month} | | $TODAY_MONTH) %></SELECT>
            <SELECT NAME="end_date" style="font-family: Verdana; font-size: 10pt"><%= &HTML::dateOptions($in{end_date} | | $TODAY_DATE) %></SELECT>
            <SELECT NAME="end_year" style="font-family: Verdana; font-size: 10pt"><%= &HTML::yearOptions($in{end_year} | | ($TODAY_YEAR+1)) %></SELECT>
               </font>
               </TD>
         </TR>
         <TR>
            <TD ALIGN="CENTER" COLSPAN="2">
            <font face="Verdana">
            <font size="1">
            <INPUT CLASS="button" TYPE="submit" VALUE="Search"> </font>
            </TD>
         </TR>
         <% IF SEARCH RESULT %><font size="1"> </font>
         <TR>
            <TD COLSPAN="2" ALIGN="center">
            <SPAN CLASS="text">
            <font face="Verdana" size="1">
            <u><B>Search Results</B></u><BR>
            <% IF SEARCH RESULTS EXIST %>
            No Matches
            <% ELSE %> </font>
<% @$SEARCH_RESULTS = sort {$a->{schedule}->{start} <=> $b->{schedule}->{start} } @$SEARCH_RESULTS; %>
            <TABLE BORDER="1" CELLPADDING="5" CELLSPACING="0" width="100%" style="border-collapse: collapse">
               <TR>
                  <TH><font face="Verdana" size="1"><SPAN CLASS="text">Date</SPAN></font></TH>
                  <TH><font face="Verdana" size="1"><SPAN CLASS="text">Title</SPAN></font></TH>
                  <TH><font face="Verdana" size="1"><SPAN CLASS="text">Description</SPAN></TH>
                  <TH><SPAN CLASS="text"><font face="Verdana" size="1">Location</font></TH>
                  <TH><SPAN CLASS="text"><font face="Verdana" size="1">Price</font></TH>
                  <TH><SPAN CLASS="text"><font face="Verdana" size="1">Time</font></TH>
               </TR>
               <% FOREACH SEARCH RESULT %><font size="1"> </font>
               <TR>
                  <TD valign="top">
                     <SPAN CLASS="text">
                     <% IF NEXT OCCURRENCE EXISTS %><font face="Verdana" size="2">
                     <%=$MONTH_NAMES->[$EVENT->{schedule}->{nextoccurrence}->{month}-1]%>
                           </font> <%=$EVENT->{schedule}->{nextoccurrence}->{date}%><font face="Verdana" size="2">, <%=$EVENT->{schedule}->{nextoccurrence}->{year}%>
                     <% ELSE %>
                     None
                     <% /IF %> </font>
                     </SPAN>
                      </TD>
                  <TD valign="top"><font face="Verdana" size="1"><A HREF="<%=$CGI_URL_QUERYSTRING%>view=Event&event_id=<%= EVENT FIELD(id) %>&datestring=<%=$DAY->{datestring}%>" STYLE="text-decoration:underline;" CLASS="text"><%= EVENT FIELD(title) %></A></font></TD>
                  <TD valign="top"><font face="Verdana" size="1"><SPAN CLASS="text"><%= EVENT FIELD(description) %></SPAN></font></TD>
                  <TD valign="top"><font face="Verdana" size="1"><SPAN CLASS="text"><%= EVENT FIELD(location) %></SPAN></font></TD>
                  <TD valign="top"><font face="Verdana" size="1"><SPAN CLASS="text"><%= EVENT FIELD(price) %></SPAN></font></TD>
                  <TD valign="top"><font face="Verdana" size="1"><SPAN CLASS="text"><%= &Date::formatTime($EVENT->{schedule}->{start_time}, $Config->get("time_format")); %></SPAN></font></TD>
               </TR>
               <% /FOREACH %><font size="1"> </font>
            </TABLE>
            <% /IF %><font size="1"> </font>
            </SPAN>
            </TD>
         </TR>
         <% /IF %><font size="1"> </font>
         </TABLE>
         </FORM>

      <% } %><font size="1"> </font></textarea>

------------------

Logged
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #38 on: January 29, 2003, 05:25:00 AM »

well that worked horribly...it was supposed to be a text area...i didnt notice that it said HTML is OFF until after...sorry.
ryan

------------------

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #39 on: January 29, 2003, 09:07:00 PM »

** How would i unzip the zip file from the server? **

You require shell access. If you don't have it you'd have to ask your host's support if they will do it for you.

** im not sure if this code matters at all **

No it doesn't. The code that would be important if it had an error or were corrupted would be the
display_before_search.pl from the plugin. And posting its code here would not likely help to determine if it
was corrupted or not.

Dan O.

------------------

[This message has been edited by DanO (edited January 29, 2003).]

Logged
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #40 on: January 30, 2003, 02:31:00 AM »

so what code would need to be looked at that would actually call on that script?  or maybe i just dont understand the logic behind it.  Anyway, after all the different ways i have uplaoded it, and unzipped it, im certain there is underlying problem.  Let me know what you think.

Thanks again
Ryan

------------------

Logged
bwolfsohn
New Member
*

Karma: 0
Offline Offline

Posts: 0

consultant


WWW
« Reply #41 on: January 31, 2003, 03:04:00 PM »

Dan,

Thanks for all your help to date.. I've gotten the add onclick event plug-in working.. and the inconsistencies in display seem to have cleard up..

When i try to enable the searchlink plug-in, i'm getting these results:

Error requiring custom function file 'C:\Inetpub\wwwroot\cgi-bin\calendarscript\/calendarscript/plugins/SearchLink/display_before_search.pl'. The error is: [Can't locate C:Inetpubwwwrooti-binlendarscript/calendarscript/plugins/SearchLink/display_before_search.pl at (eval 1) line 1. ]
Search query must not be blank!

(the strange characters are actually in teh error message on my browser)

When i disable the plugin, then i just get:
Search query must not be blank!

Any ideas ??


------------------


[This message has been edited by bwolfsohn (edited January 31, 2003).]

[This message has been edited by bwolfsohn (edited January 31, 2003).]

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #42 on: January 31, 2003, 06:59:00 PM »

** so what code would need to be looked at that would actually call on that script? **

calendar.pl calls that script with the line:
unless(&handleCustomFunction("display_before_search")) {

Hence the plug-in file's name display_before_search.pl

If there were an error in the display_before_search.pl code the script would stop executing it and just move on to exectute the calendar.pl code after
unless(&handleCustomFunction("display_before_search")) {

** im certain there is underlying problem. **

Well you could change that file's name to a .txt extension and post a link to it here. I'll try to look at it to see if I can see anything wrong.

I uploaded a text version of that script to my site. You can try saving it, changing the extension to .pl and uploading it in ascii mode to that plug-in's directory to see if it helps.

http://www.much2.com/calendarscript/display_before_search.txt

Dan O.

[This message has been edited by DanO (edited January 31, 2003).]

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #43 on: January 31, 2003, 07:08:00 PM »

** I've gotten the add onclick event plug-in working.. and the inconsistencies in display seem to have cleard up. **

What inconsistencies are you referring to?

** The error is: [Can't locate C:Inetpubwwwrooti-binlendarscript/calendarscript/plugins/SearchLink/display_before_search.pl at (eval 1) line 1. ]
Search query must not be blank!

(the strange characters are actually in teh error message on my browser) **

Strange characters can be caused by uploading files in binary instead of ascii. It looks like the script is looking in the wrong place for the file because of those strange characters.

I can't think of what else would cause that.

Dan O.

------------------

Logged
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #44 on: January 31, 2003, 09:35:00 PM »

ok...here is the path to my display_before_search.pl as a txt file:
http://www.darkvisionsmedia.com/display_before_search.txt

here is also the path i have been using to test if its working...:
http://www.darkvisionsmedia.com/cgi-bin/calendar/calendar.pl?view=Search&command=search&duration=365&FIELD_description=beneath+the+ashes

so where is the display_before_search.pl script that is referenced in calendar.pl before the plugin is installed?  Or is the code that references that in calendar.pl added when the plugin is installed?  And if there is a different display_before_search.pl, other than the one that comes with the plug-in, could that be what is giving me the blank page after running the searchlink URL format through it?

thanks
ryan

------------------

Logged
Pages: 1 2 [3] 4   Go Up
Print
Jump to: