Posts tagged Wordpress

Amazon CloudFront Streaming In WordPress With JW Media Player

11

I'm writing this post because a simple search on how to achieve CloudFront video streaming in wordpress using the jw media player plugin returns all kinds of results which are irrelevant if you just want to serve basic cloudfront streams!

So, here's how to do it (assuming you already know how to setup cloudfront to stream a video):

  1. Install the latest version of the JW Player Plugin (Plugins -> Add New -> Search for "JW Player Plugin for WordPress")
  2. Activate the plugin, you'll notice that a new menu called "JW Player" appears in your admin area
  3. Click on JW Player, you'll get a list of the players which currently exist (each player being a different customisation of the default JW Media Player)
  4.  Click the copy button next to the out-of-the-box player to create a new player you can customise. Rember to give the new player a meaningful name instead of the default "out-of-the-box_copy". In my case I'm going to call this player "Test"
  5.  Edit any of the player settings you like to create your new player (but don't click save - yet - if you do just click the edit button next to your new custom player to re-open the interface)
  6. Click the Advanced Settings tab of the player editor, scroll down the page until you see the streaming section and enter "rtmp" (without the quotes) in the provider box and the url to your clodfront streamer in the streamer box. e.g. if I setup a streaming distribution with the cname "videos.coderchris.com" my streamer url would be "rtmp://videos.coderchris.com:1935/cfx/st" that said you could just use the cloudfront default url for your distribution e.g. "hjh4887yh7h7.cloudfront.net" which would have the this streamer url: "rtmp://hjh4887yh7h7.cloudfront.net:1935/cfx/st"
  7. Now JW player knows where to stream your video files from you need to embed them in the page, which is best done using the jwplayer shorcode. So assuming I uploaded a video called "My Test File.mp4" to the S3 bucket feeding the cloudfront distribution and have set it's permissions to be public then I should be able to enter the following shortcode into a post or page "[jwplayer config="Test" file="My Test File.mp4"]" and that's it!
Notes:





Dodgy WordPress Plugins and Themes

4

Recently I have been doing a LOT of research into various wordpress themes and plugins and as you may expect the code varies from the excellent to the dire, but in most cases each achieves what it is supposed to.

That said however I have been seeing an increasing number of dodgy/spammy plugins which would probably cause more harm than good to the blogs of people who blindly install them.

These plugins or themes generally suggest they are doing one thing, but are actually doing another, such as building networks of spam links or sending valuable infomration to third parties... not good!

Though I could name and shame these dodgy items here I don't really wish to suffer the wrath of the scum of the internet, so all I'll offer is a plain and simple warning:

BE CAREFUL ABOUT THE PLUGINS YOU INSTALL AND THE THEMES YOU USE

Check them out, make sure they're fit for purpose, if you don't have enough knowledge yourself to understand what the plugin is doing ask someone who does.

Let's face it, at the worst you could expose yourself to having all important server details sent to a third-party and at the least you may end up with a blog covered in spam content getting you blocked by the major search engines.  

A very simple example of a check anyone can perform is to look through the plugin/theme code and look for url's or email addresses that are not anything to do with you or the plugin/theme.

This simple check alone can help protect you against unwanted and potentially harmful disguised code.





Getting WordPress To Ping Google Blog Search

1

I noticed today that my blog wasn't included in Google blog search, so I set out to find out why.

The reason was google didn't know about it, so I added it to my list of update notification services as this blogcarta post explains how to do: http://www.blogcarta.com/2006/10/17/how-to-ping-google-blog-search/

Oddly enough, though I know what pinging is, how it works, etc. I'd not really thought about/researched wordpress pinging to any great extent, and found out that I was missing a lot!

Firstly, I have a feed burner account (http://www.feedburner.com) and can automate a massive amount of the pinging from there so I turned all that on (see the PingShot option under the Publicize tab).

Secondly this got me thinking about what may be missed as feedburner wasn't pinging them, so I turned to the codex list of ping service (which oddly enough I had been to a number of times before but never used): http://codex.wordpress.org/Update_Services and I added all of these to my list too.

Next I saw the Smart Update Pinger on the codex and downloaded and installed that - It basically improves the pinging wordpress does by default by only pinging services when a new post is published and logging the responses.

And then I started looking at all the other posts that existed about pinging services and who should be pinged when and how. And as I'm tired my head started swimming.

So ultimately, what's needed here? Yes, you've guessed it, another improved plugin.

I shall be writing my own plugin to improve the pinging functionality in wordpress. It will be based on previous work, namely Smart Update Pinger but improve the existing functionality of that by including the following features:

  1. Central list of sites to ping automatically updated via webservice, so you're always on top of the game (would be so nice if this wasn't necessary, but hey ho!)
  2. Re-ping feature to notify ping services that are temporarily down about your post once they're back up
  3. Centralized logging to determine when a service goes off-line for extended periods of time or for good

All of the options will be turned on/off-able for users concerned about privacy.

If the guys who write Smart Update Pinger want to add this functionality in themselves, then fine, please go ahead but please let me know first. otherwise I'll be coding this up in a few days time.

If you want to be informed when the first release of my pinging plugin is made then either subscribe to my feed or leave me a comment





Advanced Syntax-Hilighting Online Code Editors – A WordPress IDE?

1

When I write plugins for wordpress I like to do it on a test blog in a live environment.

Maybe not the best idea, but it's how I like to do it, and it also flags up any weird and wonderful restrictions to the development of the plugin as a result of my hosting company's security policy.

For a while now I've worked with just the plain old plugin editor that comes with wordpress, but this is cumbersome to say the least and as such I went looking for a syntax highlighting editor which I could (if necessary) convert into a plugin to (ironically enough) improve the plugin editor.

Turns out that there's quite a few good syntax highlighting online code editors available (list at the end of this post) and at least one neat one (CodePress)  has been converted to a wordpress plugin for theme editing and plugin editing.

This is a really great start, but there's a couple of things I'd really like to see to progress this work - If I have the time I'll do it myself, otherwise someone else reading this post may like to take it up!

Basically the current Codepress for wordpress plugin is missing (in my opinion) a few additional functions to create backups of the plugin or theme files you're working on, to an extent a rudimentary versioning system could and should be implemented within the editor.

There should be an option to package up the plugin you're editing and release it to the community/tie updates into the automatic plugin updater of 2.5

The current CodePress release is great but what would make it even greater would be code hinting when editing.

I don't know enough JavaScript to say whether or not this is possible but it would be cool for the editor to notice that you've just typed or started to type a PHP (or other language) function name, and provide you with a syntax hint for the function.

This would work (in my mind) by noticing the opening of ( and then checking what preceded it back to the last space or operator (*, ., /, etc.), then looking up this string from a function definition array and displaying a tooltip near where you are editing in the text area to remind you of the syntax - possibly with an autocomplete if you press enter.

I think the main problem with this is knowing where you are in the text area to display the div with the tool tip text in it in the right place. I know you can monitor where you are in a text area in terms of columns and rows, so surely if you know the location of the start of the text area and the size of the character in the text area and the co-ordinates of the cursor in the text area via row/column values you should be able to determine the optimal position for the <div>?

I think it would be really great to see that kind of functionality in any of the online code editors listed below on it's own let alone any other stuff such as versioning that I've already mentioned.

So there it is!

I probably will end up doing some work on the codepress plugin myself from a versioning point of view, but if any one else out there can figure out a way of doing the code hinting in JS that'd be fantastic!

Existing On line Code Editors:

Autosuggest example (could be used to provide the tool tip if the positioning is worked out): http://gadgetopia.com/post/3773

WordPress plugins:

All of A Twitter

0

Recently I've been playing about with Twitter and so have some of the other guys at work.

Twitter's great but but along with the blogs, facebook, myspace, MSN and whatever else there'd be sooo many places I'd have to update my status.

In reality, the only place I even half regularly keep my status updated is in my MSN IM client, so I got to thinking, what if I could use MSN to update twitter and then use twitter to update my blogs (and possibly everything else - I haven't tried everything else yet though I have to admit).

Well after a short amount of time I found a very nice script for Messenger PluPlus! Live (http://www.msgpluslive.net/) called Twit4Live (http://www.msgpluslive.net/scripts/view/315-Twit4Live/) which allowed me to update twitter from MSN as I wanted to.

Then I found the Twitter Tag WordPress plugin for my blog (http://www.waltervos.com/downloads/wordpress-plugins/twitter-tag/), a winning combination - if only it worked...

To be fair, Twitter Tag will work on a large number of blogs, but because it has to do a remote file include (which a lot of shared hosting companies turn off for good reason), it didn't work on mine.

A short time later though I fixed this and everything's hunky dory (so long as you have Linux based hosting).

So if you want to update your blog with your twitter status and the original Twitter Tag plugin doesn't work, why not give this modified version a try instead :)

Go to Top