I'm interested in Including your own posts on friends wall.
In the function serviceViewBlockAccountTimeline with the query that I marked in red, the friends are obtained to show their publications.
385 {
386 $sOrderBy = '';
387 $sWhereParam = "AND p.`Status`='Active' " . $sWhereParam;
388
389 switch($sSortParam) {
390
391 case 'activity' :
392 case 'last_nav' : // DateLastNav
393 $sOrderBy = 'ORDER BY p.`DateLastNav`';
394 break;
395 case 'activity_desc' :
396 case 'last_nav_desc' : // DateLastNav
397 $sOrderBy = 'ORDER BY p.`DateLastNav` DESC';
398 break;
399 case 'date_reg' : // DateReg
400 $sOrderBy = 'ORDER BY p.`DateReg`';
401 break;
402 case 'date_reg_desc' : // DateReg
403 $sOrderBy = 'ORDER BY p.`DateReg` DESC';
404 break;
405 case 'image' : // Avatar
406 $sOrderBy = 'ORDER BY p.`Avatar` DESC';
407 break;
408 case 'rate' : // Rate and RateCount
409 $sOrderBy = 'ORDER BY p.`Rate` DESC, p.`RateCount` DESC';
410 break;
411 default : // DateLastNav
412 $sOrderBy = 'ORDER BY p.`DateLastNav` DESC';
413 break;
414 }
415
416 $sLimit = ($sqlLimit == '') ? '' : /*"LIMIT 0, " .*/ $sqlLimit;
418 $sqlQuery = "SELECT `p`.*, `f`.`ID`,
419 if(`DateLastNav` > SUBDATE(NOW( ), INTERVAL $iOnlineTime MINUTE ), 1, 0) AS `is_online`,
420 UNIX_TIMESTAMP(p.`DateLastLogin`) AS 'TS_DateLastLogin', UNIX_TIMESTAMP(p.`DateReg`) AS 'TS_DateReg' FROM (
421 SELECT `ID` AS `ID` FROM `sys_friend_list` WHERE `Profile` = '{$iID}' AND `Check` =1
422 UNION
423 SELECT `Profile` AS `ID` FROM `sys_friend_list` WHERE `ID` = '{$iID}' AND `Check` =1
424 ) AS `f`
425 INNER JOIN `Profiles` AS `p` ON `p`.`ID` = `f`.`ID`
426 WHERE 1 {$sWhereParam}
427 {$sOrderBy}
428 {$sLimit}";
429
430 $aFriends = array();
431
432 $vProfiles = db_res($sqlQuery);
433 while ($aProfiles = mysql_fetch_assoc($vProfiles)) {
434 $aFriends[$aProfiles['ID']] = array($aProfiles['ID'], $aProfiles['TS_DateLastLogin'], $aProfiles['TS_DateReg'],$aProfiles['Rate'], $aProfiles['DateLastNav'], $aProfiles['is_online']);
435 }
436
437 return $aFriends;
438 }
How can I include the owner of the wall so that their posts are also displayed?