BOARDS

planetluc.com discussion board

all about the planetlu.com scripts

You are not logged in.

Announcement

I had to clean the boards due to massive spam. Actually i deleted everything /-one after 1st Oct 2008. It was the only way to get this spam out of the boards. So i'm sorry for all serious users who registered/posted meanwhile.
  • Index
  •  » RateMe
  •  » rate me script. random image display

#1 09-11-2006 19:19:42

sensualmystiqueinc
New member
Registered: 09-11-2006
Posts: 3

rate me script. random image display

Hi Lukas,

can you please teach us on how to make the image display randomly?

Regard,

Vincent

Offline

 

#2 10-11-2006 10:14:46

admin
Administrator
From: Winterhur, Zurich, Switzerland
Registered: 25-11-2004
Posts: 462
Website

Re: rate me script. random image display

Well, open the vote.inc.php file, goto about line 46 an uncomment the 7 following lines.

That should make the script display the pictures in random order.

Offline

 

#3 10-11-2006 10:23:15

sensualmystiqueinc
New member
Registered: 09-11-2006
Posts: 3

Re: rate me script. random image display

Hi Luksa,

I am not really good with programming.  But I think below are the code that you are talking about:

---------------
/*srand(time());                  // display items in random order
$showid=rand(1, $numrows);
if (isset($lastitem) && $lastitem!=""){
    while ($lastitem==$showid && $numrows>1){
        $showid=rand(1,$numrows);
    }
}*/
---------------

What exactly do I need to change when you said "uncomment the 7 following lines?

Last edited by sensualmystiqueinc (10-11-2006 10:29:37)

Offline

 

#4 10-11-2006 10:29:12

admin
Administrator
From: Winterhur, Zurich, Switzerland
Registered: 25-11-2004
Posts: 462
Website

Re: rate me script. random image display

do that:

Code:

srand(time());
$showid=rand(1, $numrows);
if (isset($lastitem) && $lastitem!=""){
    while ($lastitem==$showid && $numrows>1){
        $showid=rand(1,$numrows);
    }
}

Offline

 
  • Index
  •  » RateMe
  •  » rate me script. random image display

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson

 
 
© 2003-2010 by planetluc.com · Bachtelstrasse 104 · CH-8400 Winterthur | Support | Login |