From: Matthew M. <ma...@tu...> - 2006-12-04 18:39:41
|
Verdon, Thank you for that fix! I have committed it to CVS. It will be included with the next core release. Matt On Sun, 2006-12-03 at 22:06 -0500, Verdon Vaillancourt wrote: > Hi :) > > A couple early observations while writing a mod for the new version. > Matt, if you're reading and would like me to put these in a tracker, > I will. Let me know where. > > First, I'm having fun! I also appreciate the documentation that has > already been done. It has really helped getting going. > > 1) Location of settings.php in docs/Settings_Class.txt is wrong, > still says to put settings.php in /mod/mymod/conf and it should say / > mod/mymod/inc > > > 2) It would be nice if there was a way to have /core/class/Form.php > prepend a required indicator to a field label. Maybe something like > '<span class="error">*</span> ' could be prepended to a field > label if the label was called like... > > $form->setLabel('email', _('Contact E-mail'), $required) or... > > $form->setLabel('email', _('Contact E-mail')) > $form->setRequired('email') > > ... at first I tried just adding it to my label string, not realizing > the basic label value also gets added as a var to the actual field. Doh! > > > 3) The DHTML Calendar js_calendar, as it currently is, cannot be used > on a page that has more than one form, unless your form happens to be > the first one on the page. It took me a while to figure out why I > couldn't get this to work (couldn't see the forest for the trees) but > the fix seems simple enough. What I outline below works fine for me. > I don't know if it would cause problems min browsers that I don't > have, but I don't think so... > > i) Add... > > if (!isset($data['form_name'])) { > $data['form_name'] = '0'; > } else { > $data['form_name'] = $data['form_name']; > } > > ...near the top of /javascript/js_calendar/default.php > > > ii) Then in body.js, and body2.js in /javascript/js_calendar/ change > all instances of forms[0] to forms['{form_name}'] > > > iii) Now a mod developer can send > > $js_vars['form_name'] = 'my_form_name'; > $js_vars['date_name'] = 'my_date'; > $js_vars['type'] = 'text'; > $template['PICK_CAL'] = javascript('js_calendar', $js_vars); > > > 4) Now I have to figure out the best way to work with image uploads. > > Cheers, > verdon > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers -- Matthew McNaney Electronic Student Services Appalachian State University http://phpwebsite.appstate.edu |