Related Topics


[Video CMS v4]Pagination  (Read 592 times) Print

1 B


SonicSync  March 03, 2014, 10:20:58 AM

How to add pagination to the script and remove the auto load of more videos on scroll in Browse, Most Viewed etc?

Logged



SonicSync  March 04, 2014, 06:23:03 AM

Hi Alex,

I tried that, it works for Channels, but wont work for Browse and other functions fetching from com_videolist.php.

I need a working code like 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 ."')");

Above worked for channels, need something like that for the com_videolist.php.

regards

Logged


SonicSync  March 04, 2014, 06:40:39 AM

nevermind got it, here is the code, add this code to the com_videolist.php:

Code
//Count
$count = $cachedb->get_row("Select count(*) as nr from ".DB_PREFIX."videos where pub > 0 ");


Logged


Alexander  March 04, 2014, 03:46:59 PM

$count information should be sent from the component, as it's not a global count.

Logged

fourdeltaOne  July 05, 2014, 02:18:55 PM

may suggest? how to hide blocks on the next page?

example:  originally displayed in the category
top video views in this section and then recently added videos.

how to make the transition to the next page last added video did not show hide top video views!

hide blocks in the next page pagination.

roughly tried this method  :)

Code
	
if(pagination){

TOP VIDEOS VIEWS (block)


Recent Uploads Video (block)

} else {

Recent Uploads Video (block)

}

not turned!  please help!  :'(






Logged
Skype: epic.mediauz


Alexander  July 05, 2014, 03:59:40 PM

I don't understand at all what you need.

Logged

fourdeltaOne  July 05, 2014, 09:18:03 PM

I'm sorry it's hard to explain because I do not know English and translate through Google  :'(

overall I remade the channel latest videos.

1) disable infinite scrolling and  pagination included
2) in each category display the most viewed video on this category!

Question! . I need to hide the most viewed video in the transition to the next page!


site.com/channel/movie-trailers/6/ - front page

Quote
is displayed in the category
1) top most viewed video
2) latest videos

site.com/channel/movie-trailers/6/&p=2 - the second page, and so on

Quote
is displayed in the category
1) top most viewed video - in the following pages, hidden
2) latest videos

Logged
Skype: epic.mediauz


Alexander  July 07, 2014, 08:26:30 PM

Code
If(this_page() <> 1) {
//No longer on first page
}

This?

Logged

fourdeltaOne  July 07, 2014, 11:56:03 PM

Thank you very much Alex!    :D :D ;D ;D :)

Logged
Skype: epic.mediauz