PDA

View Full Version : Randomize recommended links?


mtg169
11-17-2008, 09:43 PM
Is there anyway to randomize the display/order of recommended links? For example, say I have 5 recommended links for the keyword "test" and I have it limited to show up to 2 recommended links per search query.

Right now it appears that the same top 2 recommended links for the keyword will always show no matter what unless I manually change the order. Is there functionality to randomly display ANY 2 links out of the 5 randomly rather than only displaying the top 2 or whatever I set the limit at?

Essentially I'd like to use it as a type of lead generator, but I don't want the same links showing all the time and would like it done randomly so there is no favoritism.

wrensoft
11-17-2008, 09:52 PM
There is no function to display a random sub-set of results. You would need to write your own code to do this.

forexsystemprofi
11-18-2008, 11:54 AM
Maybe someone already wrote something like this? Plz help...

firstrebel
11-18-2008, 04:46 PM
Doesn't this defeat the purpose of recommended links?

Bob

wrensoft
11-18-2008, 06:58 PM
We are not aware of anyone writing code for this (or even asking for this) in the past.

mtg169
11-18-2008, 08:02 PM
I don't see how it would defeat the purpose of recommended links. Essentially all I want to do is say if I have 5 recommended links for a keyword and the limit to display is only 2, I don't want the top 2 in the list to always display, but have 2 out of the 5 display randomly. The way it is coded now, you can have an unlimited amount of recommended links for a single keyword, if the amount of links exceed the limit to display, only the top x links will always show where x is the display limit and the rest of the recommended links are essentially ignored and never displayed.

I will look into customizing this code to display randomly:
' Show recommended links if any
Dim num_recs_found
num_recs_found = 0
if (Recommended = 1) then
...
if (num_recs_found > 0) then
Response.Write("</div>")
end if
end if