my phpWebSite Hacks

I am starting a document on my phpWebSite hacks. I have two hacks to put in it right now, mailto hack and the explicit label hack for Bobby/508 approval.

my phpWebSiteHacks

It bugged me since I installed phpWebSite that it did not pass the 508 validators such as Bobby. They would flag the username and password box as not having an explicit label. To use an explicit label you have to find the code that dynamically creates the form input statement and modify it to include a “id=” parameter. Once the input statement includes the “id=” parameter you can add a label statement with a “for=” parameter that links to the input statement in the template, loginBox.tpl. Finding the code to change took some work although once I started using Jedit’s Hypersearch the job went faster. Some of the form input statements used by phpWebSite are created in EZelement.php and some are created in Form.php. I changed them in both places since I found the EZelement code first. The input statements for the login and password are in the formTextField and formPassword functions in Form.php. I set the id field to the same value as the $name. Then I changed the loginBox.tpl template in the mod-Users-templates-forms directory to add the two label statements referencing the id fields. Now Bobby says I am cool.

When I installed the Mailto module, it did not work. For some unknown reason I ended up at the Create Event screen when I tried to add a mailing address. After some debugging I finally figured out a fix that works for me. I suspect it will work without problems for everyone. The mailto module allows people to send email to you without having to post an email address on the website. Although sometimes I think I am already on all of spam mailing lists I still would like to avoid any more increases in spam from automated webcrawlers. The fix was simple. It appears that two templates had an error in it. The generated html did not have a at the end of two different forms in edit.tpl and mail.tpl. I made a SWAG that two templates needed a to generate the proper code. It worked and I am happy even though I do not know why the default theme worked. My customized themes would bring up a Create Event form. I posted my fix on sourceforge so hopefully others can check it out.