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
9f1907d8
Commit
9f1907d8
authored
Dec 04, 2018
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix errors in structured data
parent
ef53ed4c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
8 deletions
+14
-8
format.php
qa-include/app/format.php
+6
-2
options.php
qa-include/app/options.php
+0
-1
question.php
qa-include/pages/question.php
+1
-1
qa-theme-base.php
qa-include/qa-theme-base.php
+7
-4
No files found.
qa-include/app/format.php
View file @
9f1907d8
...
...
@@ -572,8 +572,12 @@ function qa_post_html_fields($post, $userid, $cookieid, $usershtml, $dummy, $opt
$fields
[
'what'
]
=
qa_lang_html
(
$isquestion
?
'main/asked'
:
(
$isanswer
?
'main/answered'
:
'main/commented'
));
if
(
@
$options
[
'whatlink'
]
&&
strlen
(
@
$options
[
'q_request'
]))
{
$fields
[
'what_url'
]
=
(
$post
[
'basetype'
]
==
'Q'
)
?
qa_path_html
(
$options
[
'q_request'
])
$fields
[
'what_url'
]
=
$post
[
'basetype'
]
==
'Q'
?
qa_path_html
(
$options
[
'q_request'
])
:
qa_path_html
(
$options
[
'q_request'
],
array
(
'show'
=>
$postid
),
null
,
null
,
qa_anchor
(
$post
[
'basetype'
],
$postid
));
if
(
$microdata
)
{
$fields
[
'what_url_tags'
]
=
' itemprop="url"'
;
}
}
}
...
...
@@ -737,7 +741,7 @@ function qa_message_html_fields($message, $options = array())
* @param int $postuserid The post user's ID.
* @param array $usershtml Array of HTML representing usernames.
* @param string $ip The post user's IP.
* @param bool|string $microdata Whether to include microdata
(no longer used)
.
* @param bool|string $microdata Whether to include microdata.
* @param string $name The author's username.
* @return array The HTML.
*/
...
...
qa-include/app/options.php
View file @
9f1907d8
...
...
@@ -592,7 +592,6 @@ function qa_post_html_defaults($basetype, $full = false)
'blockwordspreg'
=>
qa_get_block_words_preg
(),
'showurllinks'
=>
qa_opt
(
'show_url_links'
),
'linksnewwindow'
=>
qa_opt
(
'links_in_new_window'
),
'microformats'
=>
$full
,
'fulldatedays'
=>
qa_opt
(
'show_full_date_days'
),
);
}
...
...
qa-include/pages/question.php
View file @
9f1907d8
...
...
@@ -260,7 +260,7 @@ $microdata = qa_opt('use_microdata');
if
(
$microdata
)
{
$qa_content
[
'head_lines'
][]
=
'<meta itemprop="name" content="'
.
qa_html
(
$qa_content
[
'q_view'
][
'raw'
][
'title'
])
.
'">'
;
$qa_content
[
'html_tags'
]
.=
' itemscope itemtype="http://schema.org/QAPage"'
;
$qa_content
[
'main_tags'
]
=
' itemscope itemtype="http://schema.org/Question"'
;
$qa_content
[
'main_tags'
]
=
' item
prop="mainEntity" item
scope itemtype="http://schema.org/Question"'
;
}
...
...
qa-include/qa-theme-base.php
View file @
9f1907d8
...
...
@@ -1955,13 +1955,16 @@ class qa_html_theme_base
{
if
(
isset
(
$post
[
'what'
]))
{
$classes
=
$class
.
'-what'
;
if
(
@
$post
[
'what_your'
])
if
(
isset
(
$post
[
'what_your'
])
&&
$post
[
'what_your'
])
{
$classes
.=
' '
.
$class
.
'-what-your'
;
}
if
(
isset
(
$post
[
'what_url'
]))
$this
->
output
(
'<a href="'
.
$post
[
'what_url'
]
.
'" class="'
.
$classes
.
'">'
.
$post
[
'what'
]
.
'</a>'
);
else
if
(
isset
(
$post
[
'what_url'
]))
{
$tags
=
isset
(
$post
[
'what_url_tags'
])
?
$post
[
'what_url_tags'
]
:
''
;
$this
->
output
(
'<a href="'
.
$post
[
'what_url'
]
.
'" class="'
.
$classes
.
'"'
.
$tags
.
'>'
.
$post
[
'what'
]
.
'</a>'
);
}
else
{
$this
->
output
(
'<span class="'
.
$classes
.
'">'
.
$post
[
'what'
]
.
'</span>'
);
}
}
}
...
...
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