miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /   

Write in Persian by switchboard

Author Prince
Registered
#1 | Posted: 27 Jun 2010 13:51 | Edited by: Prince 
I've found the solution:

This (Persian Language) works for all Browsers (Internet Explorer, Firefox, Google Chrome, ...)

Edit main_post_form.html and paste this script somewhere above

<!--Persian Language Script-->
<script type="text/javascript">
var
arabic =' !"#$%،گ)(+و-./0123456789:ك,=.؟@ِذژىُيلآـ،/'د؛َءٍ،'{ًْإ~جپچ^_پشذزیثبلاهتنمئدخحضقسفعرصطغظ<|>ّ';

function keyenter(ev){
var
acode = window.event ? window.event.keyCode : ev.charCode;
if (acode>31 && acode<128){
if (ev.target){
ev.target.value +=
String.fromCharCode(arabic.charCodeAt(acode-32));
ev.preventDefault();
}
else{
window.event.keyCode = arabic.charCodeAt(acode-32);
}
}
}

</script>
<!--/Persian Language Script-->

just put this onkeypress="keyenter(event)" like this:

<textarea name="postText" id="postText" cols="38" rows="10" class="textForm postingForm" tabindex="2" onkeypress="keyenter(event)">{$postText}</textarea>


Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications / Write in Persian by switchboard Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB