Support Forums

How to Randomize the featured listing plugin

This is a discussion on How to Randomize the featured listing plugin within the Customizations forums, part of the Developer Forums category; Hi Everyone, Found a neat way to make the featured listings plugin on the home page to show random featured ...


Go Back   68 Classifieds Forums > Developer Forums > Customizations

Reply
 
Thread Tools Display Modes
Old 02-06-2011, 05:04 PM   #1
Customer
 
Join Date: Mar 2008
Location: ireland
Posts: 105
Rep Power: 17
markstanden is on a distinguished road
Default How to Randomize the featured listing plugin

Hi Everyone,

Found a neat way to make the featured listings plugin on the home page to show random featured listings.

If you open the file home.tpl which can be found in your template folder, towards the bottom you will see the following code, yours may differ slightly depending on which template you are using.

{feature_listings_horizontal number=8 cols=4 table_attr='width="100%" cellpadding="3" cellspacing="3"' td_attr='style="border-top: 1px dashed #999;"' order_by='rand()'}

Just change the order by code to whats in RED, save the file and reupload.

This works on v4.1.10

Hope this helps someone, this was something i was trying to achieve for ages and finally got it sorted.

Regards
Mark
__________________
v4.1.10 Developer
markstanden is offline   Reply With Quote
Old 02-06-2011, 06:01 PM   #2
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,330
Rep Power: 83
seymourjames is a jewel in the rough
Default

I thought it already was generating the ads randomly?
__________________
"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   Reply With Quote
Old 02-06-2011, 07:12 PM   #3
Customer
 
Join Date: Mar 2008
Location: ireland
Posts: 105
Rep Power: 17
markstanden is on a distinguished road
Default

Hi David,

Not in the default template, it was sorting by date added, descending. Original code below.


{feature_listings_horizontal number=8 cols=4 table_attr='width="100%" cellpadding="3" cellspacing="3"' td_attr='style="border-top: 1px dashed #999;"' order_by='dateadded' order='desc'}


Mark
__________________
v4.1.10 Developer
markstanden is offline   Reply With Quote
Old 02-06-2011, 10:22 PM   #4
Developer & Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,310
Rep Power: 69
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

That is true for versions 4.1 and earlier, but not in 4.2 and later which is random.
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2,5.0)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Controlling column width and text wrapping in New listing plugin LittleRascal Technical Support 3 02-11-2010 09:34 PM
Featured ad disappears when using SEO plugin spagman Technical Support 1 02-05-2010 08:24 AM
Featured Listing Yasser Technical Support 2 01-26-2010 11:17 AM
Making a specific category to dsiplay info like recent listing smarty plugin. LittleRascal Technical Support 3 11-23-2009 02:07 PM
featured listing wesse249 Technical Support 1 09-11-2008 09:51 AM


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


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