WordPress.org

Ready to get started?Download WordPress

Forums

Gallery - sidebar (20 posts)

  1. ZerBox
    Member
    Posted 8 years ago #

    I have "installed" this(http://www.lazyboy.dk/wordpress/?page_id=14) gallery at my site:
    http://www.roisland.net/skilpadder/lazy-index.php

    My problem is that the sidebar does not show at the right position as on the main site:
    http://www.roisland.net/skilpadder/

    Can someone help me fint the solution?

  2. VaamYob
    Member
    Posted 8 years ago #

    Your issue seems to be with the divs that are created by the lazy-index.php not matching the structure (divs and css classes) that your theme uses.

    What I did to take care of the issue is to edit the lazy-index.php and make sure it generated a div structure (including class attributes) that EXACTLY matched my theme.

    The effect being a seamless match with my theme, but those same steps would have to be redone whenever I changed themes.

    See it in action here:

    http://www.xyooj.com/blog/lazy-index.php?file=micasa/

  3. ZerBox
    Member
    Posted 8 years ago #

    Hm, the index for my theme is like this:
    <?php
    get_header();
    ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="entry">
    <!--
    <h2 class="entrydate"><?php the_date() ?></h2>
    -->
    <h3 class="entrytitle" id="post-<?php the_ID(); ?>">
    " rel="bookmark"><?php the_title(); ?>
    </h3>
    <div class="entrybody">
    <div class="entrymeta">
    Posted by <?php the_author() ?> on <?php the_time('F dS Y') ?> to <?php the_category(',') ?>
    </div>
    <?php the_content(__('(more...)')); ?>
    <p class="comments_link">
    <?php
    $comments_img_link = '<img src="' . get_stylesheet_directory_uri() . '/images/comments.gif" title="comments" alt="*" />';
    comments_popup_link('No Comments', $comments_img_link . ' 1 Comment', $comments_img_link . ' % Comments');
    ?>

    </div>
    <!--
    <?php trackback_rdf(); ?>
    -->
    </div>

    <?php comments_template(); // Get wp-comments.php template ?>

    <?php endwhile; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    <?php endif; ?>

    <?php posts_nav_link(' — ', __('« Previous Page'), __('Next Page »')); ?>
    </div>
    </div><!-- The main content column ends -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Gallery-index is like this:
    <?php
    /* Don't remove this line. */
    require('./wp-blog-header.php');
    ?>

    <?php get_header(); ?>

    <link href="./wp-content/plugins/lazy-gallery/lazy-style.css" rel="stylesheet" type="text/css">

    <div id="content" class="narrowcolumn">
    <div id="gallery"> <br/>
    <br/>
    <?php showGallery();?>
    </div>
    </div>
    <!-- The main content column ends -->
    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

    ----------------------

    Can someone help me edit the lazy-index.php as written in the first reply to my post?

  4. VaamYob
    Member
    Posted 8 years ago #

    What does your theme's index.php look like ?

    Oops, never mind.

  5. ZerBox
    Member
    Posted 8 years ago #

    Hm, the code was publised wrong. The right version of the code is written here:
    http://www.roisland.net/skilpadder/indexer.txt

  6. VaamYob
    Member
    Posted 8 years ago #

    Something that looks fishy is that the theme's index.php has two </div> end tags that don't have corresponding <div> begin tags.

    Edit: I followed the link, forget about the above comment.

    Anyway, try this:

    <?php
    /* Don't remove this line. */
    require('./wp-blog-header.php');
    ?>
    <?php get_header(); ?>
    <link href="./wp-content/plugins/lazy-gallery/lazy-style.css" rel="stylesheet" type="text/css">
    <div id="content" class="entry narrowcolumn">
    <div id="gallery" class="entrybody"> <br/>
    <br/>
    <?php showGallery();?>
    </div>
    </div>
    <!-- The main content column ends -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

  7. ZerBox
    Member
    Posted 8 years ago #

    Uploaded lazy-index with the code you gave, but the same problem is still there :/

  8. ZerBox
    Member
    Posted 8 years ago #

    I hope someone can help me. I dont understand what can be wrong now..

  9. VaamYob
    Member
    Posted 8 years ago #

    The resulting div structure that I see on your site is different from what I saw in my tests. Did you just copy and paste, or was it a complete replace of the entire file ?

  10. VaamYob
    Member
    Posted 8 years ago #

    Just as a test, place this in a file called lazy-simple.php
    <?php
    /* Don't remove this line. */
    require('./wp-blog-header.php');
    ?>
    <link href="./wp-content/plugins/lazy-gallery/lazy-style.css" rel="stylesheet" type="text/css">
    <?php showGallery();?>

  11. ZerBox
    Member
    Posted 8 years ago #

    It was a complete replace of the entire file. I made a new file called lazy-index.php containing the new code, and that replaced the old one in the main wordpress-folder.

  12. ZerBox
    Member
    Posted 8 years ago #

    I have now made and uploaded lazy-simple.php

    Have to go to work now. Will be back to this post in about 6 hours. Thanks for all help. Hope we will find the solution.

  13. VaamYob
    Member
    Posted 8 years ago #

    Now put this in your lazy-simple.php

    <?php
    /* Don't remove this line. */
    require('./wp-blog-header.php');
    ?>
    <?php get_header(); ?>
    <link href="./wp-content/plugins/lazy-gallery/lazy-style.css" rel="stylesheet" type="text/css">
    <?php showGallery();?>
    <?php get_footer(); ?>

  14. ZerBox
    Member
    Posted 8 years ago #

    Uploaded the updated version of lazy-simple now

  15. VaamYob
    Member
    Posted 8 years ago #

    OK, there's some auto div generation going on here. Let me study the automatically generated div structure and get back with you.

  16. VaamYob
    Member
    Posted 8 years ago #

    Now, this:

    <?php
    /* Don't remove this line. */
    require('./wp-blog-header.php');
    ?>
    <?php get_header(); ?>
    <link href="./wp-content/plugins/lazy-gallery/lazy-style.css" rel="stylesheet" type="text/css">
    <div class="entry narrowcolumn">
    <div id="gallery" class="entrybody"> <br/>
    <br/>
    <?php showGallery();?>
    </div>
    </div>
    </div>
    </div>
    <!-- The main content column ends -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

  17. ZerBox
    Member
    Posted 8 years ago #

    Took a short time to look at this post before work. Seems to work fine now!

    How do I get the tumblails to show in a subsection as here:
    http://www.xyooj.com/blog/lazy-index.php?file=micasa/

  18. VaamYob
    Member
    Posted 8 years ago #

    Glad it worked for you.

    What I have on my site is a "fork" of the lazy gallery code.

    I wanted new features and didn't want to wait. So I wrote the features myself. I've offered to include the new features into the main lazy gallery code, but the people who currently maintain that code (which is itself a fork of the original code that you have) are on vacation or something.

  19. ZerBox
    Member
    Posted 8 years ago #

    ok, is it possible for you to publish the code here so that I can put it in to my file?

    Would be nice if you could show where in the file I should put the new code :)

  20. moshu
    Member
    Posted 8 years ago #

    Not here :)
    Use http://pastebin.com or a similar service, please do not post long code in the forum:
    - it's difficult to read
    - some portions might get rendered

Topic Closed

This topic has been closed to new replies.

About this Topic