WordPress.org

Support

Support » Miscellaneous » Gallery – sidebar

Gallery – sidebar

Viewing 15 replies - 1 through 15 (of 19 total)
  • 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/

    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?

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

    Oops, never mind.

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

    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(); ?>

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

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

    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 ?

    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();?>

    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.

    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.

    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(); ?>

    Uploaded the updated version of lazy-simple now

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

    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(); ?>

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Gallery – sidebar’ is closed to new replies.