Merge branch 'master' of github.com:shish/shimmie2

This commit is contained in:
Shish 2012-02-26 15:24:30 +00:00
commit 1ff0703a91
3 changed files with 12 additions and 9 deletions

View File

@ -30,14 +30,13 @@ class UserClass {
}
$_user_class_base = new UserClass("base", null, array(
"change_setting" => False, # web-level settings, eg the config table
"override_config" => False, # sys-level config, eg config.php
"big_search" => False, # more than 3 tags (speed mode only)
"lock_image" => False,
"change_setting" => False, # modify web-level settings, eg the config table
"override_config" => False, # modify sys-level settings, eg config.php
"big_search" => False, # search for more than 3 tags at once (speed mode only)
"view_ip" => False, # view IP addresses associated with things
"ban_ip" => False,
"change_password" => False,
"change_user_info" => False,
"change_user_info" => False, # email address, etc
"delete_user" => False,
"delete_image" => False,
"delete_comment" => False,
@ -47,10 +46,11 @@ $_user_class_base = new UserClass("base", null, array(
"edit_image_tag" => False,
"edit_image_source" => False,
"edit_image_owner" => False,
"lock_image" => False,
"mass_tag_edit" => False,
"report_image" => False,
"view_image_report" => False,
"protected" => False,
"view_image_report" => False, # deal with reported images
"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(
"edit_image_tag" => "tag_edit_anon",

View File

@ -38,7 +38,7 @@ class BBCode extends FormatterExtension {
$text = preg_replace("/\[i\](.*?)\[\/i\]/s", "<i>\\1</i>", $text);
$text = preg_replace("/\[u\](.*?)\[\/u\]/s", "<u>\\1</u>", $text);
$text = preg_replace("/\[s\](.*?)\[\/s\]/s", "<s>\\1</s>", $text);
$text = preg_replace("/&gt;&gt;(\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');\">&gt;&gt;\\1\\2</a>", $text);
$text = preg_replace("/&gt;&gt;(\d+)(#c?(\d+))?/s", "<a class='comment_link' href=\"".make_link("post/view/\\1#c\\3")."\" onclick=\"$('#c\\3').parent().effect('highlight', {}, 5000);\">&gt;&gt;\\1\\2</a>", $text);
$text = preg_replace("/(^|\s)#(\d+)/s", "\\1<a href=\"#\\2\">#\\2</a>", $text);
$text = preg_replace("/&gt;&gt;([^\d].+)/", "<blockquote><small>\\1</small></blockquote>", $text);
$text = preg_replace("/\[url=((?:https?|ftp|irc|mailto):\/\/.*?)\](.*?)\[\/url\]/s", "<a href=\"\\1\">\\2</a>", $text);

View File

@ -56,7 +56,10 @@ $(document).ready(function() {
var target_id = $(elm).text().match(/#c?(\d+)/);
if(target_id && $("#c"+target_id[1])) {
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);
}
}
});
});