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

 
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-28-2009, 04:47 PM
manuelgruber manuelgruber is offline
Mosets'd
 
Join Date: Feb 2009
Posts: 15
Done Default sorting by "date modified" in backend

I need default sorting of any property to be by date modified or by date created? Right now, it only shows me the option to be sorted by name or price. Can anyone please help me??
Btw. I'm using hp 1.0 b04..

Thank you all!
  #2  
Old 05-28-2009, 05:41 PM
dknight dknight is offline
Mosets Team - Lead Developer
 
Join Date: Dec 2004
Posts: 26,675
Default

If you're running HP 1.0 Beta 4, you *can* set the default sorting to Created date.
__________________
Lee
Lead Developer
Mosets.com - Quality Joomla! Solutions
  #3  
Old 06-01-2009, 06:33 AM
manuelgruber manuelgruber is offline
Mosets'd
 
Join Date: Feb 2009
Posts: 15
Default

I am running HP Beta 4, but in the global configuration I didn't have the option to set the default ordering of the properties to be by Created Date or modified, instead i had just by name or price. So I found default.php file, located in
\administrator\components\com_hotproperty\views\co nfiguration\tmpl\
and I added this line:
JHTML::_( 'select.option', 'created', 'Created' ),
and I got what i needed. Now my properties are sorted by Created Date in any section. But still, on my frontpage properties are not sorted as I wanted.
How can I have those featured properties sorted by Created Date too?
Please help, I don't have enough knowledge in php to figure this out by myself.
  #4  
Old 06-02-2009, 12:07 PM
dknight dknight is offline
Mosets Team - Lead Developer
 
Join Date: Dec 2004
Posts: 26,675
Default

There is indeed a bug that prevents the Created field from being sortable. Here's what you can do:

FILE: /components/com_hotproperty/views/type/tmpl/default.php
LINE: 64
You'll find this block of codes:
PHP Code:
            <?php if (!empty($hpconf->hp_use_sort_hits) && !empty($this->fields['hits']->caption)) { ?>
            <a href="<?php echo JRoute::_('index.php?option=com_hotproperty&view=type&id='.$this->type->id.'&sort=hits&order=asc&limit='.$this->pagination->limit.'&limitstart='.$this->pagination->limitstart); ?>"> <?php echo JText::_('<<'); ?> </a> <?php echo $this->fields['created']->caption?> <a href="<?php echo JRoute::_('index.php?option=com_hotproperty&view=type&id='.$this->type->id.'&sort=hits&order=desc&limit='.$this->pagination->limit.'&limitstart='.$this->pagination->limitstart); ?>"> <?php echo JText::_('>>'); ?> </a> |
            <?php ?>
Insert these codes immediately after it:
PHP Code:
            <?php if (!empty($this->fields['created']->caption)) { ?>
            <a href="<?php echo JRoute::_('index.php?option=com_hotproperty&view=type&id='.$this->type->id.'&sort=created&order=asc&limit='.$this->pagination->limit.'&limitstart='.$this->pagination->limitstart); ?>"> <?php echo JText::_('<<'); ?> </a> <?php echo $this->fields['created']->caption?> <a href="<?php echo JRoute::_('index.php?option=com_hotproperty&view=type&id='.$this->type->id.'&sort=hits&order=desc&limit='.$this->pagination->limit.'&limitstart='.$this->pagination->limitstart); ?>"> <?php echo JText::_('>>'); ?> </a> |
            <?php ?>
Make sure you publish the 'Created' field to 'Listing' and is Published. This should make 'Created' field sortable.
__________________
Lee
Lead Developer
Mosets.com - Quality Joomla! Solutions
  #5  
Old 06-03-2009, 06:54 PM
manuelgruber manuelgruber is offline
Mosets'd
 
Join Date: Feb 2009
Posts: 15
Default featured items sorted by created date

thanks for your help, dknight, but you haven't answered my question. how can I have my featured properties sorted by created date. It's important to me, since I have 20 featured properies on my frontpage, and I need the last created to be on top.
all the other properties are now sorted by created date.
Can you help?
  #6  
Old 06-04-2009, 06:46 PM
dknight dknight is offline
Mosets Team - Lead Developer
 
Join Date: Dec 2004
Posts: 26,675
Default

Bummer, I thought I was answering your question in my last post - missed the featured part.

Here you go:

/components/com_hotproperty/helpers/query.php

Look for this code near line 41:
PHP Code:
            $sql .= '  ORDER BY f.ordering ASC'
change it to:
PHP Code:
            $sql .= '  ORDER BY p.created DESC'
Note that this will also change the ordering in Featured view.
__________________
Lee
Lead Developer
Mosets.com - Quality Joomla! Solutions
  #7  
Old 06-05-2009, 06:49 PM
manuelgruber manuelgruber is offline
Mosets'd
 
Join Date: Feb 2009
Posts: 15
Default

dknight, thank you so much! It's all good now, thanks to you!
 

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Frontpage template giving an strange error? hengcung Discussions, Troubleshooting and Problems 6 05-15-2009 10:51 AM
help, component didnt work, unistalled no its worst litleboy Discussions, Troubleshooting and Problems 6 06-19-2008 09:10 PM


All times are GMT +8. The time now is 07:20 AM.

Copyright © 2005-2010 Mosets Consulting

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