PDA

View Full Version : random listings


stevebullman
05-31-2008, 11:44 AM
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, 03: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'.

Our Sponsors
 

stevebullman
05-31-2008, 03:15 PM
ahhh im sorry, i just assumed i had installed the latest version...i'll try this, thanks

stevebullman
05-31-2008, 04:35 PM
all sorted ta.