|
|
#1 |
|
Senior Member
Join Date: Nov 2006
Posts: 186
Rep Power: 14 ![]() |
Easy fix to display random horizontal featured and normal listing on any page and the same page.
1/ Make a copy of function.feature_listings_horizontal.php, found in /includes/classes/smarty/plugins 2/ rename it to function.frand_listings_horizontal.php and upload to same folder 3/ open and edit line 18 function.feature_listings_horizontal.php, rename the "feature" part of the line to "frand" 4/ Edit line 57, look for featured = 'Y' ORDER BY rand() LIMIT, just change featured = 'Y' to featured = 'N' 5 edit line 158, look for function smarty_function_html_table_cycle_68($name, $var, $no). Insert a letter just before the 68, but not "v" I inserted n, so it looks like: function smarty_function_html_table_cycle_n68($name, $var, $no) open home.tpl.php found in /templates/default insert this code where it suitable: {frand_listings_horizontal number=12 cols=4 table_attr='width="100%" style="border: 1px solid #cccccc;"' td_attr='valign="top" align="center"'} This will let you display random normal listing along side the feartured listings Thanks Glenn
__________________
Costa del Sol Spain v3.1.10 Dev V4.09 Dev sweeeet �Powerful you have become, the dark side I sense in you.� |
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Aug 2007
Posts: 19
Rep Power: 7 ![]() |
Awesome. Excellent post! Is there anyway to make it specific, say like by state?
__________________
Karim v3.1.9 Developer Edition |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Nov 2006
Posts: 186
Rep Power: 14 ![]() |
Sorry I dont know that much, but I gues it would be in line 57 of the code
__________________
Costa del Sol Spain v3.1.10 Dev V4.09 Dev sweeeet �Powerful you have become, the dark side I sense in you.� |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Nov 2006
Posts: 186
Rep Power: 14 ![]() |
I can make it call from a specific cat by placing
featured = 'N' AND section=58 ORDER BY rand() LIMIT ".$number; 58 = Cat ID but it dosnt work if you enter the main cat ID with all your listings in sub cats all under a main cat but if you take out featured = 'N' it will display normal and featured listings together update: replace section=58 with section IN (3,4,5,6,7) to call from multi Cats Thanks to Eric the Boss Man
__________________
Costa del Sol Spain v3.1.10 Dev V4.09 Dev sweeeet �Powerful you have become, the dark side I sense in you.� Last edited by CHRD; 11-19-2007 at 12:29 PM. |
|
|
|
|
|
#5 | |
|
Senior Member
Join Date: Jan 2008
Posts: 124
Rep Power: 8 ![]() |
Quote:
__________________
~~ Lorren Any advice is always appreciated. ![]() v 3.1.10 Developer; v 4 Developer |
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|