Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
21274fbb
Commit
21274fbb
authored
May 22, 2005
by
Steven Wittens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-
#23285
: Allow theming of comment previews, like node previews.
parent
2abaae6b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
10 deletions
+18
-10
modules/comment.module
modules/comment.module
+9
-5
modules/comment/comment.module
modules/comment/comment.module
+9
-5
No files found.
modules/comment.module
View file @
21274fbb
...
...
@@ -493,10 +493,7 @@ function comment_preview($edit) {
$output
=
''
;
$comment
=
new
StdClass
();
foreach
(
$edit
as
$key
=>
$value
)
{
$comment
->
$key
=
$value
;
}
$comment
=
array2object
(
$edit
);
// Attach the user and time information.
$comment
->
uid
=
$user
->
uid
;
...
...
@@ -504,7 +501,7 @@ function comment_preview($edit) {
$comment
->
name
=
check_plain
(
$user
->
name
?
$user
->
name
:
$comment
->
name
);
// Preview the comment.
$output
.
=
theme
(
'comment_view'
,
$comment
,
theme
(
'links'
,
module_invoke_all
(
'link'
,
'comment'
,
$comment
,
1
)));
$output
.
=
theme
(
'comment_
pre
view'
,
$comment
,
theme
(
'links'
,
module_invoke_all
(
'link'
,
'comment'
,
$comment
,
1
)));
$output
.
=
theme
(
'comment_form'
,
$edit
,
t
(
'Reply'
));
if
(
$edit
[
'pid'
])
{
...
...
@@ -1431,6 +1428,13 @@ function theme_comment_form($edit, $title) {
return
theme
(
'box'
,
$title
,
form
(
$form
,
'post'
,
url
(
'comment/reply/'
.
$edit
[
'nid'
])));
}
function
theme_comment_preview
(
$comment
,
$links
=
''
,
$visible
=
1
)
{
$output
=
'<div class="preview">'
;
$output
.
=
theme
(
'comment_view'
,
$comment
,
$links
,
$visible
);
$output
.
=
'</div>'
;
return
$output
;
};
function
theme_comment_view
(
$comment
,
$links
=
''
,
$visible
=
1
)
{
// Emit selectors:
...
...
modules/comment/comment.module
View file @
21274fbb
...
...
@@ -493,10 +493,7 @@ function comment_preview($edit) {
$output
=
''
;
$comment
=
new
StdClass
();
foreach
(
$edit
as
$key
=>
$value
)
{
$comment
->
$key
=
$value
;
}
$comment
=
array2object
(
$edit
);
// Attach the user and time information.
$comment
->
uid
=
$user
->
uid
;
...
...
@@ -504,7 +501,7 @@ function comment_preview($edit) {
$comment
->
name
=
check_plain
(
$user
->
name
?
$user
->
name
:
$comment
->
name
);
// Preview the comment.
$output
.
=
theme
(
'comment_view'
,
$comment
,
theme
(
'links'
,
module_invoke_all
(
'link'
,
'comment'
,
$comment
,
1
)));
$output
.
=
theme
(
'comment_
pre
view'
,
$comment
,
theme
(
'links'
,
module_invoke_all
(
'link'
,
'comment'
,
$comment
,
1
)));
$output
.
=
theme
(
'comment_form'
,
$edit
,
t
(
'Reply'
));
if
(
$edit
[
'pid'
])
{
...
...
@@ -1431,6 +1428,13 @@ function theme_comment_form($edit, $title) {
return
theme
(
'box'
,
$title
,
form
(
$form
,
'post'
,
url
(
'comment/reply/'
.
$edit
[
'nid'
])));
}
function
theme_comment_preview
(
$comment
,
$links
=
''
,
$visible
=
1
)
{
$output
=
'<div class="preview">'
;
$output
.
=
theme
(
'comment_view'
,
$comment
,
$links
,
$visible
);
$output
.
=
'</div>'
;
return
$output
;
};
function
theme_comment_view
(
$comment
,
$links
=
''
,
$visible
=
1
)
{
// Emit selectors:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment