Forums

WP-Tabbity
A little tweak for stability ... (2 posts)

  1. stare
    Member
    Posted 5 months ago #

    I like this Plugin, it is lightweigt and simple but there is a little problem with generating the ID's (bulid out of title for the tab).

    I changed the following in the wp-tabbity.php to generate valid ID's:

    ...
    class WPTabbity {
    var $tabset = array();
    var $tab_count = 0;
    ...

    ...
    function tab($atts, $content) {
    $this->tab_count++;
    extract(shortcode_atts(array(
    'title' => 'Tab-' . $this->tab_count,
    'id' => 'tabs-' . $this->tab_count,
    'class' => $this->class,
    'order' => $this->order
    ), $atts));
    $this->addTab($title, $id, $class, $order, $content);
    // return 'No, you are not crazy.';
    }
    ...

    Also the CSS file is a little heavy and could be shortened like:

    /* Tabs
    ----------------------------------*/
    .ui-tabs { padding: 0; zoom: 1; }
    .ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: 1px 0; }
    .ui-tabs .ui-tabs-nav li { position: relative; float: left; border-width: 0 !important; margin: 0 4px -1px 0 !important; padding: 0 !important; background-color:#e9e8e0; list-style:none !important;line-height:24px !important}
    .ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: 4px 10px !important; color:#24697A !important;line-height:24px !important}
    .ui-tabs .ui-tabs-nav li.ui-tabs-selected { border-width: 0 !important; ;height:36px;}
    .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; color:#FFF !important; background-color:#24697A;}
    .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; }
    .ui-tabs .ui-tabs-panel { padding: 10px 0; display: block; border-width: 0; background: none; }
    .ui-tabs .ui-tabs-hide { display: none !important; }

    ul.ui-tabs,ul.ui-tabs-nav{margin:0 !important;height:32px;background:#e9e8e0;font-size:13px;font-family:Arial, Helvetica, sans-serif;font-weight:normal;line-height:24px !important
    }

    http://wordpress.org/extend/plugins/wp-tabbity/

  2. Tom Belknap
    Member
    Posted 4 months ago #

    Stare,

    Thanks for the suggestion on the code. Think I will end up doing something like this.

    As for the CSS: that's jQuery's lovely mess of a CSS structure. Good that you can condense it, but I don't bother because I'd rather the simplest option (users going to the Themeroller and rolling their own) be the most convenient.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags