• Resolved AutomatedKid

    (@automatedkid)


    i have the YD WPMU Bloglist Widget plugin installed and working on my setup, however i am not a programmer, spent way too many hours trying to figure it out, the thread at the plugin is non-existent, so i was wondering if someone who had a few minutes can help to get to my final destination.

    here’s what i have to so far…

    1. i’m able to get the bloglist menu to show on my site
    2. i was able to add some css to the stylesheet to change the color

    what i’m not able to figure out is the following..

    1. i can’t get a scroll on the drop down list – it’s going to be a long list, i would like to limit it to showing, maybe, 10 items then user needs to scroll and select one
    2. i can’t figure out how to force the menu to ‘center’ on the page
    3. eliminate ie from destroying the menu (tested on ie 8 and under)

    below is the flow to where i am at right now.

      code from the plugin that creates the drop down menu
    /** Display drop-down menu **/
    function yd_wpmu_bloglist_dropdown( $echo = TRUE, $params = NULL ) {
        $html = '';
        if( $echo && $echo !== TRUE && $params === NULL ) {
            // shift parameters
            $params = $echo;
            $echo = TRUE;
        }
    
        $dd = preg_replace( '/<a href=/', '<option value=', yd_list_all_wpmu_blogs( $params ) );
        //$dd = preg_replace( '/title="[^"]*"/', '', $dd );
        $dd = preg_replace( '|</a>|', '</option>', $dd );
        $html .= $dd;
        if( isset( $echo ) && $echo !== FALSE ) {
            echo $html;
        } else {
            return $html;
        }
    }
    
    /** Javascript for drop-down **/
    function yd_wpmubl_dropdown_js() {
        ?>
        <script>function ddjump(o){document.location=o.options[o.selectedIndex].value;}</script>
        <?php
    }
    
    /** Display inside content **/
    function yd_wpmubl_generate( $content ) {
        if (strpos($content, "[!YDWPMUBL]") !== FALSE) {
            $content = preg_replace('/<p>\s*\[!(.*)\]\s*<\/p>/i', "[!$1]", $content);
            $content = str_replace('[!YDWPMUBL]', yd_display_wpmu_bloglist( FALSE ), $content);
        }
        return $content;
    }
    add_filter('the_content', 'yd_wpmubl_generate');
      here is the code to place the drop down in the template
    <?php yd_wpmubl_dropdown_js(); ?>
    <select name="select" id="select" class="dropdown" onChange="ddjump(this);">
        <option selected="selected"><?php _e('Network Shortcuts - Select a Site:'); ?></option>
        <?php yd_wpmu_bloglist_dropdown( 'show_count=0' ); ?>
    </select>
      and this is basic info i added to the style.css, less the various things i added to get the scroll, autoscroll, etc, etc
    .dropdown  {
    background:#7FFF00;
    border:1px solid #48758d;
    border-width:0 1px 1px 1px;
    padding:0;
    list-style:none;
    }

    so, again, the issues i’m having r the following:
    1. i need the drop down to scroll since the blog list may get long
    2. the menu needs to be ‘center’ on the page
    3. i just tested last night in various browsers, ie 8 and under (haven’t tested 9 yet) its destroying the java used and showing the menu completely outside of the drop down as text only w/ no hyperlinks (it looks bad!)

    i looked, read, and read some more, but since it looks like the author used a php to html setup to show the drop down (not sure, that’s what i think it is) i couldn’t find any reasonable comparisons to understand the logic and alter it so it would work for me.

    lastly, if u took the time to read this, respond, i’ll already thank you since i want to learn as much as i can, it’s just this one is really putting me back a few steps and it’s frustrating to say the least.

    thanks

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘any php / java / css guru out there??’ is closed to new replies.