Cutline Theme Support Forums » Cutline Theme Support Forums

"Print" and "Email" Formatting

(4 posts)
  • Started 3 years ago by FrankHagan
  • Latest reply from FrankHagan
  • This topic is resolved

  1. 1) I would like to see a CSS for printer friendly formatting. Or maybe that's a "new page" that you load? I'm not sure how this is done!

    2) Also, an "email this" link that would open a window for sending a friend a link to the page. I think this is in WP already; how would we call it in Cutline?

    Posted 3 years ago #
  2. I found a couple of plug ins that work, with some editing. I'm using:

    http://lesterchan.net/wordpress/readme/wp-email.html
    http://lesterchan.net/wordpress/readme/wp-print.html

    Install according to directions. The links won't match your tags unless you edit the "email.php" in the wp-email plug in folder, and the "print.php" in the wp-print plug in folder. Here's how to do that, starting with the "email.php" file.

    Find, in "email.php":

    case 1:
    $output = '<img class="WP-EmailIcon" src="'.$email_icon.'" alt="'.$email_text.'" title="'.$email_text.'" style="border: 0px;" /> '.$email_text.'';
    break;

    Change to:

    case 1:
    $output = '<span class="tagged">
    <img class="WP-EmailIcon" src="'.$email_icon.'" alt="'.$email_text.'" title="'.$email_text.'" style="border: 0px;" />  '.$email_text.'
    </span>';
    break;

    In "print.php" find:

    case 1:
    $output = '<img src="'.$print_icon.'" alt="'.$print_text.'" title="'.$print_text.'" style="border: 0px;" /> 
    '.$print_text.'';
    break;

    Change to:

    case 1:
    $output = '<span class="tagged">
    <img src="'.$print_icon.'" alt="'.$print_text.'" title="'.$print_text.'" style="border: 0px;" /> '.$print_text.'
    </span>';
    break;

    In Admin > Presentation > Theme Editor select "Single Post" to edit "single.php".

    Find:

    <p class="tagged">Tags: <?php the_category(' · ') ?></p>

    After, add:

    <p class="tagged">Tools:
    <?php if(function_exists('wp_print')) { print_link(); } ?> 
    <?php if(function_exists('wp_email')) { email_link(); } ?>
    </p>

    Select the "Main Index Template" to edit "index.php".

    Find:

    strong>Tags: <?php the_category(' · ') ?>

    After, add:

    <p class="tagged">Tools:
    <?php if(function_exists('wp_print')) { print_link(); } ?> 
    <?php if(function_exists('wp_email')) { email_link(); } ?>
    </p>

    That's the simplified version so you may have to play with the layout a little bit. My blog at http://www.frankhagan.com has quite a few things in there besides the 'wp-print' and 'wp-email' plugins.

    Posted 3 years ago #
  3. Sweet, I just wanted to link you those, needed coffee to wake up befoere I could answer tho. :P
    Glad you found them and sorry for being this slow.

    Posted 3 years ago #
  4. Not a problem, I was doing a search in the background when I posted the message. They both seem to work well, although figuring out how to override the default link style took me some time. I guess that because you're calling a new PHP function for each of them, the paragraph style doesn't apply, and the browsers apply the default link style. It took me longer than it should have to figure out to just put a <span class="tagged"> element in the appropriate file.

    Posted 3 years ago #

RSS feed for this topic

Reply

You must log in to post.