Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter manila

    (@manila)

    Can no one help me?

    I’m not sure what you mean by “Main Template”, but you have to place the function call within the loop, and normally in the index.php file for your theme. When I say “within the loop”, I mean between these lines:
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>

    and this one:
    <?php } endwhile; ?>

    I use that particular plugin, and I placed the call immediately after the date stamp code for a post (I use the Kubrick theme):
    <?php the_time('F jS, Y') ?>

    Use this code to call the category image function only if the plugin is activated (prevents your site from doing weird things when a plugin is disabled):
    <?php if (function_exists('c2c_the_category_image')) c2c_the_category_image(' ', '', 'gif png'); ?>

    Check out my site for an example of the plugin in action. The images aligned to the right under a post title are the result of the plugin. I should also mention that you will want to add the appropriate CSS to format and align the images the way you like.

    Thread Starter manila

    (@manila)

    Thanks first of all.

    Yes, I put the tag between the loop and I now did exactly what you said – I placed your code right after the <?php the_time('F jS, Y') ?>. But it still doesn’t work: https://fan-sites.org/audrey-tautou

    My “Main Template” (the index file in the Default theme) is this now:
    <?php get_header(); ?>

    <div id="content" class="narrowcolumn">

    <?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>

    <div class="post" id="post-<?php the_ID(); ?>">
    <h2>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></h2>
    <small><?php the_time('F jS, Y') ?> <?php if (function_exists('c2c_the_category_image')) c2c_the_category_image(' ', '', 'gif png'); ?><!-- by <?php the_author() ?> --></small>

    <div class="entry">
    <?php the_content('Read the rest of this entry »'); ?>
    </div>

    <p class="postmetadata">Posted in
    <?php the_category() ?> | <?php edit_post_link('Edit','','|'); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>
    </div>

    <?php endwhile; ?>

    <div class="navigation">
    <div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Next Entries »') ?></div>
    </div>

    <?php else : ?>

    <h2 class="center">Not Found</h2>
    <p class="center">Sorry, but you are looking for something that isn't here.
    <?php include (TEMPLATEPATH . "/searchform.php"); ?>

    <?php endif; ?>

    </div>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

    Where is my fault?

    Time for the obvious questions:

    Did you create the appropriate folder to store your images (the default is ‘/wp-content/images’)? If so, did you upload images to this folder in the correct format? By correct format, I mean did you name the file the correct name to correspond with a category, and is the file extension the correct type (for example, in your case it could be a file named ‘audrey.jpg’)?

    You may have already taken care of the above, but we gotta check the basic stuff before we look into more complicated reasons for it not working. If the image corresponding to a particular category doesn’t exist, the plugin will simply not display anything. This makes it appear as though it’s not working, but in fact it’s working perfectly!

    Thread Starter manila

    (@manila)

    Yes, I did so. I have an audrey.jpg, audrey.png and audrey.gif uploaded in wp-content/images – and still it isn’t showing a pic.

    Maybe did I replace the tag in the wrong place? I replaced it as I said in the “Main Template” of the default theme that is activated. you can find that “Main Template” in the presentation > theme editor function. Did I do right in replacing the tag there??!

    I’m sorry, I told you wrong. I put my category image function call right after the closing </small> tag. Though I doubt that would make a difference for it to not be working. So my code looks like this:
    <?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small><?php if (function_exists('c2c_the_category_image')) c2c_the_category_image(' ', '', 'gif png'); ?>

    The only other silly question I want to ask is if the plugin is activated? You mentioned that you were to step 4 in the installation instructions, which is after the activation step, but I had to check.

    Lastly, here’s the CSS that I use to style my category images:
    .catimage {
    float: right;
    padding: 0 4px 0 4px;
    }

    You will probably need to adjust the padding values, depending on your image sizes and site structure (when we get the plugin working). Hopefully someone else will chime in soon with a suggestion!

    Thread Starter manila

    (@manila)

    I tried it all out, but it isn’t working. I don’t know why (???).

    Thanks a lot for you help though – maybe somebody else has a new idea, I am completely clueless. ??

    Thread Starter manila

    (@manila)

    Maybe does anyone else have new ideas for my problem? I really need help…

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Comment picture script (c2c) problem’ is closed to new replies.