Recent Topics

1 Aug 27, 2008 06:15    

My b2evolution Version: Not Entered

hello,

i want to modify my logo widget to pull a file in the img/ directory that is called logo_blog# .jpg.


	function get_param_definitions( $params )
	{
		$r = array_merge( array(
				'logo_file' => array(
					'label' => T_('Image filename'),
					'note' => T_('The image/logo file must be uploaded to the root of the Blog\'s media dir'),
					'defaultvalue' => 'logo.png',
					'valid_pattern' => array( 'pattern'=>'¤^[a-z0-9_\-][a-z0-9_.\-]*$¤i',
																		'error'=>T_('Invalid filename.') ),
				),
			), parent::get_param_definitions( $params )	);

		return $r;
	}

here is what i used to use


<a href="<?php $Blog->disp( 'url', 'raw' ) ?>"><img src="http://www.sportsfrequency.com/blog2/skins/asevo3/img/logo_<?php echo $blog; ?>.jpg" alt="<?php echo $Blog->disp( 'tagline', 'htmlbody' ) ?>" /></a>
 */

2 Aug 27, 2008 08:17

Same file (/inc/widgets/widgets/_coll_logo.widget.php) line 124:

.'<img src="'.$Blog->get_media_url().$this->disp_params['logo_file'].'" alt="'.$Blog->dget( 'name', 'htmlattr' ).'" />'


change to:

.'<img src="'.$skin_url.'/img/'.$this->disp_params['logo_file'].'" alt="'.$Blog->dget( 'name', 'htmlattr' ).'" />'


and change a few lines above that (line 116)

global $Blog;

in

global $Blog, $skin_url;

Good luck

3 Aug 27, 2008 08:47

try:

.'<img src="'.$skin_url.'/img/logo_'.$Blog->ID.'.jpg" alt="'.$Blog->dget( 'name', 'htmlattr' ).'" />'


I am not 100% sure about the / before img (depends on the output of $skin_url). I am not 100% sure about this solution either ;)

Good luck


Form is loading...