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
2797e942
Commit
2797e942
authored
Jul 29, 2017
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move microdata meta tag
parent
9b1eb365
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
format.php
qa-include/app/format.php
+9
-11
No files found.
qa-include/app/format.php
View file @
2797e942
...
...
@@ -303,9 +303,9 @@ function qa_post_html_fields($post, $userid, $cookieid, $usershtml, $dummy, $opt
// Useful stuff used throughout function
$postid
=
$post
[
'postid'
];
$isquestion
=
(
$post
[
'basetype'
]
==
'Q'
)
;
$isanswer
=
(
$post
[
'basetype'
]
==
'A'
)
;
$iscomment
=
(
$post
[
'basetype'
]
==
'C'
)
;
$isquestion
=
$post
[
'basetype'
]
==
'Q'
;
$isanswer
=
$post
[
'basetype'
]
==
'A'
;
$iscomment
=
$post
[
'basetype'
]
==
'C'
;
$isbyuser
=
qa_post_is_by_user
(
$post
,
$userid
,
$cookieid
);
$anchor
=
urlencode
(
qa_anchor
(
$post
[
'basetype'
],
$postid
));
$elementid
=
isset
(
$options
[
'elementid'
])
?
$options
[
'elementid'
]
:
$anchor
;
...
...
@@ -465,14 +465,6 @@ function qa_post_html_fields($post, $userid, $cookieid, $usershtml, $dummy, $opt
$netvotes
=
abs
(
$netvotes
);
$netvoteshtml
=
$netvotesPrefix
.
qa_html
(
qa_format_number
(
$netvotes
,
0
,
true
));
// ...with microformats if appropriate
if
(
$microdata
)
{
// vote display might be formatted (e.g. '2k') so use meta tag for true count
$netvoteshtml
.=
'<meta itemprop="upvoteCount" content="'
.
qa_html
(
$netvotes
)
.
'"/>'
;
$upvoteshtml
.=
'<meta itemprop="upvoteCount" content="'
.
qa_html
(
$upvotes
)
.
'"/>'
;
}
// Pass information on vote viewing
// $voteview will be one of:
...
...
@@ -492,6 +484,12 @@ function qa_post_html_fields($post, $userid, $cookieid, $usershtml, $dummy, $opt
$fields
[
'netvotes_view'
]
=
(
$netvotes
==
1
)
?
qa_lang_html_sub_split
(
'main/1_vote'
,
$netvoteshtml
,
'1'
)
:
qa_lang_html_sub_split
(
'main/x_votes'
,
$netvoteshtml
);
// schema.org microdata - vote display might be formatted (e.g. '2k') so we use meta tag for true count
if
(
$microdata
)
{
$fields
[
'netvotes_view'
][
'suffix'
]
.=
' <meta itemprop="upvoteCount" content="'
.
qa_html
(
$netvotes
)
.
'"/>'
;
$fields
[
'upvotes_view'
][
'suffix'
]
.=
' <meta itemprop="upvoteCount" content="'
.
qa_html
(
$upvotes
)
.
'"/>'
;
}
// Voting buttons
$fields
[
'vote_tags'
]
=
'id="voting_'
.
qa_html
(
$postid
)
.
'"'
;
...
...
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