Commit 71da8e15 authored by nkoth's avatar nkoth

[NEW] All display of "who viewed my stuff" on user information page (part 2/2)

parent d4e0e68a
......@@ -280,6 +280,26 @@
</div>
{/tab}{/if}
{if $prefs.feature_actionlog eq 'y' && $prefs.user_who_viewed_my_stuff eq 'y'}
{tab name="{tr}Who Looks At Your Stuff?{/tr}"}
<div class="simplebox">
<h2 class="center">{tr}Who Looks At Your Stuff?{/tr}</h2>
{cycle values="even,odd" print=false}
{section name=ix loop=$whoviewed}
<div class="clearfix {cycle}">
<div class="form floatleft">
{$whoviewed[ix].user|userlink} - {$whoviewed[ix].lastViewed|tiki_short_datetime}
</div>
<div class="form floatright">
<a href="{$whoviewed[ix].link|escape:url}">{$whoviewed[ix].object|escape} ({$whoviewed[ix].objectType|escape})</a>
</div>
</div>
{/section}
</div>
{/tab}
{/if}
{if $user and $prefs.feature_messages eq 'y' and $tiki_p_messages eq 'y' and $allowMsgs eq 'y'}{tab name="{tr}Send Me A Message{/tr}"}
<div id="message" class="simplebox">
{if $sent}
......
......@@ -143,6 +143,40 @@ if ($prefs['feature_display_my_to_others'] == 'y') {
$user_forum_topics = $commentslib->get_user_forum_comments($userwatch, -1, 'topics');
$smarty->assign_by_ref('user_forum_topics', $user_forum_topics);
}
if ($prefs['user_who_viewed_my_stuff'] == 'y') {
$mystuff = array();
if (isset($user_pages)) {
$stuffType = 'wiki page';
foreach ($user_pages as $obj) {
$mystuff[] = array( 'object' => $obj["pageName"], 'objectType' => $stuffType, 'comment' => '' );
}
}
if (isset($user_blogs)) {
$stuffType = 'blog';
foreach ($user_blogs as $obj) {
$mystuff[] = array( 'object' => $obj["blogId"], 'objectType' => $stuffType, 'comment' => '' );
}
}
if (isset($user_articles)) {
$stuffType = 'article';
foreach ($user_articles as $obj) {
$mystuff[] = array( 'object' => $obj["articleId"], 'objectType' => $stuffType, 'comment' => '' );
}
}
if (isset($user_forum_topics)) {
$stuffType = 'forum';
foreach ($user_forum_topics as $obj) {
$forum_comment = 'comments_parentId=' . $obj["threadId"];
$mystuff[] = array( 'object' => $obj["object"], 'objectType' => $stuffType, 'comment' => $forum_comment );
}
}
global $logslib;
if (!is_object($logslib)) {
require_once("lib/logs/logslib.php");
}
$whoviewed = $logslib->get_who_viewed($mystuff, false);
$smarty->assign('whoviewed', $whoviewed);
}
}
if ($prefs['user_tracker_infos']) {
// arg passed 11,56,58,68=trackerId,fieldId...
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment