• Resolved masdeweb

    (@masdeweb)


    Hi,
    first thanks for porting twitter bootstrap to WordPress, I was looking for a collection of shorcodes to use on my sites and your plugin is just what I wanted.

    I would like to suggest you to enable the possibility to use the fluid lauoyt when using the row shortcode.

    I’m a PHP programmer, though I’m no expert on WordPress, checking the row function at hlt-bootstrap-shortcodes.php file (and without having investigated further) I think it would be easy to enable the fluid layout of the twitter bootstrap framework.

    Here is a suggestion:

    public function row( $inaAtts = array(), $insContent = '' ) {
    
    	    $this->def( &$inaAtts, 'type' );
    	    $sContType = !empty($inaAtts['type']) ? '-'.$inaAtts['type'] : '';
    
    		$sReturn = '<div class="container'.$sContType.'">	<div class="row'.$sContType.'">';
    		$sReturn .= $this->doShortcode( $insContent );
    		$sReturn .= '</div></div>';
    
    		return $sReturn;
    	}//row

    I’ve checked and it works, it correctly adds the postfix “-fluid” when you write a shorcode like this [TBS_ROW type=”fluid”]

    Why fluid?, you might ask, well the normal container has a 940px fixed with, so it can not be used if you have a sidebar. With a fluid container inherits the with of its parent container, and the row-fluid is a 100% width. All this let you create, for example, two span6 columns inside a container less than 940px width.

    I hope you find this suggestion useful.

    Best regards

    http://wordpress.org/extend/plugins/wordpress-bootstrap-css/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Paul

    (@paultgoodchild)

    Hi,

    Great suggestion. Actually there are quite a number of improvements left to the be made to the shortcodes we have implemented. I hope to include these with the next release and I’ll definitely put this to the top of the list.

    Thanks for the suggestion, and we’re delighted to hear that this plugin has proved so useful for you and your WordPress sites!

    Cheers for the feedback!
    Paul.

    Plugin Author Paul

    (@paultgoodchild)

    Hi,

    I’ve implemented the fluid option and also changed the function a bit to allow you to decide whether to create a new container or not.

    Basically it will default to yes, so existing behaviour remains unchanged.

    There are new options to the TBS_ROW shortcode:

    container=y or n (default is y)
    fluid=y or n (default is n)

    style, id, class for the row.
    cstyle, cid, cclass – these are style, id and class for the container.

    I haven’t released the plugin update final yet, because I’ve made a few other changes to this release which you can read about in the readme.txt file.

    If you want to try it out, and perhaps let me know what you think of if you have problems, please feel free. I’ll probably release the update later in the week.

    As always, you can download the latest version from here:
    http://downloads.wordpress.org/plugin/wordpress-bootstrap-css.zip

    Thread Starter masdeweb

    (@masdeweb)

    Hi,
    great job, much more flexible now.

    Only a comment, maybe the default behaviour for the container should be no, because the container is only needed to set the layout, I mean when you want nested columns you don’t need a new container, you just need a container once, so most of the time you’ll have to set container to no.

    Check:
    http://twitter.github.com/bootstrap/scaffolding.html#layouts
    to see what I mean.

    Best

    Plugin Author Paul

    (@paultgoodchild)

    Hey,

    Yea, that’s a fair point. I only defaulted it to yes on this implementation to maintain compatibility with the old way I’d coded it (badly) 😉

    Okay, I’ll update it to reflect your suggestion. Thanks for the tip!

    Cheers,
    Paul.

    Plugin Author Paul

    (@paultgoodchild)

    I’ve checked this in now, so you can grab the trunk version as before.

    We’re a bit busy here at the moment so I haven’t released this plugin as a new update because I haven’t done the necessary testing to ensure it’s viable, so for now, best to use the trunk version as I don’t know when I’ll release the update.

    Cheers, and thanks again for the feedback.
    Paul.

    Plugin Author Paul

    (@paultgoodchild)

    okay, I’ve just released v2.0.4 for the Twitter Bootstrap update… this also includes the changes discussed here.

    P.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘[Plugin: WordPress Twitter Bootstrap CSS] Fluid Layout activation’ is closed to new replies.