Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
5bab3483
Commit
5bab3483
authored
Dec 23, 2017
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add microdata for unregistered/anonymous users
parent
f394a34c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
format.php
qa-include/app/format.php
+5
-0
users.php
qa-include/app/users.php
+9
-4
No files found.
qa-include/app/format.php
View file @
5bab3483
...
...
@@ -755,6 +755,11 @@ function qa_who_to_html($isbyuser, $postuserid, $usershtml, $ip = null, $microda
else
$whohtml
=
qa_lang_html
(
'main/anonymous'
);
if
(
$microdata
)
{
// duplicate HTML from qa_get_one_user_html()
$whohtml
=
'<span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">'
.
$whohtml
.
'</span></span>'
;
}
if
(
isset
(
$ip
))
$whohtml
=
qa_ip_anchor_html
(
$ip
,
$whohtml
);
}
...
...
qa-include/app/users.php
View file @
5bab3483
...
...
@@ -552,11 +552,16 @@ if (QA_FINAL_EXTERNAL_USERS) {
$url
=
qa_path_html
(
'user/'
.
$handle
);
$favclass
=
$favorited
?
' qa-user-favorited'
:
''
;
$mfAttr
=
$microdata
?
' itemprop="name"'
:
''
;
$mfPrefix
=
$microdata
?
'<span itemprop="author" itemscope itemtype="http://schema.org/Person">'
:
''
;
$mfSuffix
=
$microdata
?
'</span>'
:
''
;
$mfAttr
=
$microdata
?
' itemprop="url"'
:
''
;
return
$mfPrefix
.
'<a href="'
.
$url
.
'" class="qa-user-link'
.
$favclass
.
'"'
.
$mfAttr
.
'>'
.
qa_html
(
$handle
)
.
'</a>'
.
$mfSuffix
;
$userHandle
=
$microdata
?
'<span itemprop="name">'
.
qa_html
(
$handle
)
.
'</span>'
:
qa_html
(
$handle
);
$userHtml
=
'<a href="'
.
$url
.
'" class="qa-user-link'
.
$favclass
.
'"'
.
$mfAttr
.
'>'
.
$userHandle
.
'</a>'
;
if
(
$microdata
)
{
$userHtml
=
'<span itemprop="author" itemscope itemtype="http://schema.org/Person">'
.
$userHtml
.
'</span>'
;
}
return
$userHtml
;
}
...
...
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