|
|
#1 |
|
Member
Join Date: Jun 2008
Posts: 66
Rep Power: 5 ![]() |
I don't use "Latest Listings" and I am expecting many featured listings from customers who will want to be on the home page. What template .tpl or .php file lives the code which reads the db to put the Featured horizontal listing on the home page and is there a way to create an array or iteration instruction to control the number of rows to fill up? Surely there must be a simple way.
Thanks Barry
__________________
Using Version 4.0.9 Developer Edition & loving it |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Mar 2008
Posts: 810
Rep Power: 22 ![]() |
Change the number of items to be returned by the plugin and they should wrap (in your case return 15 or 18 items). I emailed you about doing the category specific stuff and the SQL queries lines you will need to modify.
|
|
|
|
|
|
#3 |
|
Member
Join Date: Jun 2008
Posts: 66
Rep Power: 5 ![]() |
Most Excellent, David!
I'd just found some great documentation at Feature Listings Horizontal - 68 Classifieds which I proceeded to do successfully and came back to find you had already answered + a great email with additional code to creating several layers of featured listings -- which I am excited about implementing shortly. Thanks for the Grrrreaat support! You are the Host with the most Great new site, too. BarryG
__________________
Using Version 4.0.9 Developer Edition & loving it |
|
|
|
|
|
#4 |
|
Moderator
Join Date: Mar 2008
Posts: 810
Rep Power: 22 ![]() |
No problems Barry. If we get time, we will try to implement a category specific SQL enquiry for you within the CSS horizontal listings plugins that you bought. It may or may not be straightforward to do so no promises.
|
|
|
|
|
|
#5 | |
|
Member
Join Date: Jun 2008
Posts: 66
Rep Power: 5 ![]() |
Actually, thought I'd add that I didnt find the file, home.tpl.php that the documentation (and video) said was either in my /templates/default/ or same under my custom template directory -- but I did find and change a file of the same name in:
Quote:
Code:
<h3><?php echo @LANG_FEATURED_LISTINGS; ?>
</h3>
<?php echo smarty_function_css_feature_listings_horizontal(array('number' => 15), $this);?>
In the following file /templates/rounded-blue/home.tpl I found the code the documentation referred to, but slightly different -- I made the following change to [ number=15 ]: <h3>{$smarty.const.LANG_FEATURED_LISTINGS}</h3> {css_feature_listings_horizontal number=15 cols=5 table_attr='width="100%" cellpadding="3" cellspacing="3"' td_attr='style="border-top: 1px solid #000 ;"'} but it did not work by itself until I messed with the file in the templates)_c directory. I even tried making my own home.tip.php file (like Blair suggested) and putting them in either directory, both /default and rounded-blue -- but those crashed. Some clarification?
__________________
Using Version 4.0.9 Developer Edition & loving it Last edited by Bronxgodzilla; 03-06-2009 at 04:37 AM. |
|
|
|
|
|
|
#6 |
|
Moderator
Join Date: Mar 2008
Posts: 810
Rep Power: 22 ![]() |
No the templates_c folder is just a cache.
Find home.tpl in your template folder. You then enter the number of entries you want to display in the function call. You do not need to adjust the function itself in the plugins directory. {css_feature_listings_horizontal number=10} or whatever. They should wrap onto more than one row but some minor adjustment may be necessary to the css (padding) to accommodate more than one row. The template uses 5 normally. I just tested it on another site and it works. This is the normal situation. If you implement the special code John sent you to return featured listings by category. You modify the plugin itself in includes/classes/smarty/plugins/function.css_feature_listings_horizontal.php with the code sent. Then the function call in home.tpl becomes css_random_listings_horizontal number=5 category=$category} You change the 5 to 10 or whatever for the number of entries you want returned and enter that category variable. Either directly with the number of the category (you can see that in your admin control panel) or you make John's proposed modification to category.php which is $class_tpl->assign('category', $cat); Just try it first by using the number of the category directly where you have more than 5 featured listings in that category. Let us know how you get on. |
|
|
|
|
|
#7 |
|
Member
Join Date: Jun 2008
Posts: 66
Rep Power: 5 ![]() |
It's a Cache?!! Hot damn, this explains why I was having some earlier problems with updating my new graphic images on layout.tpl -- I was certain were caching related. This would also explain why I "appeared" to get immediate results by changing the home.tpl.php cache file -- although I have the home.tpl revised as well.
Thank you, kind sir, very much for the other code, which I will be implementing the next morning and will let you know :-) BarryG
__________________
Using Version 4.0.9 Developer Edition & loving it |
|
|
|
|
|
#8 |
|
Moderator
Join Date: Mar 2008
Posts: 810
Rep Power: 22 ![]() |
I think the line you will need to adjust in your CSS style sheet is this one. Put a margin in to replace the 0. Try a few different values until it suits your needs. This is one that I use (normal conditions of displaying 5 listings).
.feat{ width: 105px; float:left; padding:6px; margin: 0 2px 8px 4px; background:#FFF; border:#CCCCCC 1px solid; } Hope it all works. |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| css horizontal feature | oteenc | v4 Modules / Modifications | 3 | 01-12-2009 09:57 AM |
| CSS Styled Horizontal Listings | seymourjames | Modification Release | 0 | 11-21-2008 10:47 AM |
| Horizontal & Featured Listings With Styling | seymourjames | v4 Modules / Modifications | 14 | 11-14-2008 01:37 PM |
| CSS styled horizontal random listings | seymourjames | v4 Modules / Modifications | 0 | 09-08-2008 03:51 AM |
| Make featured listings display first all the time | cwp | v4 Modules / Modifications | 0 | 05-08-2008 11:51 PM |