TinyMCE in WordPress Plugins
January 12th, 2010 |
WordPress |
Cam |
No comments
I’ve been to the edge of the internet and back, before I found this tidbit of code that will allow you to use TinyMCE in your WordPress plugins!
1. Add the following code to your plugin
add_filter('admin_head','myplugin_tinymce'); function myplugin_tinymce() { wp_admin_css('thickbox'); wp_print_scripts('jquery-ui-core'); wp_print_scripts('jquery-ui-tabs'); wp_print_scripts('post'); wp_print_scripts('editor'); add_thickbox(); wp_print_scripts('media-upload'); if (function_exists('wp_tiny_mce')) { wp_tiny_mce(); } }
2. Call the editor in your plugin
the_editor($content_to_load);
str_replace() function
May 22nd, 2009 |
ActionScript 3.0 Snippets |
Cam |
No comments
function str_replace(search, replace, string) { while(string.indexOf(search) != -1) { var array = string.split(search); string = array.join(replace); } return string; } // Example var str = 'testing\r\nthis'; trace(str); var newString = str; newString = str_replace("\r", '', newString); newString = str_replace("\n", ' ', newString); trace(newString);
Saving a MovieClip as an Image
May 5th, 2009 |
ActionScript 3.0 Tutorials |
Cam |
No comments
Here’s a SWEET tutorial on how to save any MovieClip (DisplayObject) as a jpg or png
[view tutorial]
Brightkite
May 3rd, 2009 |
Musings |
Cam |
No comments
I found this really cool social networking site sort of like twitter accept you send a picture via cell phone to the service and it tags where you are based on geocodes in the picture. You can write a little message (like twitter) explaining where you are and what you’re doing.
Check it out: http://www.brightkite.com
Read More...Flash Game Framework 0.0.2
April 25th, 2009 |
News |
Cam |
No comments
I Started working on a new Flash game framework about a month ago and hopefully I’ll have a chance to actually use it soon
Read More...