PDA

View Full Version : Index limit


Joking.ws
03-25-2006, 11:49 PM
Hey,
Is there any way of removing the limit of videos displayed on the index page?
As I have so few videos at the moment, I'd prefer not to categorize them as yet.

Thanks,
www.Joking.ws (http://www.joking.ws)

Joking.ws
03-26-2006, 12:09 AM
Nevermind, worked it out for myself. :p

If anyone else would like to know how:


Open "index.php"
Find: $videos_query = mysql_query ("SELECT * FROM videos ORDER BY title LIMIT 0, 10");
Remove: LIMIT 0, 10


Regards,
joking.ws (http://www.joking.ws). :)

EDIT: Another fun little "mod". To arrange videos by popularity (# of views)


Open "index.php"
Find: $videos_query = mysql_query ("SELECT * FROM videos ORDER BY title LIMIT 0, 10");
Edit to: $videos_query = mysql_query ("SELECT * FROM videos ORDER BY views DESC LIMIT 0,10");

Ryan
03-26-2006, 03:23 AM
Thanks for the great explaination.

teddy
04-01-2006, 01:01 AM
I have done my index, descending, limit 0, 10 ...

What i wanted to know ryan, is what could we do to possibly have at the bottom right of the main page, a page 1,2,3,4,5, 7-151 etc. type of thing?

So in other words, you list the Descending limit, 0, whatever you want on your first page, and then each other page would have that many videos, but it would break out and list pages at the bottom.

Ryan
04-01-2006, 01:15 AM
Yes, I know what you mean... That's called pagination and it's coming next version.

circlecity
04-10-2006, 11:05 PM
How would this be done with the version 2 software?



EDIT: Another fun little "mod". To arrange videos by popularity (# of views)


Open "index.php"
Find: $videos_query = mysql_query ("SELECT * FROM videos ORDER BY title LIMIT 0, 10");
Edit to: $videos_query = mysql_query ("SELECT * FROM videos ORDER BY views DESC LIMIT 0,10");
[/QUOTE]

Ryan
04-11-2006, 02:27 AM
Actually for this to work in version 2, check your settings. This is already built in to all the pages.

circlecity
04-11-2006, 11:23 AM
I'm talking about listing them in different ways like "views" date added. this isn't in the settings yet like mvscript.

Ryan
04-12-2006, 02:23 AM
Yea, I understand.

123humor
04-28-2006, 07:45 AM
I sorted the index so that the newest files are on top.

$files_query = mysql_query ("SELECT * FROM files WHERE approved = 1 AND added <= '" . time() . "' ORDER BY added DESC LIMIT ".$start.", ".$humor_software['limit']);

What file does this inside a category?

Ryan
04-28-2006, 12:53 PM
Yes that's exactly the fix, but you'll need to modify each file that has that main query in it.

What do you mean what file does this inside a category?

circlecity
04-28-2006, 03:43 PM
It's in the category.php file. you need to add "DESC" after the added