Merge branch 'master' of github.com:shish/shimmie2
This commit is contained in:
commit
1ff0703a91
@ -30,14 +30,13 @@ class UserClass {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$_user_class_base = new UserClass("base", null, array(
|
$_user_class_base = new UserClass("base", null, array(
|
||||||
"change_setting" => False, # web-level settings, eg the config table
|
"change_setting" => False, # modify web-level settings, eg the config table
|
||||||
"override_config" => False, # sys-level config, eg config.php
|
"override_config" => False, # modify sys-level settings, eg config.php
|
||||||
"big_search" => False, # more than 3 tags (speed mode only)
|
"big_search" => False, # search for more than 3 tags at once (speed mode only)
|
||||||
"lock_image" => False,
|
|
||||||
"view_ip" => False, # view IP addresses associated with things
|
"view_ip" => False, # view IP addresses associated with things
|
||||||
"ban_ip" => False,
|
"ban_ip" => False,
|
||||||
"change_password" => False,
|
"change_password" => False,
|
||||||
"change_user_info" => False,
|
"change_user_info" => False, # email address, etc
|
||||||
"delete_user" => False,
|
"delete_user" => False,
|
||||||
"delete_image" => False,
|
"delete_image" => False,
|
||||||
"delete_comment" => False,
|
"delete_comment" => False,
|
||||||
@ -47,10 +46,11 @@ $_user_class_base = new UserClass("base", null, array(
|
|||||||
"edit_image_tag" => False,
|
"edit_image_tag" => False,
|
||||||
"edit_image_source" => False,
|
"edit_image_source" => False,
|
||||||
"edit_image_owner" => False,
|
"edit_image_owner" => False,
|
||||||
|
"lock_image" => False,
|
||||||
"mass_tag_edit" => False,
|
"mass_tag_edit" => False,
|
||||||
"report_image" => False,
|
"report_image" => False,
|
||||||
"view_image_report" => False,
|
"view_image_report" => False, # deal with reported images
|
||||||
"protected" => False,
|
"protected" => False, # only admins can modify protected users (stops a moderator changing an admin's password)
|
||||||
));
|
));
|
||||||
$_user_classes["anonymous"] = new UserClass("anonymous", $_user_class_base, array(
|
$_user_classes["anonymous"] = new UserClass("anonymous", $_user_class_base, array(
|
||||||
"edit_image_tag" => "tag_edit_anon",
|
"edit_image_tag" => "tag_edit_anon",
|
||||||
|
@ -38,7 +38,7 @@ class BBCode extends FormatterExtension {
|
|||||||
$text = preg_replace("/\[i\](.*?)\[\/i\]/s", "<i>\\1</i>", $text);
|
$text = preg_replace("/\[i\](.*?)\[\/i\]/s", "<i>\\1</i>", $text);
|
||||||
$text = preg_replace("/\[u\](.*?)\[\/u\]/s", "<u>\\1</u>", $text);
|
$text = preg_replace("/\[u\](.*?)\[\/u\]/s", "<u>\\1</u>", $text);
|
||||||
$text = preg_replace("/\[s\](.*?)\[\/s\]/s", "<s>\\1</s>", $text);
|
$text = preg_replace("/\[s\](.*?)\[\/s\]/s", "<s>\\1</s>", $text);
|
||||||
$text = preg_replace("/>>(\d+)(#c?(\d+))?/s", "<a class='comment_link' href=\"".make_link("post/view/\\1#c\\3")."\" onclick=\"$('#c\\3').parent().effect('highlight', {}, 5000); return !$('#c\\3');\">>>\\1\\2</a>", $text);
|
$text = preg_replace("/>>(\d+)(#c?(\d+))?/s", "<a class='comment_link' href=\"".make_link("post/view/\\1#c\\3")."\" onclick=\"$('#c\\3').parent().effect('highlight', {}, 5000);\">>>\\1\\2</a>", $text);
|
||||||
$text = preg_replace("/(^|\s)#(\d+)/s", "\\1<a href=\"#\\2\">#\\2</a>", $text);
|
$text = preg_replace("/(^|\s)#(\d+)/s", "\\1<a href=\"#\\2\">#\\2</a>", $text);
|
||||||
$text = preg_replace("/>>([^\d].+)/", "<blockquote><small>\\1</small></blockquote>", $text);
|
$text = preg_replace("/>>([^\d].+)/", "<blockquote><small>\\1</small></blockquote>", $text);
|
||||||
$text = preg_replace("/\[url=((?:https?|ftp|irc|mailto):\/\/.*?)\](.*?)\[\/url\]/s", "<a href=\"\\1\">\\2</a>", $text);
|
$text = preg_replace("/\[url=((?:https?|ftp|irc|mailto):\/\/.*?)\](.*?)\[\/url\]/s", "<a href=\"\\1\">\\2</a>", $text);
|
||||||
|
@ -56,7 +56,10 @@ $(document).ready(function() {
|
|||||||
var target_id = $(elm).text().match(/#c?(\d+)/);
|
var target_id = $(elm).text().match(/#c?(\d+)/);
|
||||||
if(target_id && $("#c"+target_id[1])) {
|
if(target_id && $("#c"+target_id[1])) {
|
||||||
var target_name = $("#c"+target_id[1]+" .username").html();
|
var target_name = $("#c"+target_id[1]+" .username").html();
|
||||||
$(elm).html("@"+target_name);
|
if(target_name) {
|
||||||
|
$(elm).attr("href", "#c"+target_id[1]);
|
||||||
|
$(elm).html("@"+target_name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user