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
bbbbd6bb
Commit
bbbbd6bb
authored
Aug 27, 2014
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tag Cloud: keep showing tags at minimum size
Also set a readable default size and some more code formatting.
parent
105c7434
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
qa-mouseover-layer.php
qa-plugin/mouseover-layer/qa-mouseover-layer.php
+6
-4
qa-tag-cloud.php
qa-plugin/tag-cloud-widget/qa-tag-cloud.php
+3
-3
No files found.
qa-plugin/mouseover-layer/qa-mouseover-layer.php
View file @
bbbbd6bb
...
...
@@ -33,9 +33,10 @@
// Collect the question ids of all items in the question list (so we can do this in one DB query)
$postids
=
array
();
foreach
(
$q_list
[
'qs'
]
as
$question
)
if
(
isset
(
$question
[
'raw'
][
'postid'
]))
$postids
[]
=
$question
[
'raw'
][
'postid'
];
foreach
(
$q_list
[
'qs'
]
as
$question
)
{
if
(
isset
(
$question
[
'raw'
][
'postid'
]))
$postids
[]
=
$question
[
'raw'
][
'postid'
];
}
if
(
!
empty
(
$postids
))
{
...
...
@@ -52,7 +53,7 @@
// Now add the popup to the title for each question
foreach
(
$q_list
[
'qs'
]
as
$index
=>
$question
)
foreach
(
$q_list
[
'qs'
]
as
$index
=>
$question
)
{
if
(
isset
(
$postinfo
[
$question
[
'raw'
][
'postid'
]]))
{
$thispost
=
$postinfo
[
$question
[
'raw'
][
'postid'
]];
$text
=
qa_viewer_text
(
$thispost
[
'content'
],
$thispost
[
'format'
],
array
(
'blockwordspreg'
=>
$blockwordspreg
));
...
...
@@ -60,6 +61,7 @@
$title
=
isset
(
$question
[
'title'
])
?
$question
[
'title'
]
:
''
;
$q_list
[
'qs'
][
$index
][
'title'
]
=
sprintf
(
'<span title="%s">%s</span>'
,
qa_html
(
$text
),
$title
);
}
}
}
}
...
...
qa-plugin/tag-cloud-widget/qa-tag-cloud.php
View file @
bbbbd6bb
...
...
@@ -33,7 +33,7 @@
if
(
$option
===
'tag_cloud_font_size'
)
return
24
;
if
(
$option
===
'tag_cloud_minimal_font_size'
)
return
5
;
return
8
;
if
(
$option
===
'tag_cloud_size_popular'
)
return
true
;
}
...
...
@@ -134,8 +134,8 @@
if
(
empty
(
$matches
))
{
if
(
$scale
)
{
$size
=
number_format
(
$maxsize
*
$count
/
$maxcount
,
1
);
if
(
$size
<
$minsize
)
// Size is too small so stop processing
break
;
if
(
$size
<
$minsize
)
$size
=
$minsize
;
}
else
$size
=
$maxsize
;
...
...
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