| 38 |
// loads function for frontpage component |
// loads function for frontpage component |
| 39 |
if ( $option == 'com_frontpage' ) { |
if ( $option == 'com_frontpage' ) { |
| 40 |
//frontpage( $option, $gid, $pop, $now ); |
//frontpage( $option, $gid, $pop, $now ); |
| 41 |
$cache->call( 'frontpage', $gid, $access, $pop); |
$cache->call( 'frontpage', $gid, $access, $pop, $limit, $limitstart); |
| 42 |
return; |
return; |
| 43 |
} |
} |
| 44 |
|
|
| 60 |
break; |
break; |
| 61 |
|
|
| 62 |
case 'blogsection': |
case 'blogsection': |
| 63 |
$cache->call('showBlogSection', $id, $gid, $access, $pop); |
$cache->call('showBlogSection', $id, $gid, $access, $pop, $limit, $limitstart ); |
| 64 |
break; |
break; |
| 65 |
|
|
| 66 |
case 'blogcategorymulti': |
case 'blogcategorymulti': |
| 67 |
case 'blogcategory': |
case 'blogcategory': |
| 68 |
$cache->call( 'showBlogCategory', $id, $gid, $access, $pop ); |
$cache->call( 'showBlogCategory', $id, $gid, $access, $pop, $limit, $limitstart ); |
| 69 |
break; |
break; |
| 70 |
|
|
| 71 |
case 'archivesection': |
case 'archivesection': |
| 106 |
break; |
break; |
| 107 |
|
|
| 108 |
default: |
default: |
| 109 |
$cache->call('showBlogSection', 0, $gid, $access, $pop); |
$cache->call('showBlogSection', 0, $gid, $access, $pop, $limit, $limitstart ); |
| 110 |
break; |
break; |
| 111 |
} |
} |
| 112 |
|
|
| 136 |
} |
} |
| 137 |
} |
} |
| 138 |
|
|
| 139 |
function frontpage( $gid, &$access, $pop) { |
function frontpage( $gid, &$access, $pop, $limit, $limitstart) { |
| 140 |
global $database, $mainframe, $my, $Itemid; |
global $database, $mainframe, $my, $Itemid; |
| 141 |
global $mosConfig_offset; |
global $mosConfig_offset; |
| 142 |
|
|
| 179 |
// Dynamic Page Title |
// Dynamic Page Title |
| 180 |
$mainframe->SetPageTitle( $header ); |
$mainframe->SetPageTitle( $header ); |
| 181 |
|
|
| 182 |
BlogOutput( $rows, $params, $gid, $access, $pop, $menu ); |
BlogOutput( $rows, $params, $gid, $access, $pop, $menu, null, $limit, $limitstart ); |
| 183 |
} |
} |
| 184 |
|
|
| 185 |
|
|
| 475 |
} // showCategory |
} // showCategory |
| 476 |
|
|
| 477 |
|
|
| 478 |
function showBlogSection( $id=0, $gid, &$access, $pop ) { |
function showBlogSection( $id=0, $gid, &$access, $pop, $limit, $limitstart ) { |
| 479 |
global $database, $mainframe, $mosConfig_offset, $Itemid, $option, $task; |
global $database, $mainframe, $mosConfig_offset, $Itemid, $option, $task; |
| 480 |
|
|
| 481 |
$noauth = !$mainframe->getCfg( 'shownoauth' ); |
$noauth = !$mainframe->getCfg( 'shownoauth' ); |
| 566 |
for($i=0; $i<count($rows); $i++) $rows[$i]->section = ''; |
for($i=0; $i<count($rows); $i++) $rows[$i]->section = ''; |
| 567 |
} |
} |
| 568 |
|
|
| 569 |
BlogOutput( $rows, $params, $gid, $access, $pop, $menu ); |
BlogOutput( $rows, $params, $gid, $access, $pop, $menu, null, $limit, $limitstart ); |
| 570 |
} |
} |
| 571 |
|
|
| 572 |
function showBlogCategory( $id=0, $gid, &$access, $pop ) { |
function showBlogCategory( $id=0, $gid, &$access, $pop, $limit, $limitstart ) { |
| 573 |
global $database, $mainframe, $mosConfig_offset, $Itemid; |
global $database, $mainframe, $mosConfig_offset, $Itemid; |
| 574 |
|
|
| 575 |
$noauth = !$mainframe->getCfg( 'shownoauth' ); |
$noauth = !$mainframe->getCfg( 'shownoauth' ); |
| 617 |
// Dynamic Page Title |
// Dynamic Page Title |
| 618 |
$mainframe->SetPageTitle( $menu->name ); |
$mainframe->SetPageTitle( $menu->name ); |
| 619 |
|
|
| 620 |
BlogOutput( $rows, $params, $gid, $access, $pop, $menu ); |
BlogOutput( $rows, $params, $gid, $access, $pop, $menu, null, $limit, $limitstart ); |
| 621 |
} |
} |
| 622 |
|
|
| 623 |
function showArchiveSection( $id=NULL, $gid, &$access, $pop, $option ) { |
function showArchiveSection( $id=NULL, $gid, &$access, $pop, $option ) { |
| 789 |
} |
} |
| 790 |
|
|
| 791 |
|
|
| 792 |
function BlogOutput ( &$rows, &$params, $gid, &$access, $pop, &$menu, $archive=NULL ) { |
function BlogOutput ( &$rows, &$params, $gid, &$access, $pop, &$menu, $archive=NULL, $limit = 0, $limitstart = 0 ) { |
| 793 |
global $mainframe, $Itemid, $task, $id, $option, $database, $mosConfig_live_site; |
global $mainframe, $Itemid, $task, $id, $option, $database, $mosConfig_live_site; |
| 794 |
|
|
| 795 |
// parameters |
// parameters |
| 820 |
$total = count( $rows ); |
$total = count( $rows ); |
| 821 |
|
|
| 822 |
// pagination support |
// pagination support |
| 823 |
|
if (!$limitstart){ |
| 824 |
$limitstart = intval( mosGetParam( $_REQUEST, 'limitstart', 0 ) ); |
$limitstart = intval( mosGetParam( $_REQUEST, 'limitstart', 0 ) ); |
| 825 |
|
} |
| 826 |
$limit = $intro + $leading + $links; |
$limit = $intro + $leading + $links; |
| 827 |
if ( $total <= $limit ) { |
if ( $total <= $limit ) { |
| 828 |
$limitstart = 0; |
$limitstart = 0; |