Results 1 to 7 of 7

Thread: Wordpress blog - sidebar.php problem

  1. #1
    elishevadpw's Avatar
    elishevadpw is offline Net Builder
    Join Date
    Dec 2008
    Location
    under the equator
    Posts
    120
    Thanks
    40
    Thanked 45 Times in 17 Posts

    Wordpress blog - sidebar.php problem

    Hi,

    I'm currently working on The Santos Republic.

    When you scroll down in the homepage, there is this black tab saying "Open BottomBar With More Features". According to the template demo, if you click on this tab, you should see the widgets or the sidebar.php page if there is no widgets active. But on the my blog, this doesn't work.

    The demo template is here http://news.wp-newsmag.se

    I've copied and pasted the sidebar.php code here, maybe this can help.

    PHP Code:
    <center>
    <div id="toggle">
    <a id="opena" href="javascript:void(0);" >Open BottomBar With More Features</a>
    <a id="closea" aref="javascript:void(0);" style="display:none;">Close This BottomBar</a> 
    </div>
    <div id="togglebottom"></div>
    </center>
    <div id="sidebar" style="display:none;">

    <h3>BottomBar <font color="#b1b1b1">Stuff</font></h3>

    <div class="sbox">
    <?php if ( function_exists('dynamic_sidebar'
    && 
    dynamic_sidebar('leftsidebar') ) : else : ?>
    <h3>Latest Updates</h3>
    <ul>
      <?php query_posts('showposts=5'); while (have_posts()) : the_post(); ?>
        <li>
          <a href="<?php the_permalink() ?>" rel="bookmark"><?php $shorttitle substr(the_title('','',FALSE),0,25); ?><?php echo $shorttitle; if (strlen($shorttitle) >24){ echo '&hellip;'; } ?></a>
        </li>
      <?php endwhile; ?>
      </ul>
    <?php endif; ?>
    </div>

    <div class="sbox">
    <?php if ( function_exists('dynamic_sidebar')
    && 
    dynamic_sidebar('middleleftsidebar') ) : else : ?>
    <h3>Latest Comments</h3>
                    <?php
                        
    global $wpdb;
                        
    $sql "SELECT DISTINCT ID, post_title, post_password, comment_ID,
                        comment_post_ID, comment_author, comment_date_gmt, comment_approved,
                        comment_type,comment_author_url,
                        SUBSTRING(comment_content,1,25) AS com_excerpt
                        FROM 
    $wpdb->comments
                        LEFT OUTER JOIN 
    $wpdb->posts ON ($wpdb->comments.comment_post_ID =
                        
    $wpdb->posts.ID)
                        WHERE comment_approved = '1' AND comment_type = '' AND
                        post_password = ''
                        ORDER BY comment_date_gmt DESC
                        LIMIT 10"
    ;
                        
    $comments $wpdb->get_results($sql);
                        
    $output $pre_HTML;
                        
    $output .= "\n<ul>";
                        foreach (
    $comments as $comment) {
                        
    $output .= "\n<li>"
                        
    "<a href=\"" get_permalink($comment->ID) .
                        
    "#comment-" $comment->comment_ID "\" title=\"on " .
                        
    $comment->post_title "\">" strip_tags($comment->com_excerpt)
                        .
    " ...</a></li>";
                        }
                        
    $output .= "\n</ul>";
                        
    $output .= $post_HTML;
                        echo 
    $output;?>
    <?php 
    endif; ?>
    </div>

    <div class="sbox">
    <?php if ( function_exists('dynamic_sidebar')
    && 
    dynamic_sidebar('middlerightsidebar') ) : else : ?>
    <h3>Random Useful Links</h3>
    <ul>
    <?php wp_get_linksbyname('Blogroll','orderby=rand&before=<li>&after=</li>&limit=5'?>
    </ul>
    <?php endif; ?>
    </div>

    <div class="sbox slast">
    <?php if ( function_exists('dynamic_sidebar')
    && 
    dynamic_sidebar('rightsidebar') ) : else : ?>
    <h3>Most Popular Tags</h3>
    <?php wp_tag_cloud('format=list&smallest=10&largest=10&number=5&orderby=count'); ?>
    <?php 
    endif; ?>
    </div>


    </div><!--End of Sidebar-->
    <div style="clear: both;"></div>

  2. #2
    Shenron's Avatar
    Shenron is offline Administrator
    Join Date
    Dec 2008
    Location
    Portugal
    Posts
    1,900
    Blog Entries
    2
    Thanks
    561
    Thanked 548 Times in 368 Posts
    Code:
    <a id="closea" aref="javascript:void(0);" style="display:none;">Close This BottomBar</a>
    What's aref?

    Also, I see that "Click for More Featured Articles" isn't working either.

    Have you uploaded the JS folder of the template?
    What version of WP are you using? From your login page I'd say 2.6+, but wanted to be sure. - Nevermind I see 2.7

    EDIT

    Try adding this to your header.php, right above your css import
    Code:
    <style type="text/css">.recentcomments a{display:inline !important;padding: 0 !important;margin: 0 !important;}</style>

  3. #3
    elishevadpw's Avatar
    elishevadpw is offline Net Builder
    Join Date
    Dec 2008
    Location
    under the equator
    Posts
    120
    Thanks
    40
    Thanked 45 Times in 17 Posts
    I don't know what aref is. Should it be probably "ahref"? I think it is "href" cause I checked it in the original template file.

    Yes I uploaded the JS folder.

    I copied and pasted the code you gave me right above the css import. But it's still not working.

  4. #4
    Mr.Bill's Avatar
    Mr.Bill is offline One is glad to be of service
    Join Date
    Dec 2008
    Location
    Redmond, Oregon
    Posts
    828
    Blog Entries
    1
    Thanks
    72
    Thanked 350 Times in 182 Posts
    You are missing this file in your javascript folder dropdown.js

    that one line should be

    Code:
    <a id="closea" href="javascript:void(0);" style="display:none;">Close This BottomBar</a>

    Reverse IP Check ಠ_ಠ Proxy Sites
    <?php if ($youask == 'stupid question') { echo ('stupid answer'); } ?>

  5. #5
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts
    Quote Originally Posted by elishevadpw View Post
    I don't know what aref is. Should it be probably "ahref"? I think it is "href" cause I checked it in the original template file.
    You can see the correct syntax here: HTML HREF - HTML Code Tutorial
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  6. #6
    elishevadpw's Avatar
    elishevadpw is offline Net Builder
    Join Date
    Dec 2008
    Location
    under the equator
    Posts
    120
    Thanks
    40
    Thanked 45 Times in 17 Posts
    Quote Originally Posted by Mr.Bill View Post
    You are missing this file in your javascript folder dropdown.js

    that one line should be

    Code:
    <a id="closea" href="javascript:void(0);" style="display:none;">Close This BottomBar</a>
    Where am I supposed to add this? here is the code in dropdowns.js

    HTML Code:
    <!--//--><![CDATA[//><!--
    
    sfHover = function() {
        var sfEls = document.getElementById("nav").getElementsByTagName("LI");
        for (var i=0; i<sfEls.length; i++) {
            sfEls[i].onmouseover=function() {
                this.className+=" sfhover";
            }
            sfEls[i].onmouseout=function() {
                this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
            }
        }
    }
    if (window.attachEvent) window.attachEvent("onload", sfHover);
    
    //--><!]]>

  7. #7
    dtkguy's Avatar
    dtkguy is offline Still Learnin'
    Join Date
    Dec 2008
    Posts
    391
    Thanks
    7
    Thanked 164 Times in 108 Posts
    no you don't add that to the dropdown js. that is the separate line from before that had aref in it, Mr.Bill was just showing the correct line.

    your problem is the dropdowns.js , there should be no 's' on it. it should be just dropdown.js

    so either rename dropdowns.js to dropdown.js OR change the line in your theme that references dropdown.js to dropdowns.js

    Quote Originally Posted by elishevadpw View Post
    Where am I supposed to add this? here is the code in dropdowns.js

Similar Threads

  1. [WTS] blog post and sidebar link
    By dailyearner in forum Links
    Replies: 0
    Last Post: 7 July, 2010, 11:57 AM
  2. Wordpress Automatic Upgrade Problem
    By Pathan in forum Wordpress
    Replies: 9
    Last Post: 13 September, 2009, 08:39 AM
  3. Replies: 3
    Last Post: 18 August, 2009, 13:55 PM
  4. [WTH] Style Sidebar Widgets For Wordpress $25
    By Sundance in forum Contests
    Replies: 3
    Last Post: 15 June, 2009, 02:12 AM
  5. WordPress number of posts problem
    By Aquarezz in forum Wordpress
    Replies: 2
    Last Post: 30 May, 2009, 13:45 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •