Error message
Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /home1/tylerfra/public_html/includes/common.inc).
javascript
I've been working on my first Angular JS module, with the hopes I can share it with the community. Before doing that, I need to finish its implementation, and now that I've been playing around with Angular for a few weeks (and having a ton of prior JavaScript development experience), I could blast through this module's implementation very quickly.
When compiling an app to your phone over USB using the PhoneGap (Cordova) Command Line Interface (CLI), it can be handy to view the JavaScript console.log(). Run this terminal command after your app is running in debug mode:
adb logcat
That will get you lots and lots of debug information. Chances are that's too much to handle, and you'll want to filter it. Go ahead and stop logcat, and try this command instead:
adb shell logcat | grep 'Web Console'
Sometimes a prerequisite to getting a burrito for lunch involves using Drupal URL arguments in Javascript. So for example, say you had a URL like this:
http://www.tylerfrankenstein.com/chicken/burrito/combo
You can add code like this to your module:
function my_module_init () {
drupal_add_js(array('arg' => arg()),'setting');
}
And finally you can use code like this in Javascript to use the Drupal URL arguments:
Robot: "What time is it JavaScript, buddy? And when you answer, it better be in the format of 'YYYY-MM-DD HH:MM:SS' in 24 hour format with preceeding zeros on the month, day, hour, minute and second, or else!"
Me: "Relax big guy, just call this function, friend."
So today Internet Explorer again decided to be totally awesome...
I have a simple javascript regular expression that extracts the Drupal 'page' variable from a link that was clicked:
<a href="/code?page=1" id="tf_example_link">next page</a>
$('a#tf_example_link').click(function () {
var page = /[\?&]+page=([0-9]+)[\?&]?/($(this).attr('href'));
alert(page); // alert output: 1
});
This works in all browsers, except....... drum roll.............. Internet Explorer! Surprised? Probably not.