Home · Links · Contact Us
Home arrow Forums
Home
Features
FAQ
Screen Shots
Modules
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 
Jooomla Studio Drop Down Widget for Custom Fields

 
Post new topic   Reply to topic     Forum Index -> Joomla / Mambo Integration
View previous topic :: View next topic  
Author Message
stevebab



Joined: 07 Apr 2008
Posts: 14

PostPosted: Wed May 14, 2008 6:19 am    Post subject: Jooomla Studio Drop Down Widget for Custom Fields Reply with quote

Hi,

I would like to add two drop-down selectors for sorting by two custom event fields /i've added via event_edit_tpl.php (the fields are "act" and "rate").

I think I could do it if I could tweak the following code generated by Joomla Studio for the category sort widget. I'm just not sure how to do it.

Anyone know what to do?


Code:


# SET FORM DEFAULTS
######################
if($_cur_cal->has_subcals) {
   $_cal_form->defaults["vcat"] = $_REQUEST["vcat"];
} else {
   $_cal_form->defaults[$cal->listeners['cat']] = $cal->event_types;
}


# PRINT SELECT BOX
####################

if($_cur_cal->has_subcals) {

   # get categories
   $_cal_tmp3 = $_cal_sql->query("select distinct name, name
        from {$_cal_dbpref}EventTypes where calendar
        ". $_cur_cal->get_constraint(), true);
   uasort($_cal_tmp3, "strnatcasecmp");

   $_cal_tmp3 = array( "" => _ALL_) +  $_cal_tmp3;

   echo($_cal_form->select("vcat", $_cal_tmp3,
      "onChange='document.forms[\"". $_cal_form->name ."\"].submit()' "));

} else {

   echo($_cal_form->select($cal->listeners['cat'], $cal->get_categories(),
      "onChange='document.forms[\"". $_cal_form->name ."\"].submit()' "));

}

?>
[/code]
Back to top
View user's profile Send private message
stevebab



Joined: 07 Apr 2008
Posts: 14

PostPosted: Fri Aug 08, 2008 2:08 am    Post subject: Can anyone please help me with this? Reply with quote

ICan anyone please give me a pointer?

Quote:

I would like to add two drop-down selectors for sorting by two custom event fields /i've added via event_edit_tpl.php (the fields are "act" and "rate").

I think I could do it if I could tweak the following code generated by Joomla Studio for the category sort widget. I'm just not sure how to do it.

Anyone know what to do?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Joomla / Mambo 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.