Support Forums


Go Back   68 Classifieds Forums > Help & Support > v4 Questions & Support

 
LinkBack Thread Tools Display Modes
Old 03-05-2009, 03:36 AM   #1
Member
 
Bronxgodzilla's Avatar
 
Join Date: Jun 2008
Posts: 66
Rep Power: 5
Bronxgodzilla is on a distinguished road
Default How to make Horizontal Feature Listings 3 Rows deep?

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
Bronxgodzilla is offline   Reply With Quote
Old 03-05-2009, 05:51 AM   #2
Moderator
 
 
Join Date: Mar 2008
Posts: 810
Rep Power: 22
seymourjames has a spectacular aura about
Default

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.
__________________
TemplateCodes.com
seymourjames is offline   Reply With Quote
Old 03-05-2009, 06:01 AM   #3
Member
 
Bronxgodzilla's Avatar
 
Join Date: Jun 2008
Posts: 66
Rep Power: 5
Bronxgodzilla is on a distinguished road
Thumbs up

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
Bronxgodzilla is offline   Reply With Quote
Old 03-05-2009, 06:03 AM   #4
Moderator
 
 
Join Date: Mar 2008
Posts: 810
Rep Power: 22
seymourjames has a spectacular aura about
Default

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.
__________________
TemplateCodes.com
seymourjames is offline   Reply With Quote
Old 03-06-2009, 04:32 AM   #5
Member
 
Bronxgodzilla's Avatar
 
Join Date: Jun 2008
Posts: 66
Rep Power: 5
Bronxgodzilla is on a distinguished road
Default

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:
/Templates_c/^Rounded-Blue^user^%%86^864^8644F0D6%%home.tpl.php
which was the only file which actually worked to make the change. I am not totally sure I did the right thing, though.


Code:
<h3><?php echo @LANG_FEATURED_LISTINGS; ?>
</h3>
<?php echo smarty_function_css_feature_listings_horizontal(array('number' => 15), $this);?>
I changed the original number of 5 to be 15 -- but though it works, this cannot be right....

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.
Bronxgodzilla is offline   Reply With Quote
Old 03-06-2009, 05:26 AM   #6
Moderator
 
 
Join Date: Mar 2008
Posts: 810
Rep Power: 22
seymourjames has a spectacular aura about
Default

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.
__________________
TemplateCodes.com
seymourjames is offline   Reply With Quote
Old 03-06-2009, 05:41 AM   #7
Member
 
Bronxgodzilla's Avatar
 
Join Date: Jun 2008
Posts: 66
Rep Power: 5
Bronxgodzilla is on a distinguished road
Default

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
Bronxgodzilla is offline   Reply With Quote
Old 03-06-2009, 05:52 AM   #8
Moderator
 
 
Join Date: Mar 2008
Posts: 810
Rep Power: 22
seymourjames has a spectacular aura about
Default

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.
__________________
TemplateCodes.com
seymourjames is offline   Reply With Quote

Bookmarks

Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 06:15 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0