Recent Topics

1 Mar 22, 2012 05:40    

My b2evolution Version: 4.1.x

Is there a way to have different favicons for each blog?

2 Mar 22, 2012 06:54

If each blog is using different skin, simply edit your ..skins/my_skin/html_header_inc.php to add your favicon.

But i assume you are asking this if multiple blogs use the same skin...In that case; you can open your ..skins/my_skin/skin.class.php and add the following:


	function display_init()
	{
		global $blog, $baseurl;

		// call parent:
		parent::display_init();
		
		if( $blog = 3 ) add_headline('<link rel="shortcut icon" href="'.$baseurl.'myicon.ico" />');
		if( $blog = 5 ) add_headline('<link rel="shortcut icon" href="'.$baseurl.'othericon.ico" />');
		if( $blog = 7 ) add_headline('<link rel="shortcut icon" href="'.$baseurl.'favico.ico" />');
		//and so on..
		
	}

add those globals

$blog, $baseurl;


if they are not there, but you should already have function display_init() in place

3 Mar 22, 2012 07:50

Yeah, I'm using separate skins so it should be easy. Can you tell me what line to inject in the html_header.inc.php to point to the favicon?

4 Mar 22, 2012 08:04

Ethan5150 wrote:

Yeah, I'm using separate skins so it should be easy. Can you tell me what line to inject in the html_header.inc.php to point to the favicon?

anywhere inside your <head>

5 Mar 22, 2012 10:41

Something like this?:

<link rel="icon" 
      type="image/png" 
      href="http://example.com/myicon.png">

Nevermind - this worked! Thanks!


Form is loading...