This is for version 1.7.1,this is not an issue in 1.7.2b
izap_video>pages>actions>all.php
old php file:
<?php
/**
* iZAP izap_videos
*
* @package Elgg videotizer, by iZAP Web Solutions.
* @license GNU Public License version 3
* @Contact iZAP Team "<support@izap.in>"
* @Founder Tarun Jangra "<tarun@izap.in>"
* @link http://www.izap.in/
* @version 3.62b
*/
if(isloggedin() && !$page_owner = page_owner()) {
set_page_owner(get_loggedin_userid());
}
//resolve deprecated function
if(is_callable('elgg_list_entities'))
$list_entities = elgg_list_entities(array('types' => 'object','subtypes' => 'izap_videos', 'container_guids' => $page_owner->guid,'full_view' => false));
else
$list_entities = list_entities('object','izap_videos',$page_owner->guid,10,false);
// get page contents
$area2 = elgg_view_title(elgg_echo('izap_videos:all'));
if(empty($list_entities)){
$area2 .= elgg_view('izap_videos/notfound');
}else{
$area2 .= $list_entities;
}
$area2 .= elgg_view('izap_videos/izapLink');
// get tags and categories
$area3 = elgg_view('izap_videos/area3');
// finally draw page
page_draw(sprintf(elgg_echo('izap_videos:all'),$page_owner->name), elgg_view_layout("two_column_left_sidebar", '', $area2, $area3));
new php file(all.php)
<?php
/**
* iZAP izap_videos
*
* @package Elgg videotizer, by iZAP Web Solutions.
* @license GNU Public License version 3
* @Contact iZAP Team "<support@izap.in>"
* @Founder Tarun Jangra "<tarun@izap.in>"
* @link http://www.izap.in/
* @version 3.62b
* izap_videos/pages/actions/all.php
*/
if(isloggedin() && !$page_owner = page_owner()) {
set_page_owner(get_loggedin_userid());
}
$limit = get_input("limit", 10);
$offset = get_input("offset", 0);
//resolve deprecated function
if(is_callable('elgg_list_entities'))
$list_entities =
elgg_list_entities
(
array
(
'types' => 'object'
,'subtypes' => 'izap_videos'
,'container_guids' => $page_owner->guid
,'limit' => $limit
,'offset' => $offset
,'full_view' => false
)
);
else
$list_entities =
list_entities
(
'object'
,'izap_videos'
,$page_owner->guid
,10
,false
);
// get page contents
$area2 = elgg_view_title(elgg_echo('izap_videos:all'));
if(empty($list_entities)){
$area2 .= elgg_view('izap_videos/notfound');
}else{
$area2 .= $list_entities;
}
$area2 .= elgg_view('izap_videos/izapLink');
// get tags and categories
$area3 = elgg_view('izap_videos/area3');
// finally draw page
page_draw(sprintf(elgg_echo('izap_videos:all'),$page_owner->name), elgg_view_layout("two_column_left_sidebar", '', $area2, $area3));
?>
Then:
izap_video>pages>actions>list.php
Old file
<?php
/**
* iZAP izap_videos
*
* @package Elgg videotizer, by iZAP Web Solutions.
* @license GNU Public License version 3
* @Contact iZAP Team "<support@izap.in>"
* @Founder Tarun Jangra "<tarun@izap.in>"
* @link http://www.izap.in/
* @version 3.62b
*/
$page_owner = page_owner_entity();
//resolve deprecated function
if(is_callable('elgg_list_entities'))
$list_entities = elgg_list_entities(Array('types' => 'object','subtypes' => 'izap_videos','container_guid' => $page_owner->guid, 'full_view' => false));
else
$list_entities = list_entities('object','izap_videos',$page_owner->guid,10,false);
if($page_owner == $_SESSION['user'])
$area2 = elgg_view_title(elgg_echo('izap_videos:videos'));
elseif($page_owner)
$area2 = elgg_view_title(sprintf(elgg_echo('izap_videos:user'),$page_owner->name));
// get page contents
if(empty($list_entities)){
$area2 .= elgg_view('izap_videos/notfound');
}else{
$area2 .= $list_entities;
}
$area2 .= elgg_view('izap_videos/izapLink');
// get tags and categories
$area3 = elgg_view('izap_videos/area3');
// finally draw page
page_draw(sprintf(elgg_echo('izap_videos:all'),$page_owner->name), elgg_view_layout("two_column_left_sidebar", '', $area2, $area3));
New file (list.php)
<?php
/**
* iZAP izap_videos
*
* @package Elgg videotizer, by iZAP Web Solutions.
* @license GNU Public License version 3
* @Contact iZAP Team "<support@izap.in>"
* @Founder Tarun Jangra "<tarun@izap.in>"
* @link http://www.izap.in/
* @version 3.62b
* izap_videos/pages/actions/list.php
*/
$page_owner = page_owner_entity();
$limit = get_input("limit", 10);
$offset = get_input("offset", 0);
//resolve deprecated function
if(is_callable('elgg_list_entities'))
$list_entities =
elgg_list_entities
(
array
(
'types' => 'object'
,'subtypes' => 'izap_videos'
,'container_guids' => $page_owner->guid
,'limit' => $limit
,'offset' => $offset
,'full_view' => false
)
);
else
$list_entities =
list_entities
(
'object'
,'izap_videos'
,$page_owner->guid
,10
,false
);
if($page_owner == $_SESSION['user'])
$area2 = elgg_view_title(elgg_echo('izap_videos:videos'));
elseif($page_owner)
$area2 = elgg_view_title(sprintf(elgg_echo('izap_videos:user'),$page_owner->name));
// get page contents
if(empty($list_entities)){
$area2 .= elgg_view('izap_videos/notfound');
}else{
$area2 .= $list_entities;
}
$area2 .= elgg_view('izap_videos/izapLink');
// get tags and categories
$area3 = elgg_view('izap_videos/area3');
// finally draw page
page_draw(sprintf(elgg_echo('izap_videos:all'),$page_owner->name), elgg_view_layout("two_column_left_sidebar", '', $area2, $area3));
?>
Thanks to DhrupDeScoop
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- iionly@iionly
iionly - 0 likes
- patriot@patriot
patriot - 0 likes
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
- iionly@iionly
iionly - 0 likes
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
- iionly@iionly
iionly - 0 likes
- iZAP@izap
iZAP - 0 likes
You must log in to post replies.Thanks. Interesting... I thought limit and offset would have default values...
No problem...
1.7.1 defaults to 0, 10 for offset, limit
So... it should have worked in 1.7.1 without setting it explicitly?
could not work at all.. b/c if you clicked on paginated links - e.g. http://MyDomain.net/test/pg/videos/all/?offset=10 --> the offset was not grabbed, so display would always stay at the first page - never moving away from 0, 10 ;- (
Thanks. Now I get it. I believe there was a similar problem with the sent messages folder (core plugin... already fixed).
It has been fixed in the newer version of izap_videos 3.7b version