Subversion Repositories instagram

[/] [modules/] [ig/] [feed.php] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ffruehstueck
<?php
2
 
3
$http = eZHTTPTool::instance();
4
$http = eZHTTPTool::instance();
5
$tpl = eZTemplate::factory();
6
 
7
$Module = $Params['Module'];
8
$userID = $Params['UserID'];
9
$offset = $Params['Offset'];
10
 
11
if( eZPreferences::value( 'admin_ig_feed_list_limit' ) )
12
{
13
    switch( eZPreferences::value( 'admin_ig_feed_list_limit' ) )
14
    {
15
        case '2': { $limit = 25; } break;
16
        case '3': { $limit = 50; } break;
17
        default:  { $limit = 10; } break;
18
    }
19
}
20
else
21
{
22
    $limit = 10;
23
}
24
 
25
 
26
 
27
$photoCount = eZIGPhotos::fetchCountByUser( $userID );
28
$photoArray = eZIGPhotos::fetchAllByUser( $userID, $offset, $limit );
29
 
30
$tpl->setVariable( 'object_array', $photoArray );
31
$tpl->setVariable( 'object_count', $photoCount );
32
$tpl->setVariable( 'number_of_items', $limit );
33
 
34
 
35
$Result = array();
36
$Result['left_menu'] = "design:ig/backoffice_left_menu.tpl";
37
$Result['content'] = $tpl->fetch( 'design:ig/feed.tpl' );
38
$Result['path'] = array( array( 'text' => 'Instagram',
39
                                'url' => false ),
40
                                                 array( 'text' => 'Feed',
41
                                'url' => false ) );
42
 
43
return $Result;
44