Recently in php Category

I'm reading up on Zend Db Table as part of getting to better know the technologies we've adopted at Delta Systems Group and have found that now as of Zend Framework 1.9 you no longer "have to extend a base class and configure it to do simple operations such as selecting, inserting, updating and deleteing on a single table".

That's welcome news from the last time I took a look at Zend (circa release 1.4ish). Zend has really grown since then and it's quickly become an exciting platform for PHP developers such as myself.

I forked the JRFeedbackProvider project on github yesterday and made two commits that have already been pulled and merged into the main branch. They're small, one adds a regular expression check on the email address sent in the php file to check it's format as a valid email address, the other adjusts the NSTextView's NSTextStorage to remove the bold font when using showFeedbackWithBugDetails: to pre-populate the textview with bug details.

JRFeedbackProvider is a 'nonviral cocoa source for implementing an application feedback panel' . In short, it provides your users a standardized in-app method of providing feedback, from bug reports to to feature and support requests. The two main approaches are to use the default details pane, which asks basic questions for each category separated into three tabs/panes, and another option which allows the developer to pre-fil the bug report pane with details supplied from within the app.

The second patch I committed dealt with the latter feature. In the default showFeedback method, the textview was pre-filled with some basic questions in bold; "what happened, what did you expect" etc. The showFeedbackWithBugDetails route was essentially a blank text area by default with the exception of whatever the developer chose to fill it with by supplying an NSString, but this always resulted in the supplied text being in bold like the pre-filled bug report. I initially figured out that if you called [textView setString:@""]; it would 'fix' this and the following text would be a normal font weight, but I stumbled across this thread on cocoadev that sent me in another direction. So I went back and updated the method to first grab the font in use by the textStorage's (which was bold) and creating the same font using the NSFont's familyName method, but without the bold, like so:

NSFont *resetFontWeight = [[textView textStorage] font];
//  Font name: Helvetica-Bold   
//  Font Family Name: Helvetica
[[textView textStorage] setFont:  
    [NSFont fontWithName:[resetFontWeight familyName]  
    size:[resetFontWeight pointSize]]];
[textView setString:details];  
[resetFontWeight release];

This effectively resets the font, losing the bold.

JRFeedbackProvider

I've taken a big interest in JRFeedbackProvider, already with two (albeit small) patches ready and I filed a new bug on the latest update. JRFeedbackProvider is a add-on to your cocoa app that will let the user easily submit feedback to you, be it a bug, feature request or support request, and all you need to do is copy the files and make a menu item connection, and use the provided php script on your server (or write your own in your language of choice).

This project has given me a great chance to get in to contributing to open source projects, it's scope is reasonable and there seems to be room for development that I can take swings at. I'd like to start a Zend project to act as a collector of these feedback reports, not as a bug tracker, but as a bug/feature/support filtering system. A place that collects reports from the wild and the developer can then make decisions to discard, reply to, or push over any issue to their bug tracker of choice.

Open Source Projects

I'm looking to get more involved with open source projects, both Cocoa and PHP/Zend. I'm currently a contributor to the Canary twitter client and looking to give back to JRFeedbackProvider after I integrate it into my app.

I also have some code I want to share: I've got a category for CALayer to find a sublayer by name, and a category to MGTwitterEngine to allow for image upload, adding the missing updateprofileimage API call. Hope to put those on github soon.

Stackoverflow

About this Archive

This page is an archive of recent entries in the php category.

Open Source is the previous category.

python is the next category.

Find recent content on the main index or look in the archives to find all content.