Recently, I needed to insert an IFRAME into a post. I could just insert the IFRAME code into the post, but the Tiny MCE editor chewed it up and occasionally would blow up. Looking for a WP Plugin that handles IFRAME’s, I came across John Godley’s PageView plugin. I like how it’s written and presented, but I wanted it take all the IFRAME parameters and not always have a header. So I modified the following files:
[pageview src=”//www.msnbc.msn.com/id/22425001/vp/23601329#23601329″ frameborder=”0″ height=”339″ scrolling=”no” width=”100%”]
Done via my modifications:
[ pageview src="//www.msnbc.msn.com/id/22425001/vp/23601329#23601329" frameborder="0" height="339" scrolling="no" width="100%" ]If “src=” is in the plugin string, my modification will make an assumption that the entire string is the IFRAME parameters. As I don’t do any error checking, this could be potentially dangerous but it suits my needs.
[pageview http://www.msnbc.msn.com/id/22425001/vp/23601329#23601329 “Keith Oberman” Special Comment]
Done via original 3 parameters:
[ pageview http://www.msnbc.msn.com/id/22425001/vp/23601329#23601329 "Keith Oberman" Special Comment ]This will use any defaults in the CSS file and in the case of the MSNBC IFRAME doesn’t work too good. This isn’t a deficiency of the plugin, it’s a good plugin doing exactly what it’s supposed to do. On top of that, the Code is well written and easy to read which made it easy for me to find the exact spot to modify for my needs.
Music I’m listening to right Now:
“Big Bang Baby” by Stone Temple Pilots from the “Tiny Music…Songs From The Vatican Gift Shop” Album.
13 responses to “Modifying PageView Plugin for my needs”