Permalink
Browse files

added moderator role

  • Loading branch information...
1 parent 6f585a0 commit 1289551f81fc64acd0ab182ad292decc58a84cbd @NoahY committed Jan 21, 2012
View
File renamed without changes
File renamed without changes
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
View
@@ -11,7 +11,7 @@ function option_default($option) {
switch($option) {
case 'marker_plugin_who_text':
return '♦';
- case 'marker_plugin_css':
+ case 'marker_plugin_css_2':
return '
.qa-q-item-avatar,.qa-q-view-avatar,.qa-a-item-avatar,.qa-c-item-avatar {
position:relative;
@@ -23,13 +23,16 @@ function option_default($option) {
vertical-align: sub;
line-height: 50%;
}
-.qa-who-marker-bronze {
+.qa-who-marker-expert {
+ color: #4D90FE;
+}
+.qa-who-marker-editor {
color: #CB9114;
}
-.qa-who-marker-silver {
+.qa-who-marker-moderator {
color: #CDCDCD;
}
-.qa-who-marker-gold {
+.qa-who-marker-admin {
color: #EEDD0F;
}
.qa-avatar-marker {
@@ -50,7 +53,7 @@ function admin_form(&$qa_content)
$ok = null;
if (qa_clicked('marker_save_button')) {
- qa_opt('marker_plugin_css',qa_post_text('marker_plugin_css'));
+ qa_opt('marker_plugin_css_2',qa_post_text('marker_plugin_css_2'));
qa_opt('marker_plugin_who_text',qa_post_text('marker_plugin_who_text'));
@@ -94,8 +97,8 @@ function admin_form(&$qa_content)
$fields[] = array(
'label' => 'Marker custom css',
- 'tags' => 'NAME="marker_plugin_css"',
- 'value' => qa_opt('marker_plugin_css'),
+ 'tags' => 'NAME="marker_plugin_css_2"',
+ 'value' => qa_opt('marker_plugin_css_2'),
'type' => 'textarea',
'rows' => 20
);
View
@@ -7,7 +7,7 @@ function head_custom()
$this->output('
<style>
-'.qa_opt('marker_plugin_css').'
+'.qa_opt('marker_plugin_css_2').'
</style>');
}
@@ -56,15 +56,19 @@ function get_role_marker($uid,$switch) {
$user = get_userdata( $uid );
if (isset($user->wp_capabilities['administrator']) || isset($user->caps['administrator']) || isset($user->allcaps['administrator'])) {
$level=qa_lang('users/level_admin');
- $img = 'gold';
+ $img = 'admin';
+ }
+ elseif (isset($user->wp_capabilities['moderator']) || isset($user->caps['moderator'])) {
+ $level=qa_lang('users/level_moderator');
+ $img = 'moderator';
}
elseif (isset($user->wp_capabilities['editor']) || isset($user->caps['editor'])) {
$level=qa_lang('users/level_editor');
- $img = 'silver';
+ $img = 'editor';
}
elseif (isset($user->wp_capabilities['contributor']) || isset($user->caps['contributor'])) {
$level=qa_lang('users/level_expert');
- $img = 'bronze';
+ $img = 'expert';
}
else
return;

0 comments on commit 1289551

Please sign in to comment.