![]() |
|
|||||||
| Register | Projects | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| v3.1 Modifications Questions on modifying 68 Classifieds. Please note these are not supported by 68 Classifieds, and may make future updates more difficult. |
|
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
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 Developer �Powerful you have become, the dark side I sense in you.� |
|
#2
|
|||
|
|||
|
Awesome. Excellent post! Is there anyway to make it specific, say like by state?
__________________
Karim v3.1.9 Developer Edition |
|
#3
|
||||
|
||||
|
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 Developer �Powerful you have become, the dark side I sense in you.� |
|
#4
|
||||
|
||||
|
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 Developer �Powerful you have become, the dark side I sense in you.� Last edited by CHRD : 11-19-2007 at 01:29 PM. |
| Thread Tools | |
| Display Modes | |
|
|