Go Back   Mosets Community > Archives > Mosets Tree 2.2 > Discussions, Troubleshooting & Problems

 
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-14-2012, 10:27 PM
GASOLINE's Avatar
GASOLINE GASOLINE is offline
Mosets'd
 
Join Date: Apr 2008
Location: Netherlands
Posts: 135
Default Change position of images

I want the images to be displayed above the discription. But when I change page_listing.tpl in:

Code:
<?php 

// Check listing details' access
if( 
	$this->config->getTemParam('limitDetailsViewToRegistered',0) == 0
	||
	(
		$this->config->getTemParam('limitDetailsViewToRegistered',0) == 1
		&&
		$this->my->id > 0
	)
) {
	
		if (!empty($this->images)) include $this->loadTemplate( 'sub_images.tpl.php' );


	include $this->loadTemplate( 'sub_listingDetails.tpl.php' );
	

	if ($this->mtconf['use_map']) include $this->loadTemplate( 'sub_map.tpl.php' );


	if ($this->mt_show_review) include $this->loadTemplate( 'sub_reviews.tpl.php' ); 

} else {
	?>
	 
	<?php
	echo JText::_( 'Please login to view more information about this listing.' );
}

?>
the images are displayed ON TOP. And I want them before the description but UNDER owneraccomodatyion info.

Anybody knows how I can achieve this??

Attached image to explain what I exacly want.
Attached Images
File Type: jpg mosetsproblem.jpg (109.8 KB, 35 views)
  #2  
Old 01-16-2012, 08:41 PM
rickyokeefe rickyokeefe is offline
Mosets'd
 
Join Date: Mar 2011
Posts: 51
Default

I have been editing the style sheets

example: components/com_mtree/templates/kinabalu/sub_listingDetailsStyle5.tpl.php

The code that inserts the images needs to go just before the code that inserts the description.

The line of code that inserts the description is:

echo '<div class="listing-desc">';

Hope this helps,

Rick
  #3  
Old 01-16-2012, 09:25 PM
GASOLINE's Avatar
GASOLINE GASOLINE is offline
Mosets'd
 
Join Date: Apr 2008
Location: Netherlands
Posts: 135
Default

Quote:
Originally Posted by rickyokeefe View Post
I have been editing the style sheets

example: components/com_mtree/templates/kinabalu/sub_listingDetailsStyle5.tpl.php

The code that inserts the images needs to go just before the code that inserts the description.

The line of code that inserts the description is:

echo '<div class="listing-desc">';

Hope this helps,

Rick
Hi Rick,

That does not help. I had figured that out already but I can't see which lines i EXACLY need to move from INSIDE description up above description.
  #4  
Old 01-16-2012, 09:48 PM
rickyokeefe rickyokeefe is offline
Mosets'd
 
Join Date: Mar 2011
Posts: 51
Default

Sorry that did not help, is this for the kinabalu template, if so which style are you using.

Just looking at style3 for kinabalu, the images are above description. the code looks like this:

Code:
<?php
if ( !empty($this->mambotAfterDisplayTitle) ) { 
	echo trim( implode( "\n", $this->mambotAfterDisplayTitle ) );
}

if ( !empty($this->mambotBeforeDisplayContent) && $this->mambotBeforeDisplayContent[0] <> '' ) { 
	echo trim( implode( "\n", $this->mambotBeforeDisplayContent ) ); 
}
echo '<div class="column one">';

if ($this->config->getTemParam('skipFirstImage','0') == 1) {
	array_shift($this->images);
}

if (!empty($this->images)) include $this->loadTemplate( 'sub_images.tpl.php' );

echo '<div class="listing-desc">';
if(!is_null($this->fields->getFieldById(2))) { 
	$link_desc = $this->fields->getFieldById(2);
	echo $link_desc->getOutput(1);
}
echo '</div>';
  #5  
Old 01-16-2012, 10:40 PM
GASOLINE's Avatar
GASOLINE GASOLINE is offline
Mosets'd
 
Join Date: Apr 2008
Location: Netherlands
Posts: 135
Default

That does not help either. I use different template. In my file i see this (which lines should I move to see images above description)?

Code:
if ( !empty($this->mambotBeforeDisplayContent) && $this->mambotBeforeDisplayContent[0] <> '' ) { 
	echo trim( implode( "\n", $this->mambotBeforeDisplayContent ) ); 
}

echo '<div class="listing-desc">';

$images = $this->images;
if ($this->config->getTemParam('skipFirstImage','0') == 1) {
	array_shift($images);
}

if (!empty($images) && $this->config->getTemParam('listingDetailsImagesOutputMode','1') == 3) { 
	echo '<div class="thumbnail' . (($this->config->getTemParam('imageDirectionListingSummary','right')=='right') ? '':'-left') . '">';
	echo '<a href="' . JRoute::_('index.php?option=com_mtree&task=viewimage&img_id=' . $this->link->img_id . '&Itemid=' . $this->Itemid) . '">';
	$this->plugin( 'mt_image', $images[0]->filename, '3', $this->link->link_name );
	echo '</a>';
	if( $this->total_images > 1 ) {
		echo '<div style="width:' . ($this->config->get('resize_listing_size') + 10) . 'px"><a href="' . JRoute::_('index.php?option=com_mtree&task=viewgallery&link_id=' . $this->link->link_id . '&Itemid=' . $this->Itemid) . '">' . JText::_( 'View gallery' ) . '</a></div>';
	}
	echo '</div>';
}
if(!is_null($this->fields->getFieldById(2))) { 
	$link_desc = $this->fields->getFieldById(2);
	echo $link_desc->getOutput(1);
}
echo '</div>';
if ( !empty($this->mambotAfterDisplayContent) ) { echo trim( implode( "\n", $this->mambotAfterDisplayContent ) ); }
?>
</div>
  #6  
Old 01-17-2012, 04:37 AM
rickyokeefe rickyokeefe is offline
Mosets'd
 
Join Date: Mar 2011
Posts: 51
Default

Try that

Code:
if ( !empty($this->mambotBeforeDisplayContent) && $this->mambotBeforeDisplayContent[0] <> '' ) { 
	echo trim( implode( "\n", $this->mambotBeforeDisplayContent ) ); 
}

$images = $this->images;
if ($this->config->getTemParam('skipFirstImage','0') == 1) {
	array_shift($images);
}

if (!empty($images) && $this->config->getTemParam('listingDetailsImagesOutputMode','1') == 3) { 
	echo '<div class="thumbnail' . (($this->config->getTemParam('imageDirectionListingSummary','right')=='right') ? '':'-left') . '">';
	echo '<a href="' . JRoute::_('index.php?option=com_mtree&task=viewimage&img_id=' . $this->link->img_id . '&Itemid=' . $this->Itemid) . '">';
	$this->plugin( 'mt_image', $images[0]->filename, '3', $this->link->link_name );
	echo '</a>';
	if( $this->total_images > 1 ) {
		echo '<div style="width:' . ($this->config->get('resize_listing_size') + 10) . 'px"><a href="' . JRoute::_('index.php?option=com_mtree&task=viewgallery&link_id=' . $this->link->link_id . '&Itemid=' . $this->Itemid) . '">' . JText::_( 'View gallery' ) . '</a></div>';
	}
	echo '</div>';
}
echo '<div class="listing-desc">';
if(!is_null($this->fields->getFieldById(2))) { 
	$link_desc = $this->fields->getFieldById(2);
	echo $link_desc->getOutput(1);
}
echo '</div>';
if ( !empty($this->mambotAfterDisplayContent) ) { echo trim( implode( "\n", $this->mambotAfterDisplayContent ) ); }
?>
</div>
  #7  
Old 01-17-2012, 05:02 AM
GASOLINE's Avatar
GASOLINE GASOLINE is offline
Mosets'd
 
Join Date: Apr 2008
Location: Netherlands
Posts: 135
Default

Sorry, also not working.
  #8  
Old 01-17-2012, 12:53 PM
rickyokeefe rickyokeefe is offline
Mosets'd
 
Join Date: Mar 2011
Posts: 51
Default

This is how I just moved the description to the bottom of page, which should put it below your images.

I moved these lines to the bottom of code:

Code:
if(!is_null($this->fields->getFieldById(2))) { 
	$link_desc = $this->fields->getFieldById(2);
	echo $link_desc->getOutput(1);
	
}
The bottom of my code now looks like this:

Code:
	?></div><?php 
	
}

if(!is_null($this->fields->getFieldById(2))) { 
	$link_desc = $this->fields->getFieldById(2);
	echo $link_desc->getOutput(1);	
}
	
?>
</div>
  #9  
Old 01-17-2012, 04:45 PM
GASOLINE's Avatar
GASOLINE GASOLINE is offline
Mosets'd
 
Join Date: Apr 2008
Location: Netherlands
Posts: 135
Default

Sorry, breaks up my layout and description styill above ??

Here attached my complete fill, maybe it's wrong or different.
Attached Files
File Type: php sub_listingDetails.tpl.php (6.9 KB, 2 views)
  #10  
Old 01-17-2012, 05:21 PM
rickyokeefe rickyokeefe is offline
Mosets'd
 
Join Date: Mar 2011
Posts: 51
Default

I have moved the code right to the bottom of script, images should now be above description. This code is for a different template to mine and the way it calls in images is different to kinabalu template, so I can't actually see if what I have done is working or not.

Code:
if (!empty($images) && $this->config->getTemParam('listingDetailsImagesOutputMode','1') == 3) { 
	echo '<div class="thumbnail' . (($this->config->getTemParam('imageDirectionListingSummary','right')=='right') ? '':'-left') . '">';
	echo '<a href="' . JRoute::_('index.php?option=com_mtree&task=viewimage&img_id=' . $this->link->img_id . '&Itemid=' . $this->Itemid) . '">';
	$this->plugin( 'mt_image', $images[0]->filename, '3', $this->link->link_name );
	echo '</a>';
	if( $this->total_images > 1 ) {
		echo '<div style="width:' . ($this->config->get('resize_listing_size') + 10) . 'px"><a href="' . JRoute::_('index.php?option=com_mtree&task=viewgallery&link_id=' . $this->link->link_id . '&Itemid=' . $this->Itemid) . '">' . JText::_( 'View gallery' ) . '</a></div>';
	}
	echo '</div>';
}

echo '</div>';
if ( !empty($this->mambotAfterDisplayContent) ) { echo trim( implode( "\n", $this->mambotAfterDisplayContent ) ); }

?></div><?php 

if(!is_null($this->fields->getFieldById(2))) { 
	$link_desc = $this->fields->getFieldById(2);
	echo $link_desc->getOutput(1);	
}
	
?>
</div>
  #11  
Old 01-17-2012, 05:48 PM
GASOLINE's Avatar
GASOLINE GASOLINE is offline
Mosets'd
 
Join Date: Apr 2008
Location: Netherlands
Posts: 135
Default

Still going wrong (breaks up layout.

This is from the m2 template.
  #12  
Old 01-17-2012, 07:21 PM
rickyokeefe rickyokeefe is offline
Mosets'd
 
Join Date: Mar 2011
Posts: 51
Default

The problem is the image is not being placed by sub_listingDetails.tpl.php unlike it is in kinabalu.

The image has its own separate template, like the review system and maps do. The problem is I cannot find out where these files are being called from to be placed. If I knew where then I could switch it off and call the image from sub_listingDetails.tpl.php

The other option is to try and call the description from sub_images.tpl.php, but I'm not 100% sure how that is done, I will give it a try.
  #13  
Old 01-17-2012, 07:26 PM
GASOLINE's Avatar
GASOLINE GASOLINE is offline
Mosets'd
 
Join Date: Apr 2008
Location: Netherlands
Posts: 135
Default

The file:
Attached Files
File Type: php sub_images.tpl.php (1.7 KB, 1 views)
  #14  
Old 01-17-2012, 07:34 PM
rickyokeefe rickyokeefe is offline
Mosets'd
 
Join Date: Mar 2011
Posts: 51
Default

replace these 2 files, make sure you backup your original copy's
Attached Files
File Type: php sub_listingDetails.tpl.php (5.7 KB, 3 views)
File Type: php sub_images.tpl.php (2.5 KB, 2 views)
  #15  
Old 01-17-2012, 07:41 PM
GASOLINE's Avatar
GASOLINE GASOLINE is offline
Mosets'd
 
Join Date: Apr 2008
Location: Netherlands
Posts: 135
Default

Hmmmm, almost. Tears up layout:
http://alturl.com/4pghg
  #16  
Old 01-17-2012, 07:48 PM
rickyokeefe rickyokeefe is offline
Mosets'd
 
Join Date: Mar 2011
Posts: 51
Default

try this
Attached Files
File Type: php sub_listingDetails.tpl.php (5.7 KB, 2 views)
  #17  
Old 01-17-2012, 07:56 PM
GASOLINE's Avatar
GASOLINE GASOLINE is offline
Mosets'd
 
Join Date: Apr 2008
Location: Netherlands
Posts: 135
Default

Quote:
Originally Posted by rickyokeefe View Post
try this
Great work. Thanks. It's working now, however I have to change somethings in stylesheet to make it fit but that's no problem.

Thanks a lot.

  #18  
Old 01-17-2012, 07:59 PM
rickyokeefe rickyokeefe is offline
Mosets'd
 
Join Date: Mar 2011
Posts: 51
Default

no problem
  #19  
Old 01-17-2012, 08:07 PM
rickyokeefe rickyokeefe is offline
Mosets'd
 
Join Date: Mar 2011
Posts: 51
Default

1 last piece of code added that should hopefully fix the styling error.
Attached Files
File Type: php sub_listingDetails.tpl.php (5.7 KB, 7 views)
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 05:49 AM.

Copyright © 2005-2010 Mosets Consulting

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