Recent Topics

Adding images after "more" cuts text in half

Started by on Jul 08, 2012 – Contents updated: Jul 08, 2012

Jul 08, 2012 07:50    

I would like images to appear after the text, at the end of each post. Now I can link an image and con choose the position between "teaser" and "after more". If I choose "after more", the images will be diplsyed directly after the more-tag and the rest of the text will be below the images. That is not what I want. I would like the images to be shown below the text.

Jul 09, 2012 20:24

Moved to feature requests.
There must be an option like "After text".

You can move image block below post text. Copy the file /skins/_item_content.inc.php to your skin and then edit the following block

if( ! empty($params['image_size']) && $more && $Item->has_content_parts($params) /* only if not displayed all images already */ )
{
	// Display images that are linked to this post:
	$Item->images( array(
			'before'              => $params['before_images'],
			'before_image'        => $params['before_image'],
			'before_image_legend' => $params['before_image_legend'],
			'after_image_legend'  => $params['after_image_legend'],
			'after_image'         => $params['after_image_legend'],
			'after'               => $params['after_images'],
			'image_size'          => $params['image_size'],
			'limit'               => $params['image_limit'],
			'image_link_to'       => $params['image_link_to'],
			'before_gallery'      => $params['before_gallery'],
			'after_gallery'       => $params['after_gallery'],
			'gallery_image_size'  => $params['gallery_image_size'],
			'gallery_image_limit' => $params['gallery_image_limit'],
			'gallery_colls'       => $params['gallery_colls'],
			'gallery_order'       => $params['gallery_order'],
			// Optionally restrict to files/images linked to specific position: 'teaser'|'aftermore'
			'restrict_to_image_position' => 'aftermore',
		) );
}

$Item->content_extension( array(
		'before'      => $params['before_content_extension'],
		'after'       => $params['after_content_extension'],
		'force_more'  => $params['force_more'],
	) );

// Links to post pages (for multipage posts):
$Item->page_links( array(
		'before'      => $params['page_links_start'],
		'after'       => $params['page_links_end'],
		'separator'   => $params['page_links_separator'],
		'single'      => $params['page_links_single'],
		'current_page'=> $params['page_links_current_page'],
		'pagelink'    => $params['page_links_pagelink'],
		'url'         => $params['page_links_url'],
	) );

// Display Item footer text (text can be edited in Blog Settings):
$Item->footer( array(
		'mode'        => $params['footer_text_mode'], // Will detect 'single' from $disp automatically
		'block_start' => $params['footer_text_start'],
		'block_end'   => $params['footer_text_end'],
	) );

Make it look like this

$Item->content_extension( array(
		'before'      => $params['before_content_extension'],
		'after'       => $params['after_content_extension'],
		'force_more'  => $params['force_more'],
	) );

// Links to post pages (for multipage posts):
$Item->page_links( array(
		'before'      => $params['page_links_start'],
		'after'       => $params['page_links_end'],
		'separator'   => $params['page_links_separator'],
		'single'      => $params['page_links_single'],
		'current_page'=> $params['page_links_current_page'],
		'pagelink'    => $params['page_links_pagelink'],
		'url'         => $params['page_links_url'],
	) );

// Display Item footer text (text can be edited in Blog Settings):
$Item->footer( array(
		'mode'        => $params['footer_text_mode'], // Will detect 'single' from $disp automatically
		'block_start' => $params['footer_text_start'],
		'block_end'   => $params['footer_text_end'],
	) );

if( ! empty($params['image_size']) && $more && $Item->has_content_parts($params) /* only if not displayed all images already */ )
{
	// Display images that are linked to this post:
	$Item->images( array(
			'before'              => $params['before_images'],
			'before_image'        => $params['before_image'],
			'before_image_legend' => $params['before_image_legend'],
			'after_image_legend'  => $params['after_image_legend'],
			'after_image'         => $params['after_image_legend'],
			'after'               => $params['after_images'],
			'image_size'          => $params['image_size'],
			'limit'               => $params['image_limit'],
			'image_link_to'       => $params['image_link_to'],
			'before_gallery'      => $params['before_gallery'],
			'after_gallery'       => $params['after_gallery'],
			'gallery_image_size'  => $params['gallery_image_size'],
			'gallery_image_limit' => $params['gallery_image_limit'],
			'gallery_colls'       => $params['gallery_colls'],
			'gallery_order'       => $params['gallery_order'],
			// Optionally restrict to files/images linked to specific position: 'teaser'|'aftermore'
			'restrict_to_image_position' => 'aftermore',
		) );
}


Form is loading...

Advanced CMS – This forum is powered by b2evolution CMS, a complete engine for your website.