Recent Topics

1 Nov 26, 2009 08:50    

My b2evolution Version: 3.32

I want to add text to the bottom of each post automatically. My posts will all have coupons/images that the customer will have to click on to make larger and then hit file/print.
I Ideally would like the image/coupon to automatically print when clicked upon, but don't know if that is possible, if it is not, I want to give instructions on the bottom of each post to the user.

Thanks!

2 Nov 26, 2009 20:41

If it's gonna be the same text for all posts, add the code to "Single post footer" in Blog settings > Advanced tab

3 Nov 26, 2009 20:50

Posts.
I just tried what you recommended, and it only shows up in the single blog listing, not on the main blog page.

Any other suggestions?

4 Nov 26, 2009 20:59

Then you should add the code at the end of /skins/YOUR_SKIN/_item_content.inc.php
If the file is not in your current skin copy from global skins directory.

5 Nov 26, 2009 21:03

sam2kb wrote:

Then you should add the code at the end of /skins/YOUR_SKIN/_item_content.inc.php
If the file is not in your current skin copy from global skins directory.

Is item_block.inc.php the one you are referring to?

6 Nov 26, 2009 21:05

No, but you can add it to item_block.inc.php too, and it's probably a better way :)

7 Nov 26, 2009 21:14

I am totally new to this, so please forgive me. What do I add and where in that file do I add it?

8 Nov 26, 2009 21:15

What skin are you using?

9 Nov 26, 2009 21:29

A Semi custom version of pixel Green

Here is the code for the file:

<?php
/**
* This is the template that displays the item block
*
* This file is not meant to be called directly.
* It is meant to be called by an include in the main.page.php template (or other templates)
*
* b2evolution - {@link http://b2evolution.net/}
* Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
* @copyright (c)2003-2009 by Francois PLANQUE - {@link http://fplanque.net/}
*
* @package evoskins
*/
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );

global $Item;

// Default params:
$params = array_merge( array(
'feature_block' => false,
'content_mode' => 'auto', // 'auto' will auto select depending on $disp-detail
'item_class' => 'post',
'item_status_class' => 'bPost',
'image_size' => 'fit-400x320',
), $params );

?>

<div id="<?php $Item->anchor_id() ?>" class="<?php $Item->div_classes( $params ) ?>" lang="<?php $Item->lang() ?>">

<?php
$Item->locale_temp_switch(); // Temporarily switch to post locale (useful for multilingual blogs)
?>

<h3 class="bTitle"><?php $Item->title(); ?></h3>
<p><?php
$Item->author( array(
'before' => T_('by').' <strong>',
'after' => '</strong>',
) );
$Item->msgform_link();
?></p>
<?php
// ---------------------- POST CONTENT INCLUDED HERE ----------------------
skin_include( '_item_content.inc.php', $params );
// Note: You can customize the default item feedback by copying the generic
// /skins/_item_feedback.inc.php file into the current skin folder.
// -------------------------- END OF POST CONTENT -------------------------
?>

<div class="post-footer">
<div class="sharethis">
<div class="bSmallHead">
<?php
$Item->categories( array(
'before' => T_('Categories').': ',
'after' => ' ',
'include_main' => true,
'include_other' => true,
'include_external'=> true,
'link_categories' => true,
) );
// List all tags attached to this post:
$Item->tags( array(
'before' => T_('Tags').': ',
'after' => '',
'separator' => ', ',
) );
?>
<br />
<?php
// Permalink:
$Item->permanent_link( array(
'class' => 'permalink_right',
'text' => '#icon#'
) );

// Permalink:
$Item->issue_date( array(
'before' => '<img src="img/clock.gif" alt="" class="middle" />',
'after' => ' ',
));
$Item->issue_time( array(
'before' => ' ',
'after' => '',
));

echo ', ';

/*$Item->wordcount();
echo ' '.T_('words');*/
// echo ', ';
// $Item->views();

/*$Item->locale_flag( array(
'before' => ' &nbsp; ',
'after' => '',
) );*/

// Link to comments, trackbacks, etc.:
$Item->feedback_link( array(
'type' => 'comments',
'link_before' => '<img src="img/comment.gif" alt="" class="middle" />',
'link_after' => '',
'link_text_zero' => '#',
'link_text_one' => '#',
'link_text_more' => '#',
'link_title' => '#',
'use_popup' => false,
'class' => 'comments'
) );

// Link to comments, trackbacks, etc.:
$Item->feedback_link( array(
'type' => 'trackbacks',
'link_before' => ' &bull; ',
'link_after' => '',
'link_text_zero' => '#',
'link_text_one' => '#',
'link_text_more' => '#',
'link_title' => '#',
'use_popup' => false,
) );

$Item->edit_link( array( // Link to backoffice for editing
'before' => ' &bull; ',
'after' => '',
) );
?>
</div>
</div>
<?php


// ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
skin_include( '_item_feedback.inc.php', array(
'before_section_title' => '<h4>',
'after_section_title' => '</h4>',
) );
// Note: You can customize the default item feedback by copying the generic
// /skins/_item_feedback.inc.php file into the current skin folder.
// ---------------------- END OF FEEDBACK (COMMENTS/TRACKBACKS) ---------------------
?>

<?php
locale_restore_previous(); // Restore previous locale (Blog locale)
?>

</div>
<?php
// ------------------------- "Post Footer" CONTAINER EMBEDDED HERE --------------------------
// Display container and contents:
skin_container( NT_('Post Footer'), array(
// The following params will be used as defaults for widgets included in this container:
'block_start' => '',
'block_end' => '',
) );
// ----------------------------- END OF "Post Footer" CONTAINER -----------------------------
?>

10 Nov 26, 2009 21:32

Do you know of a way to set up images so they automatically print when clicked on? I know it uses Javascript, but I know nothing about programming.

11 Nov 26, 2009 21:53

Your skin has the "Post Footer" container so just add a Free HTML widget with your code in "Post Footer" container from Blog settings > Widgets

Do you know of a way to set up images so they automatically print when clicked on?

I don't know what you mean

12 Nov 26, 2009 22:06

Thanks for all of your help!
I was trying to use an onclick code so when someone clicked on a picture in my blog, that it would automatically print out the picture

13 Nov 26, 2009 22:32

<a href="javascript:self.print()"><img src="#" /></a> ;)

14 Nov 26, 2009 22:41

When I use that code, it prints the whole blog page, I just want to print the one image they click on.
(I assumed I replace # with my image location?)

16 Nov 27, 2009 00:25

I tried that too and it doesn't work in the blog format.
Thanks for all of your help!

17 Dec 01, 2009 15:25

I try a lot of ways but still does not work.


Form is loading...