Posts Tagged “Web Development”
Aptana now uses the official Eclipse PDT (PHP Development Tools) plugin instead of their own PHP editor. I have Aptana 2.0.2, build date November 10 2009 on my Macbook. I’m building a Drupal module, so I need to have PDT recognize (and correctly color-code) files with .module, .info and .install extensions. There is a Drupal Article on configuring PDT as an Eclipse Plugin, but the steps are different for doing it in Aptana Studio.
The process is quite simple – basically 3 steps. Here they are (assuming you’ve got the PDT plugin installed already):
In Aptana Studio, click on the Aptana Studio/Preferences, expand the General link and click on Content Types: 
Next, expand the Text link. This will show you a list of content types supported in the editor. Scroll down until you see the PHP entry:

You’ll see the usual PHP extensions listed in the bottom box, such as php, php3, php5. Click on the Add button to the right to add an extension needed for Drupal Module development. You’ll see a dialog like this:

Click OK. Repeat this step for *.info and *.install (assuming these extensions are not already used for some other language or tool). That’s it! Now, when you open a .module file, it will have the same color-coding and editing as a .php file.
Tags: Aptana Studio, Drupal, Eclipse Plugin, Mac, PDT, php, Web Development
2 Comments »
I’ve written a few articles in recent years that have been published by MC Press Online, relating to IBM i topics. If you don’t know what the IBM i is (or an AS/400, iSeries or System i), you can stop reading! Here are two lists of links to those articles. The first list is general education. The second is product-specific, related to products marketed by my company. (Articles are ordered by most recent first)
Educational Articles
Product-Specific Articles
Tags: AJAX, AS/400, Catapult, Clover, IBM i, iSeries, JavaScript, Nexus, php, Portal, Query, System i, Web Development, WebSmart
No Comments »
The following PHP code parses the date portion out of a MySQL date column and lets you format it according to the formatting rules of the PHP date function.
// Parse date portion of a date field and format it according to the date() function.
// Second parm is optional.
function FmtDateTime($dt, $fmt = "F d, Y")
{
$arr = explode("-", substr($dt, 0, 10));
// $fmt of "m/d/Y" prints date in mm/dd/yyyy format.
// $fmt of "F d, Y" prints date in Spelled out month day, YYYY format
echo date($fmt, mktime(0,0,0, $arr[1], $arr[2], $arr[0]));
}
To use it, you can do something like this:
<?php
FmtDateTime($scdDate, "l d F, Y" ); ?>
(This prints 2009-09-15 as “Tuesday 15 September, 2009″).
If you omit the second parameter on the function call, the date will print like this:
“September 15, 2009″
Tags: Dates, MySQL, php, Web Development
No Comments »
Feedback is a jQuery plugin that lets you send feedback to a user in the form of an info message or error message, associated with any page element. It uses the jQuery UI plugin to determine the default styles of the info and error messages, but you can also use your own styles. Complete details, including demo, documentation and downloads are on this page.
Tags: JavaScript, jQuery, jQuery plugin, jQuery UI, plugin, Web Development
No Comments »
How to restrict access to specific content in a Drupal site so only authenticated users (those who have logged in) can view and access it. (Short answer – install the ‘content-access’ plugin.)…
Tags: Content Management, Drupal, Drupal modules, Site protection, Web Development
10 Comments »
Firebug – debug your applications. An absolute must. Best features:
- Debugger – step through, over, etc.
- Console log for monitoring AJAX interactions -shows parms sent, data returned, round-trip time.
Web Developer – fantastic CSS diagnostic support. Best features:
- View generated source – important if your script modifies the original DOM of your page
- Display Element Information – shows all the properties of an element in a convenient popup. To use, press Ctrl+Shift+F or select menu Information/Display Element Information
- Edit CSS – lets you edit the CSS selectors in real-time, and shows you the results – almost as you type
MeasureIt. Lets you find the height and width of any element or area of the page, in pixels. Helps diagnose CSS issues, for example, when you use combinations of margin, width, padding and border attributes.
Codeburner from Sitepoint, one of my favorite online journals (www.sitepoint.com). Integrates with Firebug to provide comprehensive cross-reference information on HTML and CSS. Best feature:
- Browser compatibility tables
Tags: CSS, FireFox, JavaScript, jQuery, Web Development
1 Comment »
Summary: Quirks of checkbox markup in HTML – differences between IE and FireFox…
Tags: Browser differences, HTML, JavaScript, Web Development
No Comments »
Posted by fbloggs in CSS, HTML
Tables do not conform to the normal CSS box model as W3C explains .
A consequence of this is that you cannot use the margin property for cells or rows. Citing the above page: “Internal table elements generate rectangular boxes with content and borders. Cells have padding as well. Internal table elements do not have margins. (my emphasis). So, something like this:
tr.spaceme { margin-top:15px; }
does nothing.
I wanted to have a table with a ‘heading’ row followed by details, another heading row, more details, etc. So the solution is to style an empty row using the padding and/or border properties. Suppose we want to have 15 pixels of white space between the top of the next heading row. Here’s some example markup:
CSS:
<style>
tr.gap {padding: 15px; }
</style>
HTML:
<table>
<tr class="gap"><td colspan="2"> </td></tr>
<tr><td>Customer: 1</td><td>Name: Acme</td></tr>
<tr><td>Order: foo1</td><td> Item: bar1 </td></tr>
<tr><td>Order: foo2</td><td> Item: bar2 </td></tr>
<tr class="gap"><td colspan="2"> </td></tr>
<tr><td>Customer: 1</td><td>Name: Bolts Inc.</td></tr>
<tr><td>Order: foo3</td><td> Item: bar3 </td></tr>
<tr><td>Order: foo4</td><td> Item: bar4 </td></tr>
</table>
I don’t really like this, because it requires an unnecessary table row for each heading. My example requires a colspan, too, as I suspect in most cases tables like these will have more than one column for the headings and/or details. Anyway, I’m posting this to remind myself of this quirk in the CSS box model, as I’m bound to forget it next time I have to render tables like this.
Tags: CSS, HTML, Web Development
No Comments »
FireFox doesn’t have a native global event handler. Here’s how to create one using FireFox’s event-capturing model.
Tags: Browser differences, FireFox, IE, JavaScript, Web Development
4 Comments »
Firebug beta 1.0 is now available. This is by far the best toolbar available for FireFox or IE for debugging web applications. See This blog entry at Sitepoint for more details. A few of the features I really like are:
- The debugger – identifies exact line of script in error.
- The HTML view – lets you view contents of externally linked Javascript files, also.
- The CSS inspector – shows you all ancestor css rules for elements, not just the current CSS rule, so you can see the total effect of the cascade.
- The ability to change CSS settings on the fly. For example, hover over a color, click on it, then change the RGB value to see another color – it does this for the specific area on the page, as well as in the sheet.
Tags: FireFox, JavaScript, Web Development
2 Comments »
|