Recent Topics

1 Mar 20, 2011 11:45    

My b2evolution Version: Not Entered

For instance on my blog homepage i have a list of my posts all with preview images set as linked files, when clicking these images they just open the image in the browser window. Is it possible to have the linked images open the article on click?

See www.bitsnacker.com

cheers

2 Mar 21, 2011 23:28

You need to edit _item_block.inc.php file. Add the following code

// Default params:
$params = array_merge( array(
		'<div class="post-content clear-block">',
		'feature_block'		=> false,
		'content_mode'		=> 'auto',		// 'auto' will auto select depending on $disp-detail
		'item_class'		=> 'bPost',
		'image_size'		=> 'fit-400x320',
		'before_more_link'	=> '<span class="more-link">',
		'after_more_link'	=> '</span>',
	), $params );

// Link images to the artile
$params['image_link_to'] = 'single';
$params['excerpt_image_link_to'] = 'single';

Alternatively you can link images to the article in post list mode (homepage) and to the original images in single post mode (when you are already on the article page)


if( $disp == 'posts' )
{
	$params['image_link_to'] =  'single';
	$params['excerpt_image_link_to'] = 'single';
}

3 Mar 22, 2011 10:53

Tat appears to kill my page, displays no posts after changing :(

4 Mar 22, 2011 10:59

tried adding like above and also tried...


// Default params:
$params = array_merge( array(
		'<div class="post-content clear-block">',
		'feature_block'		=> false,
		'content_mode'		=> 'auto',		// 'auto' will auto select depending on $disp-detail
		'item_class'		=> 'bPost',
		'image_size'		=> 'fit-400x320',
                'image_link_to'         => 'single'; 
                'excerpt_image_link_to' => 'single'; 
		'before_more_link'	=> '<span class="more-link">',
		'after_more_link'	=> '</span>',
	), $params );

breaks page - no posts just blank after really long load time

5 Mar 22, 2011 11:59

That was my mistake, I edited the code. Please try again

6 Mar 22, 2011 13:38

Cheers working well :)


Form is loading...