Related Topics


[Video CMS v4]Pagination instead of infinite loop  (Read 1010 times) Print

1 B


mihai  December 12, 2014, 05:33:57 PM

I want to have isntead of infinite loop a pagination(the page slows down when you are using infinite loop) so i want to know what should i edit to have that
I have infinite loop on Browse videos and user profile videos at uploaded
Tx!!!

Logged


@Mario  December 12, 2014, 09:58:16 PM

Search Pagination using the search form.

Logged
Hello!
If you wish to learn how to start coding on the PHPVibe Video CMS head to the blog.

Please use the search before opening a new topic!


mihai  December 12, 2014, 11:00:34 PM

Ok i solved for Browse but i i didn't solved for the profile videolist so for this i edited like this in user.videos.php-->
Code
$kill_infinite = true;
include_once(TPL.'/video-loop.php');
$a = new pagination;
$a->set_current(this_page());
$a->set_first_page(true);
$a->set_pages_items(7);
$a->set_per_page(bpp());
$a->set_values($count->nr);
$a->show_pages($canonical.'&p=');
and in com_profil i added this---->
Code
//Count
$count = $cachedb->get_row("Select count(*) as nr from ".DB_PREFIX."videos where category in (select cat_id from ".DB_PREFIX."channels where cat_id='".$id ."' or child_of = '".$id ."')");

why is not working:)?

http://gamevide.com/profile/endowed/1/


btw the activity filter is not working

Logged


@Mario  December 13, 2014, 06:41:35 PM

You are querying for channel videos in a profile...


If you use ultima you already have the count from this query:


Code
$vd = $cachedb->get_row("SELECT count(*) as nr FROM ".DB_PREFIX."videos where user_id='".$profile->id."'");


All you need is to use
Code
$vd->nr
for the number of videos the user has.

Logged
Hello!
If you wish to learn how to start coding on the PHPVibe Video CMS head to the blog.

Please use the search before opening a new topic!