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
e707b833
Commit
e707b833
authored
Mar 27, 2014
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scrap tables on users/tags (ranking) pages
Use inline-block instead
parent
58d78167
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
84 additions
and
126 deletions
+84
-126
qa-app-options.php
qa-include/qa-app-options.php
+1
-1
qa-page-users.php
qa-include/qa-page-users.php
+15
-10
qa-theme-base.php
qa-include/qa-theme-base.php
+25
-50
qa-styles.css
qa-theme/Candy/qa-styles.css
+8
-10
qa-styles.css
qa-theme/Classic/qa-styles.css
+8
-10
qa-styles.css
qa-theme/Snow/qa-styles.css
+27
-45
No files found.
qa-include/qa-app-options.php
View file @
e707b833
...
...
@@ -307,7 +307,7 @@
'page_size_tag_qs'
=>
20
,
'page_size_tags'
=>
30
,
'page_size_una_qs'
=>
20
,
'page_size_users'
=>
2
0
,
'page_size_users'
=>
3
0
,
'page_size_wall'
=>
10
,
'pages_prev_next'
=>
3
,
'permit_anon_view_ips'
=>
QA_PERMIT_EDITORS
,
...
...
qa-include/qa-page-users.php
View file @
e707b833
...
...
@@ -58,19 +58,24 @@
);
if
(
count
(
$users
))
{
foreach
(
$users
as
$userid
=>
$user
)
$qa_content
[
'ranking'
][
'items'
][]
=
array
(
'label'
=>
(
QA_FINAL_EXTERNAL_USERS
?
qa_get_external_avatar_html
(
$user
[
'userid'
],
qa_opt
(
'avatar_users_size'
),
true
)
:
qa_get_user_avatar_html
(
$user
[
'flags'
],
$user
[
'email'
],
$user
[
'handle'
],
$user
[
'avatarblobid'
],
$user
[
'avatarwidth'
],
$user
[
'avatarheight'
],
qa_opt
(
'avatar_users_size'
),
true
)
)
.
' '
.
$usershtml
[
$user
[
'userid'
]],
foreach
(
$users
as
$userid
=>
$user
)
{
if
(
QA_FINAL_EXTERNAL_USERS
)
$avatarhtml
=
qa_get_external_avatar_html
(
$user
[
'userid'
],
qa_opt
(
'avatar_users_size'
),
true
);
else
{
$avatarhtml
=
qa_get_user_avatar_html
(
$user
[
'flags'
],
$user
[
'email'
],
$user
[
'handle'
],
$user
[
'avatarblobid'
],
$user
[
'avatarwidth'
],
$user
[
'avatarheight'
],
qa_opt
(
'avatar_users_size'
),
true
);
}
// avatar and handle now listed separately for use in themes
$qa_content
[
'ranking'
][
'items'
][]
=
array
(
'avatar'
=>
$avatarhtml
,
'label'
=>
$usershtml
[
$user
[
'userid'
]],
'score'
=>
qa_html
(
number_format
(
$user
[
'points'
])),
'raw'
=>
$user
,
);
}
else
}
}
else
$qa_content
[
'title'
]
=
qa_lang_html
(
'main/no_active_users'
);
$qa_content
[
'page_links'
]
=
qa_html_page_links
(
qa_request
(),
$start
,
$pagesize
,
$usercount
,
qa_opt
(
'pages_prev_next'
));
...
...
qa-include/qa-theme-base.php
View file @
e707b833
...
...
@@ -1248,73 +1248,44 @@
{
$this
->
part_title
(
$ranking
);
$class
=
(
@
$ranking
[
'type'
]
==
'users'
)
?
'qa-top-users'
:
'qa-top-tags'
;
if
(
!
isset
(
$ranking
[
'type'
]))
$ranking
[
'type'
]
=
'items'
;
$class
=
'qa-top-'
.
$ranking
[
'type'
];
$rows
=
min
(
$ranking
[
'rows'
],
count
(
$ranking
[
'items'
]));
if
(
$rows
>
0
)
{
$this
->
output
(
'<table class="'
.
$class
.
'-table">'
);
$columns
=
ceil
(
count
(
$ranking
[
'items'
])
/
$rows
);
for
(
$row
=
0
;
$row
<
$rows
;
$row
++
)
{
$this
->
set_context
(
'ranking_row'
,
$row
);
$this
->
output
(
'<tr>'
);
for
(
$column
=
0
;
$column
<
$columns
;
$column
++
)
{
$this
->
set_context
(
'ranking_column'
,
$column
);
$this
->
ranking_item
(
@
$ranking
[
'items'
][
$column
*
$rows
+
$row
],
$class
,
$column
>
0
);
}
$this
->
clear_context
(
'ranking_column'
);
$this
->
output
(
'</tr>'
);
}
$this
->
clear_context
(
'ranking_row'
);
$this
->
output
(
'</table>'
);
foreach
(
$ranking
[
'items'
]
as
$item
)
{
$this
->
output
(
'<span class="qa-ranking-item '
.
$class
.
'-item">'
);
$this
->
ranking_item
(
$item
,
$class
);
$this
->
output
(
'</span>'
);
}
}
public
function
ranking_item
(
$item
,
$class
,
$spacer
)
public
function
ranking_item
(
$item
,
$class
,
$spacer
=
false
)
// $spacer is deprecated
{
if
(
$spacer
)
$this
->
ranking_spacer
(
$class
);
if
(
empty
(
$item
))
{
$this
->
ranking_spacer
(
$class
);
$this
->
ranking_spacer
(
$class
);
}
else
{
if
(
isset
(
$item
[
'count'
]))
$this
->
ranking_count
(
$item
,
$class
);
if
(
isset
(
$item
[
'count'
]))
$this
->
ranking_count
(
$item
,
$class
);
$this
->
ranking_label
(
$item
,
$class
);
if
(
isset
(
$item
[
'avatar'
]))
$this
->
avatar
(
$item
,
$class
);
if
(
isset
(
$item
[
'score'
]))
$this
->
ranking_score
(
$item
,
$class
);
}
}
$this
->
ranking_label
(
$item
,
$class
);
public
function
ranking_spacer
(
$class
)
{
$this
->
output
(
'<td class="'
.
$class
.
'-spacer"> </td>'
);
if
(
isset
(
$item
[
'score'
]))
$this
->
ranking_score
(
$item
,
$class
);
}
public
function
ranking_count
(
$item
,
$class
)
{
$this
->
output
(
'<
td class="'
.
$class
.
'-count">'
.
$item
[
'count'
]
.
' ×'
.
'</td
>'
);
$this
->
output
(
'<
span class="'
.
$class
.
'-count">'
.
$item
[
'count'
]
.
' ×'
.
'</span
>'
);
}
public
function
ranking_label
(
$item
,
$class
)
{
$this
->
output
(
'<
td class="'
.
$class
.
'-label">'
.
$item
[
'label'
]
.
'</td
>'
);
$this
->
output
(
'<
span class="'
.
$class
.
'-label">'
.
$item
[
'label'
]
.
'</span
>'
);
}
public
function
ranking_score
(
$item
,
$class
)
{
$this
->
output
(
'<
td class="'
.
$class
.
'-score">'
.
$item
[
'score'
]
.
'</td
>'
);
$this
->
output
(
'<
span class="'
.
$class
.
'-score">'
.
$item
[
'score'
]
.
'</span
>'
);
}
public
function
message_list_and_form
(
$list
)
...
...
@@ -1613,10 +1584,14 @@
$this
->
output_split
(
@
$post
[
'views'
],
'qa-view-count'
);
}
public
function
avatar
(
$
post
,
$class
)
public
function
avatar
(
$
item
,
$class
,
$prefix
=
null
)
{
if
(
isset
(
$post
[
'avatar'
]))
$this
->
output
(
'<span class="'
.
$class
.
'-avatar">'
,
$post
[
'avatar'
],
'</span>'
);
if
(
isset
(
$item
[
'avatar'
]))
{
if
(
isset
(
$prefix
))
$this
->
output
(
$prefix
);
$this
->
output
(
'<span class="'
.
$class
.
'-avatar">'
,
$item
[
'avatar'
],
'</span>'
);
}
}
public
function
a_selection
(
$post
)
...
...
qa-theme/Candy/qa-styles.css
View file @
e707b833
...
...
@@ -305,16 +305,14 @@ h2 {font-size:22px; color:#c659ab; padding-top:12px; clear:both;}
/* Tags, users and categories */
.qa-top-tags-table
{
float
:
left
;
border-collapse
:
collapse
;
margin-bottom
:
1em
;}
.qa-top-tags-count
{
border
:
1px
solid
#C0B600
;
border-right
:
1px
dashed
#E9E697
;
color
:
#8D006A
;
text-align
:
right
;
padding
:
6px
8px
6px
12px
;}
.qa-top-tags-label
{
border
:
1px
solid
#C0B600
;
border-left
:
none
;
background
:
#FFFFE6
;
padding
:
4px
16px
0
8px
;}
.qa-top-tags-label
.qa-tag-link
{
font-weight
:
normal
;}
.qa-top-tags-spacer
{
padding
:
0
4px
;}
.qa-top-users-table
{
float
:
left
;
border-collapse
:
collapse
;
margin-bottom
:
1em
;}
.qa-top-users-label
{
border
:
1px
solid
#C0B600
;
border-right
:
1px
dashed
#c1c5a9
;
padding
:
6px
16px
6px
12px
;
text-align
:
left
;}
.qa-top-users-score
{
background
:
#ffffe6
;
border-color
:
#C0B600
;
border-style
:
solid
solid
solid
none
;
border-width
:
1px
;
color
:
#8D006A
;
padding
:
6px
12px
;
text-align
:
right
;}
.qa-top-users-spacer
{
padding
:
0
4px
;}
.qa-ranking-item
{
display
:
inline-block
;
margin
:
0
5px
15px
0
;
padding
:
3px
;
vertical-align
:
top
;
width
:
220px
;
line-height
:
1.3
;
}
.qa-top-users-item
{
border
:
1px
solid
#c0b600
;
background
:
#ffffe6
;
}
.qa-top-users-avatar
{
float
:
left
;
margin-right
:
6px
;
}
.qa-top-users-label
,
.qa-top-users-score
{
display
:
block
;
}
.qa-top-tags-item
{
width
:
170px
;
border
:
1px
solid
#c0b600
;
background
:
#ffffe6
;
}
.qa-top-tags-count
{
display
:
inline-block
;
min-width
:
40px
;
text-align
:
right
;
padding-right
:
3px
;
}
.qa-top-tags-label
{
display
:
inline-block
;
}
.qa-browse-cat-list
{
list-style
:
none
;
padding
:
0
;
margin
:
0
;
margin-left
:
2em
;}
.qa-browse-cat-list-1
{
font-size
:
18px
;
margin-top
:
1em
;}
...
...
qa-theme/Classic/qa-styles.css
View file @
e707b833
...
...
@@ -280,16 +280,14 @@ h2 {font-size:16px; padding-top:12px; clear:both;}
/* Tags, users and categories */
.qa-top-tags-table
{
float
:
left
;
border-collapse
:
collapse
;
margin-bottom
:
1em
;}
.qa-top-tags-count
{
border
:
1px
solid
#658296
;
border-right
:
1px
dashed
#c1ced6
;
color
:
#235272
;
text-align
:
right
;
padding
:
6px
8px
6px
12px
;}
.qa-top-tags-label
{
border
:
1px
solid
#658296
;
border-left
:
none
;
background
:
#e7eff4
;
padding
:
3px
16px
0px
8px
;}
.qa-top-tags-label
.qa-tag-link
{
font-weight
:
normal
;}
.qa-top-tags-spacer
{
padding
:
0
4px
;}
.qa-top-users-table
{
float
:
left
;
border-collapse
:
collapse
;
margin-bottom
:
1em
;}
.qa-top-users-label
{
border
:
1px
solid
#c1c5a9
;
border-right
:
1px
dashed
#c1c5a9
;
padding
:
6px
16px
6px
12px
;
text-align
:
left
;}
.qa-top-users-score
{
border
:
1px
solid
#c1c5a9
;
border-left
:
none
;
background
:
#e9ebde
;
color
:
#414944
;
text-align
:
right
;
padding
:
6px
12px
;}
.qa-top-users-spacer
{
padding
:
0
4px
;}
.qa-ranking-item
{
display
:
inline-block
;
margin
:
0
5px
15px
0
;
padding
:
3px
;
vertical-align
:
top
;
width
:
220px
;
line-height
:
1.3
;
}
.qa-top-users-item
{
border
:
1px
solid
#c1c5a9
;
background
:
#e9ebde
;
}
.qa-top-users-avatar
{
float
:
left
;
margin-right
:
6px
;
}
.qa-top-users-label
,
.qa-top-users-score
{
display
:
block
;
}
.qa-top-tags-item
{
width
:
170px
;
border
:
1px
solid
#658296
;
background
:
#e7eff4
;
}
.qa-top-tags-count
{
display
:
inline-block
;
min-width
:
40px
;
text-align
:
right
;
padding-right
:
3px
;
}
.qa-top-tags-label
{
display
:
inline-block
;
}
.qa-browse-cat-list
{
list-style
:
none
;
padding
:
0
;
margin
:
0
;
margin-left
:
2.5em
;}
.qa-browse-cat-list-1
{
font-size
:
16px
;}
...
...
qa-theme/Snow/qa-styles.css
View file @
e707b833
...
...
@@ -1779,64 +1779,46 @@ div.header-banner {
text-decoration
:
underline
;
}
/* Tags, users and categories */
.qa-top-tags-table
{
float
:
left
;
border-collapse
:
collapse
;
margin-bottom
:
1em
;
}
.qa-top-tags-count
{
border
:
1px
solid
#ccc
;
border-right
:
1px
dashed
#aaa
;
color
:
#fff
;
text-align
:
right
;
padding
:
6px
8px
6px
12px
;
background
:
#0179b5
;
font-weight
:
700
;
}
.qa-top-tags-label
{
background
:
#fff
;
padding
:
4px
16px
0
8px
;
}
/* Tags and Users ranking */
.qa-top-tags-label
.qa-tag-link
{
font-weight
:
400
;
.qa-ranking-item
{
display
:
inline-block
;
margin
:
0
5px
15px
0
;
vertical-align
:
top
;
width
:
220px
;
min-height
:
30px
;
line-height
:
1.3
;
}
.qa-top-tags-spacer
{
padding
:
0
4px
;
.qa-top-users-item
{
}
.qa-top-users-table
{
.qa-top-users-avatar
{
float
:
left
;
border-collapse
:
collapse
;
margin-bottom
:
1em
;
margin-right
:
6px
;
}
.qa-top-users-label
{
border
:
1px
solid
#ddd
;
border-right
:
1px
solid
#ddd
;
text-align
:
left
;
padding
:
6px
16px
6px
12px
;
background
:
#fff
;
display
:
block
;
}
.qa-top-users-score
{
background
:
#0179b5
;
color
:
#fff
;
font-weight
:
bold
;
text-align
:
right
;
border-color
:
#ddd
;
border-style
:
solid
solid
solid
none
;
border-width
:
1px
;
padding
:
6px
12px
;
display
:
block
;
}
.qa-top-users-spacer
{
padding
:
0
4px
;
.qa-top-tags-item
{
width
:
165px
;
}
.qa-top-tags-count
{
display
:
inline-block
;
min-width
:
40px
;
text-align
:
right
;
padding-right
:
3px
;
}
.qa-top-tags-label
{
display
:
inline-block
;
}
/* Categories */
.qa-browse-cat-list
{
list-style
:
none
;
...
...
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