x
Toggle Content    Register or Login  -  December 16, 2018, 2:36 pm  
Toggle Content Commercial Themes
This is an opportunity for you to preview TCD commercial themes. All themes seen here can be purchased from the store.
Toggle Content User Info

Welcome Anonymous

Toggle Content Navigation
Toggle Content Project Status
Support Forums » DragonflyCMS » Tips & Tricks » Individual Blockhead colors 9.1.2
Please use the forum search before making a post. Your question might have been previously answered.

Individual Blockhead colors 9.1.2
Some of the best non-standard tricks for your site all in one location.


Post new topic   Reply to topic    Forum Index » Tips & Tricks Printer Friendly Page

View previous topic :: View next topic  
Author Message
Lead Developer


PostPosted: Wed Jul 18, 2007 12:43 am Reply with quote

For DragonflyCMS 9.1.2

Code:
function themesidebox($title, $content, $bid=0) {
	global $cpgtpl, $themeblockside, $CPG_SESS;

	if ($bid==2) {
	$blockheadcolor = 'themes/'.$CPG_SESS['theme'].'/images/blockhead-red.gif';
	} 
	 elseif ($bid==32) {
	$blockheadcolor = 'themes/'.$CPG_SESS['theme'].'/images/blockhead-purple.gif';
	}
	elseif ($bid==71) {
	$blockheadcolor = 'themes/'.$CPG_SESS['theme'].'/images/blockhead-green.gif';
	} elseif ($bid) {
	$blockheadcolor = 'themes/'.$CPG_SESS['theme'].'/images/cellpic3.gif';
	}

	$cpgtpl->assign_block_vars($themeblockside.'block', array(
		'S_BLOCKHEADCOLOR'	=> $blockheadcolor,
		'S_TITLE'			=> $title,
		'S_CONTENT'			=> $content,
		'S_BID'				=> $bid,
		'S_VISIBLE'			=> hideblock($bid) ? 'style="display:none"' : '',
		'S_HIDDEN'			=> hideblock($bid) ? '' : 'style="display:none"',
		'S_IMAGE'			=> 'themes/'.$CPG_SESS['theme'].'/images/'.(hideblock($bid) ? 'plus.gif' : 'minus.gif')
	));
	if ($themeblockside == '') {
		$cpgtpl->set_filenames(array('block' => 'block.html'));
		$cpgtpl->display('block');
	}
}

Make this change in header.html, footer.html, and block.html
PHP:
<div class="blockhead" style="background: #133800 url({leftblock.S_BLOCKHEADCOLOR});">


_________________

Back to top
View user's profile Photo Gallery
  Page 1 of 1All times are GMT - 5 Hours

Post new topic   Reply to topic    Forum Index » Tips & Tricks Printer Friendly Page

  
  
  
 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


RSS-News
RSS-Downloads
RSS-Forums
RSS-KnowledgeBase
Valid CSS!
Valid HTML 4.01!

Site Search | Support | Contact | Payments | Link to Us
All TCD logos and trademarks in this site are property of TreasureCoastDesigns.com
Interactive software released under GNU GPL, Code Credits, Privacy Policy
TCD_Natural © T.C.D.