Elgg
Version 1.9
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
views
default
river
object
comment
create.php
Go to the documentation of this file.
1
<?php
6
$item
=
$vars
[
'item'
];
7
8
$comment
=
$item
->getObjectEntity();
9
$subject
=
$item
->getSubjectEntity();
10
$target
=
$item
->getTargetEntity();
11
12
$subject_link
=
elgg_view
(
'output/url'
, array(
13
'href'
=>
$subject
->getURL(),
14
'text'
=>
$subject
->name,
15
'class'
=>
'elgg-river-subject'
,
16
'is_trusted'
=>
true
,
17
));
18
19
$target_link
=
elgg_view
(
'output/url'
, array(
20
'href'
=>
$target
->getURL(),
21
'text'
=>
$target
->getDisplayName(),
22
'class'
=>
'elgg-river-target'
,
23
'is_trusted'
=>
true
,
24
));
25
26
$type
=
$target
->getType();
27
$subtype
=
$target
->getSubtype() ?
$target
->getSubtype() :
'default'
;
28
$key
=
"river:comment:$type:$subtype"
;
29
$summary
=
elgg_echo
(
$key
, array(
$subject_link
,
$target_link
));
30
if
(
$summary
==
$key
) {
31
$key
=
"river:comment:$type:default"
;
32
$summary
=
elgg_echo
(
$key
, array(
$subject_link
,
$target_link
));
33
}
34
35
echo
elgg_view
(
'river/elements/layout'
, array(
36
'item'
=>
$vars
[
'item'
],
37
'message'
=>
elgg_get_excerpt
(
$comment
->description),
38
'summary'
=>
$summary
,
39
));
$subject_link
$subject_link
Definition:
create.php:12
$item
$item
Post comment river view.
Definition:
create.php:6
$key
$key
Definition:
create.php:28
$target
$target
Definition:
create.php:10
elgg_echo
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition:
languages.php:21
$summary
$summary
Definition:
create.php:29
$target_link
$target_link
Definition:
create.php:19
echo
elgg echo
Translates a string.
Definition:
languages.js:43
elgg_view
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition:
views.php:354
$type
$type
Definition:
create.php:26
$subtype
$subtype
Definition:
create.php:27
elgg_get_excerpt
elgg_get_excerpt($text, $num_chars=250)
Returns an excerpt.
Definition:
output.php:72
$subject
$subject
Definition:
create.php:9
$comment
$comment
Definition:
create.php:8
$vars
if(file_exists($welcome)) $vars
Definition:
upgrade.php:93
Generated on Sat Dec 21 2024 00:00:36 for Elgg by
1.8.11