View Full Version : random listings
stevebullman
05-31-2008, 12:44 PM
Hi, been using vbadvanced for a while now, and have just installed vb links which i think is a great piece of software. What I would like to do though is have the listings appear in a random order....ive found the part in the control panel which relates to this but there is no random option. is there a mod i can install? Im charging for links so this is an important feature for me.
thanks
Brian
05-31-2008, 04:13 PM
Are you running v2 or v3? I see v2 on your site, but you've posted in the v3 forums... Either way, for v2 you would need to look in your links/browselinks.php file for this line (around line #588):
$linkids = array();
And add this just Above it:
if (!$_REQUEST['orderby'])
{
$orderby = 'RAND()';
$condition['doorderby'] = 'RAND()';
}
If you're running v3, then you can just add a new plugin to the 'vba_links_browselinks_default' hook location with the code from above as the 'Plugin PHP Code'.
stevebullman
05-31-2008, 04:15 PM
ahhh im sorry, i just assumed i had installed the latest version...i'll try this, thanks
stevebullman
05-31-2008, 05:35 PM
all sorted ta.
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.