Support Forums

Enhancing browse pages with listings

This is a discussion on Enhancing browse pages with listings within the TemplateCodes forums, part of the Third Party Support category; Here is a nice thing some of you may wish to do. There have been several threads about putting listings ...


Go Back   68 Classifieds Forums > Third Party Support > TemplateCodes

This topic is closed.

This topic is closed to new replies.

 
Thread Tools Display Modes
Old 09-02-2009, 07:41 AM   #1
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,342
Rep Power: 84
seymourjames is a jewel in the rough
Default Enhancing browse pages with listings

Here is a nice thing some of you may wish to do. There have been several threads about putting listings on the browse pages etc. You will need the developer version though and this is for version 4.1.5 although something very similar will work for 4.1.4

If you want to have a page of the relevant listings fall under the categories as you click through browse but not on the main browse page itself, go to category.php and make these changes (be aware that upgrading in the future may need to take account of these changes if category.php is upgraded).

Find at about line 28

$showlistings='N';

and replace with

if(isset($_GET['cat']) || isset($_GET['id'])) // set the listings under the browse pages to appear but not for the top level browse page.
{
$showlistings='Y';
}
else
{
$showlistings='N';
}

then find at about line 100

$options['section']=$sec;

and replace with

if(isset($sec))
{
$options['section']=$sec;
}


Now that is nice as it is but if you really want to spice it up it is possible to place a set of css horizontal featured listings at the top of each browse page from that category. Add this line at about line 130 to assign the current categoryID for use

$class_tpl->assign('sec', $sec);


Then in your browse.tpl file add this code to invoke your horizontal featured listings where you want them to show

<h2>{$smarty.const.LANG_FEATURED_LISTINGS}</h2> {css_listings_horizontal number=5 category=$sec type="featured"}

Finally, sometimes you may not have featured listings to show. Why not display a message to encourage people. Open modules/custom_plugins/plugins/ function.css_listings_horizontal.php

Near the bottom you can change the message from

$output .= '<div class="alert">No listings found.</div>';

to something more encouraging

$output .= '<div class="alert">Get your ad featured here!</div>';


You may also want to put a test in when the category will not accept ads. No pint telling people they can put their ad on this page if they can't.


You can of course show a set of new ads with the css horizontal listings function by just replacing the word "featured" with "new" if you prefer.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates & Modules
Get the Best U.S Hosting, Best U.K Hosting
seymourjames is offline  
Old 10-14-2009, 10:28 AM   #2
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,342
Rep Power: 84
seymourjames is a jewel in the rough
Default

Since version 4.1.6 the category ID is now available - this line is no longer required $class_tpl->assign('sec', $sec);


and you can do this for example in your browse.tpl page

<h2>{$smarty.const.LANG_FEATURED_LISTINGS}</h2>
{css_listings_horizontal number=4 category=$categoryid type="featured"}

Nice - you don't need developer version any longer to do this bit either.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates & Modules
Get the Best U.S Hosting, Best U.K Hosting
seymourjames is offline  
Old 10-15-2009, 08:58 AM   #3
Customer
 
damiun's Avatar
 
Join Date: Apr 2009
Posts: 412
Rep Power: 18
damiun is on a distinguished road
Default

Hi,

I edit the files like you said
But for some categories only the featured listings are shown.
And for other, every single listing of the site is shown.
damiun is offline  
Old 10-15-2009, 05:52 PM   #4
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,342
Rep Power: 84
seymourjames is a jewel in the rough
Default

strange - wonder what Eric has to say. The first set of edits were his and it works for me.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates & Modules
Get the Best U.S Hosting, Best U.K Hosting
seymourjames is offline  
Old 10-16-2009, 06:30 AM   #5
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,342
Rep Power: 84
seymourjames is a jewel in the rough
Default

Does just this bit this work without touching the category.php file at all if you put it at the top of your browse.tpl file for example.

<h2>{$smarty.const.LANG_FEATURED_LISTINGS}</h2>
{css_listings_horizontal number=4 category=$categoryid type="featured"}

If it does then try to do the other bits. I tried it again and the code works for me. If you are running 4.1.6 (what version are you running) then you don't need to add this line $class_tpl->assign('sec', $sec);
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates & Modules
Get the Best U.S Hosting, Best U.K Hosting
seymourjames is offline  
Old 11-07-2009, 06:36 PM   #6
Customer
 
Join Date: Oct 2009
Posts: 202
Rep Power: 12
guillopuig is on a distinguished road
Default

James, could you please expand a bit on this.

I am very interested in displaying related featured listings on on the various browse categories. I have version 4.1.6 and am using the default 3 column template.
guillopuig is offline  
Old 11-08-2009, 06:49 AM   #7
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,342
Rep Power: 84
seymourjames is a jewel in the rough
Default

I am unsure how it can be expanded upon. The modifications are in two parts. The first part is a modification which you can do on the default template to show listings below categories on the browse pages (but not the main browse page or it ould be all your listings of course). The second modification is specific to our templates as we provide an add-on which allows you to effectively filter ads per category and type - new, featured, random, etc. Our demo site My Classifieds Website shows you what our css horizontal listings are on the home page.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates & Modules
Get the Best U.S Hosting, Best U.K Hosting
seymourjames is offline  
Old 11-09-2009, 08:57 PM   #8
Customer
 
Join Date: Oct 2009
Posts: 202
Rep Power: 12
guillopuig is on a distinguished road
Default

so i wouldnt be abe to make this mod to my site if i am not using your template system?

i am currently running the default template on 4.1.6.

i am already showing featured listings on the browse.tpl page and wanted to show related listing to the cat being browsed.
guillopuig is offline  
Old 11-10-2009, 05:44 AM   #9
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,342
Rep Power: 84
seymourjames is a jewel in the rough
Default

What part of the proceeding post do you not understand? I can't make it clearer can I. Your questions have been answered and this thread is in the TemplateCodes area.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates & Modules
Get the Best U.S Hosting, Best U.K Hosting
seymourjames is offline  
Old 11-10-2009, 09:12 AM   #10
Customer
 
Join Date: Oct 2009
Posts: 202
Rep Power: 12
guillopuig is on a distinguished road
Default

James, I am sorry if i offended you with my ignorance.

maybe it is that English is not my first language, or that i am not as savvy as others in software language, or maybe i do not understand how you explained the details above or I guess it would be a good time for me to take a break. I've been trying to finish the set up of my site for a week now, sleeping very little. i must be drained.

What ever the case may be, I apologize if have I produced frustration on this beautiful Tuesday morning.

Last edited by guillopuig; 11-10-2009 at 10:21 AM.
guillopuig is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Show Subcategory Ads in Parent Browse Categories Pages cat Customizations 10 01-09-2010 04:23 PM
SEO/Browse Your listings bad urls petey Technical Support 6 01-24-2009 09:10 PM


All times are GMT -4. The time now is 10:05 AM.


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