PDA

View Full Version : m2script - graphic script.


ladee_tee
July 25th, 2008, 09:03 PM
Is there any way to make the script show in order?

like the newest at the first and the oldest at the back
but make it in order ?

NOW THIS IS WHAT IT DOES.
It shows the newest at the first page and the oldest last
BUT. it isn't in order like 01 , 02 , 03, 04 instead it's like 01 , 03 , 04 , 02

How do I make it to where it just shows the newest first in order like
50 51 52 53 not like 50 52 53 51

If you understand , Thanks.

ladee_tee
July 26th, 2008, 01:39 PM
Anyone ? :helpsmilie:

Charlotte
July 26th, 2008, 01:42 PM
I'm not using this on my site atm but i think it's
closedir($hook);
natcasesort($files);
rsort($files);$files = array_values($files);

which makes them in order. not sure though

ladee_tee
July 26th, 2008, 07:36 PM
I'm not using this on my site atm but i think it's
closedir($hook);
natcasesort($files);
rsort($files);$files = array_values($files);

which makes them in order. not sure though

Where do i put that code at? Sorry I'm a noob.

marshall_26
July 26th, 2008, 07:58 PM
I'm not using this on my site atm but i think it's
closedir($hook);
natcasesort($files);
rsort($files);$files = array_values($files);

which makes them in order. not sure though

no need to sort them twice, use one or the other ;)

ladee_tee
July 31st, 2008, 09:35 AM
no need to sort them twice, use one or the other ;)

closedir($hook);
natcasesort($files);
rsort($files);$files = array_values($files);


which code do i take off that you said no need to sort them twice?

ladee_tee
July 31st, 2008, 10:54 AM
Ughhhhh. Just re-tried this.
It doesn't work.
Does anyone know the working one?

Kasami2k4
July 31st, 2008, 11:14 PM
closedir($hook);
array_values($files);
natcasesort($files);

Thats what marsh means -_-

Love*
July 31st, 2008, 11:28 PM
rsort only arranges the files in reverse.. like d c b a instead of a b c d..

If you want to arrange your images based on date of upload (newest images first), follow this thread:
http://myspacepros.com/forum/showthread.php?t=21140

ladee_tee
July 31st, 2008, 11:30 PM
I want it like in order..

Lets say that 01 is the first number right?


then it would be

01 02 03 04 05

but mine is like this , even if i upload it last. it's like this.

01 02 04 07 09 10 100 104

so it is irritating you know what i mean?

CharmRoyal
July 31st, 2008, 11:31 PM
Well Tiara you can't have it in order AND sorted by the newest uploads first?

It wouldn't work... do you get what I mean? :(

Love*
July 31st, 2008, 11:41 PM
I don't really understand what you want, but perhaps try this:

closedir($hook);
ksort($files);$files = array_values($files);

It sorts alphabetically or numerically..

CharmRoyal
July 31st, 2008, 11:43 PM
Plus it will not upload in order anyway, well not the way you want

Since you have your files named like 01 02 03

It will be

01
02
03
04
05
06
07
08
09
10
100
101

You'd have to have the files have like 0001, 0002 0100

:pinch:

ladee_tee
August 1st, 2008, 04:17 AM
Plus it will not upload in order anyway, well not the way you want

Since you have your files named like 01 02 03

It will be

01
02
03
04
05
06
07
08
09
10
100
101

You'd have to have the files have like 0001, 0002 0100

:pinch:

Ohhh I get you.
That sucks then. LOL.