1 chejim Nov 26, 2009 08:50
3 chejim 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 sam2kb 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 chejim 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 sam2kb 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 chejim 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 sam2kb Nov 26, 2009 21:15
What skin are you using?
9 chejim 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' => ' ',
'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' => ' • ',
'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' => ' • ',
'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 chejim 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 sam2kb 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 chejim 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 sam2kb Nov 26, 2009 22:32
<a href="javascript:self.print()"><img src="#" /></a> ;)
14 chejim 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?)
15 sam2kb Nov 27, 2009 00:00
See if this helps http://www.boutell.com/newfaq/creating/printpart.html
16 chejim 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 cofficavic Dec 01, 2009 15:25
I try a lot of ways but still does not work.
If it's gonna be the same text for all posts, add the code to "Single post footer" in Blog settings > Advanced tab