View Single Post
  #2  
Old 06-11-2012, 04:50 AM
johnlanglois johnlanglois is offline
Mosets'd
 
Join Date: Sep 2011
Posts: 32
Default Sold Sign Overlay

For the benefit of the next pilgrim to pass this way, I will answer my own question with insights gleaned from support.

Change _summary.php, located in your website path->components->com_hotproperty->views->properties->tmpl

This is pretty much MVC architecture.

Code:
<?php $hotproperty =& MosetsApplication::getInstance('hotproperty');
//Use the following variables to inform the building of HTML part of the page
     $span_status = '';
 	$span_markup = '';
	$extrafield_value ='';
	
foreach ($this->extrafields as $extrafield) :
	$extrafield_value = MosetsHTML::_('hotproperty.content.extrafield', $extrafield, $this->property);
		
// leave the spaces in the var definitions
			
 	if($extrafield_value =='SOLD') :
		//echo "extra field value is " .$extrafield_value; 
		$span_status = ' sold';
		$span_markup = 'sold';
		$span_close = ' </span>';
		else :
// echo "this was not a sold field";
			endif;
	endforeach;


echo MosetsHTML::_('content.header', $this->headerLevel,
	MosetsHTML::_('link', JRoute::_(MosetsRoute::getLink('hotproperty', array('view' => 'properties', 'layout' => 'property', 'id' => $this->property->id))),
		($hotproperty->getCfg('show_thumb') ? '<span class='.$span_status.'>'.$span_status. '</span>'. MosetsHTML::_('hotproperty.image.photo', 'thumbnail', @$this->property->Photo[0]->thumb, null, '')  : $span_markup) . $this->escape($this->property->name)
	),
	$this->property->name,
	null,
	array('class' => 'contentheading')
); ?>
With this is place all you need is a class in CSS to get the sold sign to overlay the thumbnail.

Code:
.sold{/** text **/
font:bold 1.0em/1.0em Georgia, "Times New Roman", Times, serif;
color: red;
background: white;
text-align:center;
position: absolute;
width:60px;

/**adjust as needed**/
top: 5%;
left: 20%;
border:double;

/**note: CSS3 TRANSFORM: ROTATE DOESN'T WORK IN ALL BROWSERS YET**/
-webkit-transform: rotate(25deg); /**safari, chrome**/
-moz-transform: rotate(25deg); /**firefox**/
transform: rotate(25deg); /**other browsers**/
}
This will work for displays involving search and results.
It will NOT flow through to the modules, such as the latest display.