shortcodes

Wufoo Forms WordPress Embed Shortcode

I tossed this together a while ago, and it even made it in to bSuite for a time, but I don’t have a need for it anymore, and I’m cleaning house.

function shortcode_wufoo( $arg ){
 // [wufoo id=z7x4m0 domain=place.wufoo.com]

 $arg = shortcode_atts( array(
 'id' => FALSE,
 'domain' => FALSE,
 'height' => 500,
 ), $arg );

 if( !$arg['id'] || !$arg['domain'] )
 return( FALSE );

 return( str_replace( array( '%%id%%','%%domain%%','%%height%%' ), array( $arg['id'], $arg['domain'], $arg['height'] ), '<iframe height="%%height%%" allowTransparency="true" frameborder="0" scrolling="no" style="width:100%; border:none" src="https://%%domain%%/embed/%%id%%/"><a href="http://%%domain%%/forms/%%id%%/">Fill out my Wufoo form!</a></iframe>' ));
}
add_shortcode( 'wufoo', 'shortcode_wufoo' );

Download the simple plugin here: wufoo_shortcode.php. Save it as wufoo_shortcode.php, upload it to your WordPress’ wp-content/plugins/ directory, then activate it.

To use it you’ll have to have a Wufoo account and forms. Then simple put in a shortcode like this [wufoo id=z7x4m0 domain=place.wufoo.com] in one of your posts or pages. The result will look like this.

Slideshare WordPress Embed Shortcode

I’m cleaning house in [bSuite][1], and I’ve decided that this shortcode function for embedding Slideshare items in WordPress needs to go. Rather than totally toss it away, however, I’m posting it here in case somebody else finds it useful.

``` function shortcode_slideshare( $arg ){ // [slideshare id=211578&doc=misty-holland-1198496990903941-2&w=425]   $arg = shortcode_atts( array( 'id' =&gt; FALSE, ), $arg );   if( ! $arg['id'] ) return( FALSE );   return( str_replace( '%%id%%', $arg['id'], '
'

)); }   add_shortcode(‘slideshare’, array(&amp;$this, ‘shortcode_slideshare’));

      </td>
    </tr>
  </table>
</div>

 [1]: http://maisonbisson.com/bsuite/

Do WordPress Pages Better With bSuite

WordPress‘ Pages feature makes the popular blogging platform a sophisticated CMS. bSuite adds a few features to make it even better. Write excerpts, tag, and categorize your pages WordPress excerpts are an underused but powerful feature that allow you to explain to your readers why they should read the page you wrote. Tagging and categorization […] » about 300 words