Go Back   Mosets Community > Mosets Hot Property 1.0 > Discussions, Troubleshooting and Problems

Reply
 
Thread Tools Display Modes
  #1  
Old 05-04-2012, 05:41 AM
johnlanglois johnlanglois is offline
Mosets'd
 
Join Date: Sep 2011
Posts: 32
Default Sold Sign Overlay on Images

I think I have asked this before, but never received an answer.
Is there a way to have a "SOLD" sign over properties which are no longer for sale?
I am using an extra field to track availability as either "Available" or "Sold."
For those that are sold, I would like to have the CSS process a text banner and layer it over the image.

Where is the code that processes the building of the page view of properties in a particular category?

Has someone already invented this wheel?

Thanks.
Reply With Quote
  #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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +8. The time now is 08:12 PM.

Copyright © 2005-2010 Mosets Consulting

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.