aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/styles/subSilver
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-09-28 15:04:59 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-09-28 15:04:59 +0000
commit26befa094147b542e48e36867eb41eaf424225f7 (patch)
tree5131952196ff19744498bbbdc962635cecc94c4f /phpBB/styles/subSilver
parent67accdb07263030c29eebba9edf944fd350879d1 (diff)
downloadforums-26befa094147b542e48e36867eb41eaf424225f7.tar
forums-26befa094147b542e48e36867eb41eaf424225f7.tar.gz
forums-26befa094147b542e48e36867eb41eaf424225f7.tar.bz2
forums-26befa094147b542e48e36867eb41eaf424225f7.tar.xz
forums-26befa094147b542e48e36867eb41eaf424225f7.zip
- added confirmation to removing bbcodes
- added optional MX and DNSBL checks - added backtrace (triggering sql error) on error within sql_in_set as well as making sure it is handling an array - let users having f_list access to a forum actually see the forum without a topic list and not displaying an error message - this allows for giving people access to subforums but not the parent forum without the need to add the (sub-)forum to the index. - some additional bugfixes git-svn-id: file:///svn/phpbb/trunk@6414 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/styles/subSilver')
-rw-r--r--phpBB/styles/subSilver/template/posting_smilies.html56
1 files changed, 54 insertions, 2 deletions
diff --git a/phpBB/styles/subSilver/template/posting_smilies.html b/phpBB/styles/subSilver/template/posting_smilies.html
index 7bfc1cc6cb..5536513229 100644
--- a/phpBB/styles/subSilver/template/posting_smilies.html
+++ b/phpBB/styles/subSilver/template/posting_smilies.html
@@ -4,11 +4,63 @@
<!--
var form_name = 'post';
-var text_name = 'message';
+
+/**
+* Apply clicked smiley to message body
+*/
+function smiley(text)
+{
+ text = ' ' + text + ' ';
+
+ if (opener.document.forms[form_name].message.createTextRange && opener.document.forms[form_name].message.caretPos)
+ {
+ var caretPos = opener.document.forms[form_name].message.caretPos;
+
+ caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text;
+ opener.document.forms[form_name].message.focus();
+ }
+ else
+ {
+ var selStart = opener.document.forms[form_name].message.selectionStart;
+ var selEnd = opener.document.forms[form_name].message.selectionEnd;
+
+ mozWrap(opener.document.forms[form_name].message, text, '')
+ opener.document.forms[form_name].message.focus();
+ opener.document.forms[form_name].message.selectionStart = selStart + text.length;
+ opener.document.forms[form_name].message.selectionEnd = selEnd + text.length;
+ }
+}
+
+/**
+* From http://www.massless.org/mozedit/
+*/
+function mozWrap(txtarea, open, close)
+{
+ var selLength = txtarea.textLength;
+ var selStart = txtarea.selectionStart;
+ var selEnd = txtarea.selectionEnd;
+ var scrollTop = txtarea.scrollTop;
+
+ if (selEnd == 1 || selEnd == 2)
+ {
+ selEnd = selLength;
+ }
+
+ var s1 = (txtarea.value).substring(0,selStart);
+ var s2 = (txtarea.value).substring(selStart, selEnd)
+ var s3 = (txtarea.value).substring(selEnd, selLength);
+
+ txtarea.value = s1 + open + s2 + close + s3;
+ txtarea.selectionStart = selEnd + open.length + close.length;
+ txtarea.selectionEnd = txtarea.selectionStart;
+ txtarea.focus();
+ txtarea.scrollTop = scrollTop;
+
+ return;
+}
//-->
</script>
-<script language="javascript" type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>
<table width="100%" cellspacing="1" cellpadding="4" border="0">
<tr>