Home · Links · Contact Us
Home arrow Forums
Home
Features
FAQ
Screen Shots
Modules
Themes
Demos
Documentation
Forums
Contact Us
Download
Purchase
Quotes

" ... I want to tell you that your thyme product is functional and valuable beyond words. I cannot imagine why any portal would be without it. It is the cornerstone of our new project ..."

" ... Thanks for such a complete project, its making my job much easier. ..."

" ... I have now deployed 4 different calendars and our users love them ... "

" ... Easy to install and use and a great look/design. ..."

" ... This has to be the easiest to use program I think I've had to deal with at all this year. ..."


  FAQFAQ    SearchSearch  RegisterRegister   Log inLog in 
Adding Search box and category menu?

 
Post new topic   Reply to topic     Forum Index -> Web site integration
View previous topic :: View next topic  
Author Message
adawson



Joined: 02 Jun 2008
Posts: 85

PostPosted: Fri Jun 13, 2008 8:38 am    Post subject: Adding Search box and category menu? Reply with quote

In the standard, untweaked calendar, the sidenav offers a search box and the ability to select events by category. How can I add this functionality to an embedded calendar?
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5275

PostPosted: Fri Jun 13, 2008 4:31 pm    Post subject: Reply with quote

Adding a search box and code for a search is going to get complicated. With all that you want to do, you may want to consider customizing a theme and index.php rather than trying to re-write everything into another PHP page. Would that be a viable solution for you?
Back to top
View user's profile Send private message Visit poster's website
adawson



Joined: 02 Jun 2008
Posts: 85

PostPosted: Fri Jun 13, 2008 7:58 pm    Post subject: Reply with quote

It's not out of the question, but there will still be some things that need to be customized. And at this point I'm almost done with the calendar except for a couple of functions such as this.

A search box would be a good function to have but not a necessary one. On the other hand, adding the select category is necessary. I've been able to create it in Joomla Studio, but I'm not having any luck using the Joomla generated code. I assume whatever is preventing me from previewing in Joomla or viewing using direct URLS is also causing havoc with the code it generates. And my timeline is such that I can't troubleshoot Joomla when I can get the same result with Calendar publisher, some tweaking and Dreamweaver.
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5275

PostPosted: Mon Jun 16, 2008 4:12 pm    Post subject: Reply with quote

Anywhere in your page after the $cal object is created and $cal->set("calendar", ...); is called, you should be able to do something like this:

Code:


if($_REQUEST['category']) $cal->set("category", $_REQUEST['category']);

require_once(constant("_CAL_BASE_PATH_") ."include/classes/class.form.php");

# CREATE FORM OBJECT
##########################
$_cal_form = new _cal_form();

# SET FORM DEFAULTS
######################
$_cal_form->defaults['category'] = $cal->event_types;

echo($_cal_form->select('category', $cal->get_categories(),
   "onChange=\'this.form.submit()\'"));

$_cal_form->print_footer();
Back to top
View user's profile Send private message Visit poster's website
adawson



Joined: 02 Jun 2008
Posts: 85

PostPosted: Tue Jun 17, 2008 5:39 pm    Post subject: Reply with quote

This does add a drop down box with the categories, but it doesn't work. Selecting one doesn't change anything.
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5275

PostPosted: Tue Jun 17, 2008 5:49 pm    Post subject: Reply with quote

Hi,

Make sure that this:

[cdoe]
if($_REQUEST['category']) $cal->set("category", $_REQUEST['category']);
[/code]

is before any line containing $cal->display_...().

Let me know if this doesn't resolve it.
Back to top
View user's profile Send private message Visit poster's website
adawson



Joined: 02 Jun 2008
Posts: 85

PostPosted: Tue Jun 17, 2008 6:23 pm    Post subject: Reply with quote

I did both this:
Code:
 
<?php
if($_REQUEST['category']) $cal->set("category", $_REQUEST['category']);

?>
<?php
$cal->display_month();

?>

and this:
Code:
 
<?php
if($_REQUEST['category']) $cal->set("category", $_REQUEST['category']);
$cal->display_month();
?>


Neither is working
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5275

PostPosted: Tue Jun 17, 2008 6:50 pm    Post subject: Reply with quote

Sorry. Change this line:

Code:
echo($_cal_form->select('category', $cal->get_categories(),
   "onChange=\'this.form.submit()\'"));


... to this ...

Code:
echo($_cal_form->select('category', $cal->get_categories(),
   "onChange='this.form.submit()'"));
Back to top
View user's profile Send private message Visit poster's website
adawson



Joined: 02 Jun 2008
Posts: 85

PostPosted: Fri Jun 20, 2008 7:45 pm    Post subject: Reply with quote

Nope. Still nothing. Just the dropdown.
Back to top
View user's profile Send private message
adawson



Joined: 02 Jun 2008
Posts: 85

PostPosted: Sun Jun 22, 2008 4:26 am    Post subject: Reply with quote

esoft_ian wrote:
Adding a search box and code for a search is going to get complicated. With all that you want to do, you may want to consider customizing a theme and index.php rather than trying to re-write everything into another PHP page. Would that be a viable solution for you?


If I went with this option, how could I get the events to display in my customized event view rather than in default one?
Back to top
View user's profile Send private message
adawson



Joined: 02 Jun 2008
Posts: 85

PostPosted: Sun Jun 22, 2008 10:40 pm    Post subject: Reply with quote

Nevermind. I've been able to do this.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Web site integration All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
© 2005 eXtrovert software unless otherwise noted. All rights reserved.
Portions © 2004 Ben Brown. All rights reserved.
Trademarks are property of their respective owners.