- add the PHP Bin folder to the PATH. ie: C:\wamp\bin\php\php5.3.13
- edit the php.ini file in the PHP folder to uncomment the extension=php_curl.dll line.
- also edit the php.ini file in Apache's /bin folder to uncomment the same line.
andr01d.dev
Monday, August 20, 2012
MODx: enabling cURL in WAMP on Win 7 64bit
MODx requires that cURL be running, and to enable it on a Win 7 64bit platform:
Friday, August 17, 2012
air: injecting jQuery
After you load a web page into an HTML component you may want to select, modify, add and remove DOM elements in reponse to events within the AIR application and/or gather data from the web page for use in the AIR app. jQuery ( http://jquery.com/ ) is a robust and feature filled JavaScript library which provides methods which can make it much easier to select and modify DOM elements, however not every web page includes this library and you may not have the option to modify the web page manually to add the jQuery library before loading it into your AIR application.
To work around this you can inject the library after the page has loaded, and then make calls to it's methods from within the AIR application. First you need to load the jQuery libary as a String. You can do this either from an online resource or from a copy of the JavaScript file on the hard drive, for example if you have included it as an asset within the application directory of the AIR app.
Here's an example of loading jQuery from a remote source:
And here's an example which loads jQuery from a JavaScript file saved as an asset in the application directory:
NOTE : To use these examples you will need to replace the dummy website URL and dummy class with real ones. They were developed in Flash Builder 4.5 but should be adaptable to Flex 3. This solution was inspired by an article by Brandon Martinez: http://www.brandonmartinez.com/2011/04/23/inject-jquery-onto-any-site/.
To work around this you can inject the library after the page has loaded, and then make calls to it's methods from within the AIR application. First you need to load the jQuery libary as a String. You can do this either from an online resource or from a copy of the JavaScript file on the hard drive, for example if you have included it as an asset within the application directory of the AIR app.
Here's an example of loading jQuery from a remote source:
And here's an example which loads jQuery from a JavaScript file saved as an asset in the application directory:
NOTE : To use these examples you will need to replace the dummy website URL and dummy class with real ones. They were developed in Flash Builder 4.5 but should be adaptable to Flex 3. This solution was inspired by an article by Brandon Martinez: http://www.brandonmartinez.com/2011/04/23/inject-jquery-onto-any-site/.
Friday, August 10, 2012
email dev tips
This post will be one that gets edited frequently for a while. It's going to be my repository - and your's as well if you find it useful - of tips, tricks, work-arounds, kludges, etc. for HTML email development.
Doctype, <html>, <meta> and <title> boilerplate:
Notes: Set to 'xhtml1-strict' as this is what GMail automatically uses so we'll have better results if we restrict out HTML development to it.. with a few exceptions.
Using meta tags to set the 'content type' doesn't really have any effect, as clients use the content type that is set in the email's header by the email server. Best bet is to replace any special characters with the HTML entity.
The 'format-detection' meta tag turns off iOS devices automatically detecting phone numbers and turning them into URLs. This is preferable as it will keep the text in the desired style, rather than turning it bright blue with an underline. iOS will also do this with 'dates' and with 'postal addresses', but there is no meta tag to switch off this feature. Instead you must turn them into a non-functional link:
<body>
Should not have any styles applied to it directly, as styles on this tag are technically not allowed in xhtml1-strict, they are ignored by some clients and other clients remove this tag all together. Use embedded CSS (see below) to apply styles to the <body>.
CSS
Other than this use Inline CSS, no External Stylesheets. You can develop and email using Internal Styles and then run it through http://premailer.dialect.ca/ to convert them to Inline. Copy any Embedded CSS to the bottom of the email as well, inserting it before the </body> tag so that Yahoo in IE7/IE8 will pick them up.
Avoid using CSS shorthand.
CSS support of email clients that we support:
* iOS devices will auto-resize copy to a minimum size of 13px. To stop this:
** Outlook may not support; add 'mso-line-height-rule:exactly' before 'line-height'. For Outlook '07 the line-height must be no smaller than the font-size, or the text will not render at all!
*** Hotmail doesn't support 'margin' or 'margin-top'
**** Outlook '07/'10 doesn't support padding in <p> or <div>
Use web safe fonts.
If there is copy in the email layout which does not use web safe fonts, it will have to be displayed in the email using image files or require a design revision.
Is there a web-safe Helvetica Neue CSS font-family stack?
JavaScript
No.
Use tables for layout, not styled divs or spans. Usually you'll want to set the padding, spacing and borders of the table to zero and collapse the borders of the table and it's td.
Doctype, <html>, <meta> and <title> boilerplate:
Notes: Set to 'xhtml1-strict' as this is what GMail automatically uses so we'll have better results if we restrict out HTML development to it.. with a few exceptions.
Using meta tags to set the 'content type' doesn't really have any effect, as clients use the content type that is set in the email's header by the email server. Best bet is to replace any special characters with the HTML entity.
The 'format-detection' meta tag turns off iOS devices automatically detecting phone numbers and turning them into URLs. This is preferable as it will keep the text in the desired style, rather than turning it bright blue with an underline. iOS will also do this with 'dates' and with 'postal addresses', but there is no meta tag to switch off this feature. Instead you must turn them into a non-functional link:
<body>
Should not have any styles applied to it directly, as styles on this tag are technically not allowed in xhtml1-strict, they are ignored by some clients and other clients remove this tag all together. Use embedded CSS (see below) to apply styles to the <body>.
CSS
Other than this use Inline CSS, no External Stylesheets. You can develop and email using Internal Styles and then run it through http://premailer.dialect.ca/ to convert them to Inline. Copy any Embedded CSS to the bottom of the email as well, inserting it before the </body> tag so that Yahoo in IE7/IE8 will pick them up.
Avoid using CSS shorthand.
CSS support of email clients that we support:
Text & Fonts | font font-family font-style font-variant font-size* font-weight letter-spacing line-height** text-align text-decoration text-indent text-transform |
Color & Background | color background-color HSL Colors (CSS3) |
Box Model | border margin*** padding**** width**** |
Tables | border-collapse table-layout |
* iOS devices will auto-resize copy to a minimum size of 13px. To stop this:
** Outlook may not support; add 'mso-line-height-rule:exactly' before 'line-height'. For Outlook '07 the line-height must be no smaller than the font-size, or the text will not render at all!
*** Hotmail doesn't support 'margin' or 'margin-top'
**** Outlook '07/'10 doesn't support padding in <p> or <div>
Use web safe fonts.
If there is copy in the email layout which does not use web safe fonts, it will have to be displayed in the email using image files or require a design revision.
Is there a web-safe Helvetica Neue CSS font-family stack?
JavaScript
No.
Use tables for layout, not styled divs or spans. Usually you'll want to set the padding, spacing and borders of the table to zero and collapse the borders of the table and it's td.