uhking
09-06-2011, 04:03 AM
hi,
I have a jquery plugin which converts textareas / Inputs to Urdu Keyboard but that plugin doesn't work with ckeditor (VB 4.1.5) because ckeditor takes some time to load.
Request you to please let me know if there is a way to load my jquery plugin after some delay?
I have added jquery code at the bottom of headinclude template:
<link rel="stylesheet" type="text/css" href="{vb:raw vboptions.bburl}/clientscript/UrduEditor.css" />
<link rel="stylesheet" type="text/css" href="{vb:raw vboptions.bburl}/clientscript/keyboard.css" />
<script src="{vb:raw vboptions.bburl}/clientscript/VirtualKeyboard/vk_loader.js?vk_layout=PK%20Urdu%20CRULP%20Phoneti c&vk_skin=flat_gray" ></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script src="{vb:raw vboptions.bburl}/clientscript/jquery.UrduEditor.js" type="text/javascript"></script>
<script src="{vb:raw vboptions.bburl}/clientscript/keyboard.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
jqcc = jQuery.noConflict(true);
jqcc.fn.UrduEditor.defaults.EditorFont = 'Jameel Noori Nastaleeq';
//jQ = jQuery.noConflict(true);
jqcc(document).ready(function () {
<vb:if condition="THIS_SCRIPT == 'newthread'">
jqcc('#title').UrduEditor("14px"); jqcc("#title").addClass("keyboardInput");
jqcc('#subject').UrduEditor("14px"); jqcc("#subject").addClass("keyboardInput");
jqcc(this).UrduEditor.writeKeyboard(jqcc('#vB_Edit or_001_textarea'));
jqcc('#vB_Editor_001_textarea').UrduEditor("18px");
jqcc('#tagpopup_ctrl').UrduEditor("14px"); jqcc("#tagpopup_ctrl").addClass("keyboardInput");
<vb:elseif condition="THIS_SCRIPT == 'newreply'" />
jqcc('#title').UrduEditor("14px"); jqcc("#title").addClass("keyboardInput");
jqcc(this).UrduEditor.writeKeyboard(jqcc('#vB_Edit or_QR_textarea'));
jqcc('#vB_Editor_QR_textarea').UrduEditor("18px");
<vb:elseif condition="THIS_SCRIPT == 'showthread'" />
jqcc(this).UrduEditor.writeKeyboard(jqcc('.cke_sou rce'));
jqcc('.cke_source').UrduEditor("18px");
<vb:elseif condition="THIS_SCRIPT == 'member'" />
jqcc(this).UrduEditor.writeKeyboard(jqcc('#vB_Edit or_QR_textarea'));
jqcc('#vB_Editor_QR_textarea').UrduEditor("18px");
<vb:elseif condition="THIS_SCRIPT == 'editpost'" />
jqcc("input[name='reason']").UrduEditor("14px"); jqcc("input[name='reason']").addClass("keyboardInput");
jqcc('#titlefield').UrduEditor("14px"); jqcc("#titlefield").addClass("keyboardInput");
jqcc('#editreason').UrduEditor("14px"); jqcc("#editreason").addClass("keyboardInput");
jqcc(this).UrduEditor.writeKeyboard(jqcc('#vB_Edit or_001_textarea'));
jqcc('#vB_Editor_001_textarea').UrduEditor("18px");
<vb:elseif condition="THIS_SCRIPT == 'profile'" />
jqcc('#buddylist_add_txt').UrduEditor("14px"); jqcc("#buddylist_add_txt").addClass("keyboardInput");
<vb:elseif condition="THIS_SCRIPT == 'private'" />
jqcc('#pmrecips_ctrl').UrduEditor("14px"); jqcc("#pmrecips_ctrl").addClass("keyboardInput");
jqcc('#bccpmrecips_ctrl').UrduEditor("14px"); jqcc("#bccpmrecips_ctrl").addClass("keyboardInput");
jqcc('#title').UrduEditor("14px"); jqcc("#title").addClass("keyboardInput");
jqcc(this).UrduEditor.writeKeyboard(jqcc('#vB_Edit or_001_textarea'));
jqcc('#vB_Editor_001_textarea').UrduEditor("18px");
jqcc('#vB_Editor_QR_textarea').UrduEditor("18px"); jqcc("#vB_Editor_QR_textarea").addClass("keyboardInput");
jqcc('#searchuser_ctrl').UrduEditor("14px"); jqcc("#searchuser_ctrl").addClass("keyboardInput");
jqcc('#searchtitle').UrduEditor("14px"); jqcc("#searchtitle").addClass("keyboardInput");
<vb:elseif condition="THIS_SCRIPT == 'blog'" />
jqcc('#quicksearch_blog_text').UrduEditor("14px"); jqcc("#quicksearch_blog_text").addClass("keyboardInput");
<vb:elseif condition="THIS_SCRIPT == 'blog_post'" />
jqcc("input[name='title']").UrduEditor("14px"); jqcc("input[name='title']").addClass("keyboardInput");
jqcc(this).UrduEditor.writeKeyboard(jqcc('#vB_Edit or_001_textarea'));
jqcc('#vB_Editor_001_textarea').UrduEditor("18px");
jqcc('#tag_input').UrduEditor("14px"); jqcc("#tag_input").addClass("keyboardInput");
<vb:elseif condition="THIS_SCRIPT == 'blog_report'" />
jqcc("textarea[name='reason']").UrduEditor("16px"); jqcc("textarea[name='reason']").addClass("keyboardInput");
<vb:elseif condition="THIS_SCRIPT == 'report'" />
jqcc('#message').UrduEditor("14px"); jqcc("#message").addClass("keyboardInput");
<vb:elseif condition="THIS_SCRIPT == 'content'" />
jqcc('#title').UrduEditor("14px"); jqcc("#title").addClass("keyboardInput");
jqcc(this).UrduEditor.writeKeyboard(jqcc('#vB_Edit or_001_textarea'));
jqcc('#vB_Editor_001_textarea').UrduEditor("18px");
jqcc('#html_title').UrduEditor("14px"); jqcc("#html_title").addClass("keyboardInput");
jqcc("textarea[name='description']").UrduEditor("16px"); jqcc("textarea[name='description']").addClass("keyboardInput");
jqcc('#keywords').UrduEditor("14px"); jqcc("#keywords").addClass("keyboardInput");
jqcc("input[name='title']").UrduEditor("14px"); jqcc("input[name='taglist']").addClass("keyboardInput");
<vb:elseif condition="THIS_SCRIPT == 'infraction'" />
jqcc('#title').UrduEditor("14px"); jqcc("#title").addClass("keyboardInput");
jqcc(this).UrduEditor.writeKeyboard(jqcc('#vB_Edit or_001_textarea'));
jqcc('#vB_Editor_001_textarea').UrduEditor("18px");
<vb:elseif condition="THIS_SCRIPT == 'entry'" />
jqcc(this).UrduEditor.writeKeyboard(jqcc('#vB_Edit or_QR_textarea'));
jqcc('#vB_Editor_QR_textarea').UrduEditor("18px");
<vb:elseif condition="THIS_SCRIPT == 'group'" />
jqcc('#groupname').UrduEditor("14px"); jqcc("#groupname").addClass("keyboardInput");
jqcc('#groupdesc').UrduEditor("16px"); jqcc("#groupdesc").addClass("keyboardInput");
jqcc("input[name='Subject']").UrduEditor("14px"); jqcc("input[name='Subject']").addClass("keyboardInput");
jqcc(this).UrduEditor.writeKeyboard(jqcc('#vB_Edit or_001_textarea'));
jqcc('#vB_Editor_001_textarea').UrduEditor("18px");
jqcc('#message').UrduEditor("14px"); jqcc("#message").addClass("keyboardInput");
<vb:elseif condition="THIS_SCRIPT == 'group_inlinemod'" />
jqcc("input[name='deletereason']").UrduEditor("14px"); jqcc("input[name='deletereason']").addClass("keyboardInput");
<vb:elseif condition="THIS_SCRIPT == 'album'" />
jqcc('#ititle').UrduEditor("14px"); jqcc("#ititle").addClass("keyboardInput");
jqcc('#idesc').UrduEditor("14px"); jqcc("#idesc").addClass("keyboardInput");
<vb:elseif condition="THIS_SCRIPT == 'register'" />
jqcc('#regusername').UrduEditor("14px"); jqcc("#regusername").addClass("keyboardInput");
</vb:if>
jqcc('#navbar_username').UrduEditor("16px");
jqcc("input[name='query']").UrduEditor("18px");
jqcc("input[name='q']").UrduEditor("14px");
jqcc('#userfield_txt').UrduEditor("14px"); jqcc("#userfield_txt").addClass("keyboardInput");
jqcc('#tag_add_input').UrduEditor("14px"); jqcc("#tag_add_input").addClass("keyboardInput");
jqcc('#vb_login_username').UrduEditor("14px"); jqcc("#vb_login_username").addClass("keyboardInput");
});
</script>
You can see the working example in the search bar of following link (you can toggle languages by pressing CTRL+Space):
kitabosunnat.com/forum (http://www.kitabosunnat.com/forum/forum.php)
Look forward to have a good response.
Best Regards
I have a jquery plugin which converts textareas / Inputs to Urdu Keyboard but that plugin doesn't work with ckeditor (VB 4.1.5) because ckeditor takes some time to load.
Request you to please let me know if there is a way to load my jquery plugin after some delay?
I have added jquery code at the bottom of headinclude template:
<link rel="stylesheet" type="text/css" href="{vb:raw vboptions.bburl}/clientscript/UrduEditor.css" />
<link rel="stylesheet" type="text/css" href="{vb:raw vboptions.bburl}/clientscript/keyboard.css" />
<script src="{vb:raw vboptions.bburl}/clientscript/VirtualKeyboard/vk_loader.js?vk_layout=PK%20Urdu%20CRULP%20Phoneti c&vk_skin=flat_gray" ></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script src="{vb:raw vboptions.bburl}/clientscript/jquery.UrduEditor.js" type="text/javascript"></script>
<script src="{vb:raw vboptions.bburl}/clientscript/keyboard.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
jqcc = jQuery.noConflict(true);
jqcc.fn.UrduEditor.defaults.EditorFont = 'Jameel Noori Nastaleeq';
//jQ = jQuery.noConflict(true);
jqcc(document).ready(function () {
<vb:if condition="THIS_SCRIPT == 'newthread'">
jqcc('#title').UrduEditor("14px"); jqcc("#title").addClass("keyboardInput");
jqcc('#subject').UrduEditor("14px"); jqcc("#subject").addClass("keyboardInput");
jqcc(this).UrduEditor.writeKeyboard(jqcc('#vB_Edit or_001_textarea'));
jqcc('#vB_Editor_001_textarea').UrduEditor("18px");
jqcc('#tagpopup_ctrl').UrduEditor("14px"); jqcc("#tagpopup_ctrl").addClass("keyboardInput");
<vb:elseif condition="THIS_SCRIPT == 'newreply'" />
jqcc('#title').UrduEditor("14px"); jqcc("#title").addClass("keyboardInput");
jqcc(this).UrduEditor.writeKeyboard(jqcc('#vB_Edit or_QR_textarea'));
jqcc('#vB_Editor_QR_textarea').UrduEditor("18px");
<vb:elseif condition="THIS_SCRIPT == 'showthread'" />
jqcc(this).UrduEditor.writeKeyboard(jqcc('.cke_sou rce'));
jqcc('.cke_source').UrduEditor("18px");
<vb:elseif condition="THIS_SCRIPT == 'member'" />
jqcc(this).UrduEditor.writeKeyboard(jqcc('#vB_Edit or_QR_textarea'));
jqcc('#vB_Editor_QR_textarea').UrduEditor("18px");
<vb:elseif condition="THIS_SCRIPT == 'editpost'" />
jqcc("input[name='reason']").UrduEditor("14px"); jqcc("input[name='reason']").addClass("keyboardInput");
jqcc('#titlefield').UrduEditor("14px"); jqcc("#titlefield").addClass("keyboardInput");
jqcc('#editreason').UrduEditor("14px"); jqcc("#editreason").addClass("keyboardInput");
jqcc(this).UrduEditor.writeKeyboard(jqcc('#vB_Edit or_001_textarea'));
jqcc('#vB_Editor_001_textarea').UrduEditor("18px");
<vb:elseif condition="THIS_SCRIPT == 'profile'" />
jqcc('#buddylist_add_txt').UrduEditor("14px"); jqcc("#buddylist_add_txt").addClass("keyboardInput");
<vb:elseif condition="THIS_SCRIPT == 'private'" />
jqcc('#pmrecips_ctrl').UrduEditor("14px"); jqcc("#pmrecips_ctrl").addClass("keyboardInput");
jqcc('#bccpmrecips_ctrl').UrduEditor("14px"); jqcc("#bccpmrecips_ctrl").addClass("keyboardInput");
jqcc('#title').UrduEditor("14px"); jqcc("#title").addClass("keyboardInput");
jqcc(this).UrduEditor.writeKeyboard(jqcc('#vB_Edit or_001_textarea'));
jqcc('#vB_Editor_001_textarea').UrduEditor("18px");
jqcc('#vB_Editor_QR_textarea').UrduEditor("18px"); jqcc("#vB_Editor_QR_textarea").addClass("keyboardInput");
jqcc('#searchuser_ctrl').UrduEditor("14px"); jqcc("#searchuser_ctrl").addClass("keyboardInput");
jqcc('#searchtitle').UrduEditor("14px"); jqcc("#searchtitle").addClass("keyboardInput");
<vb:elseif condition="THIS_SCRIPT == 'blog'" />
jqcc('#quicksearch_blog_text').UrduEditor("14px"); jqcc("#quicksearch_blog_text").addClass("keyboardInput");
<vb:elseif condition="THIS_SCRIPT == 'blog_post'" />
jqcc("input[name='title']").UrduEditor("14px"); jqcc("input[name='title']").addClass("keyboardInput");
jqcc(this).UrduEditor.writeKeyboard(jqcc('#vB_Edit or_001_textarea'));
jqcc('#vB_Editor_001_textarea').UrduEditor("18px");
jqcc('#tag_input').UrduEditor("14px"); jqcc("#tag_input").addClass("keyboardInput");
<vb:elseif condition="THIS_SCRIPT == 'blog_report'" />
jqcc("textarea[name='reason']").UrduEditor("16px"); jqcc("textarea[name='reason']").addClass("keyboardInput");
<vb:elseif condition="THIS_SCRIPT == 'report'" />
jqcc('#message').UrduEditor("14px"); jqcc("#message").addClass("keyboardInput");
<vb:elseif condition="THIS_SCRIPT == 'content'" />
jqcc('#title').UrduEditor("14px"); jqcc("#title").addClass("keyboardInput");
jqcc(this).UrduEditor.writeKeyboard(jqcc('#vB_Edit or_001_textarea'));
jqcc('#vB_Editor_001_textarea').UrduEditor("18px");
jqcc('#html_title').UrduEditor("14px"); jqcc("#html_title").addClass("keyboardInput");
jqcc("textarea[name='description']").UrduEditor("16px"); jqcc("textarea[name='description']").addClass("keyboardInput");
jqcc('#keywords').UrduEditor("14px"); jqcc("#keywords").addClass("keyboardInput");
jqcc("input[name='title']").UrduEditor("14px"); jqcc("input[name='taglist']").addClass("keyboardInput");
<vb:elseif condition="THIS_SCRIPT == 'infraction'" />
jqcc('#title').UrduEditor("14px"); jqcc("#title").addClass("keyboardInput");
jqcc(this).UrduEditor.writeKeyboard(jqcc('#vB_Edit or_001_textarea'));
jqcc('#vB_Editor_001_textarea').UrduEditor("18px");
<vb:elseif condition="THIS_SCRIPT == 'entry'" />
jqcc(this).UrduEditor.writeKeyboard(jqcc('#vB_Edit or_QR_textarea'));
jqcc('#vB_Editor_QR_textarea').UrduEditor("18px");
<vb:elseif condition="THIS_SCRIPT == 'group'" />
jqcc('#groupname').UrduEditor("14px"); jqcc("#groupname").addClass("keyboardInput");
jqcc('#groupdesc').UrduEditor("16px"); jqcc("#groupdesc").addClass("keyboardInput");
jqcc("input[name='Subject']").UrduEditor("14px"); jqcc("input[name='Subject']").addClass("keyboardInput");
jqcc(this).UrduEditor.writeKeyboard(jqcc('#vB_Edit or_001_textarea'));
jqcc('#vB_Editor_001_textarea').UrduEditor("18px");
jqcc('#message').UrduEditor("14px"); jqcc("#message").addClass("keyboardInput");
<vb:elseif condition="THIS_SCRIPT == 'group_inlinemod'" />
jqcc("input[name='deletereason']").UrduEditor("14px"); jqcc("input[name='deletereason']").addClass("keyboardInput");
<vb:elseif condition="THIS_SCRIPT == 'album'" />
jqcc('#ititle').UrduEditor("14px"); jqcc("#ititle").addClass("keyboardInput");
jqcc('#idesc').UrduEditor("14px"); jqcc("#idesc").addClass("keyboardInput");
<vb:elseif condition="THIS_SCRIPT == 'register'" />
jqcc('#regusername').UrduEditor("14px"); jqcc("#regusername").addClass("keyboardInput");
</vb:if>
jqcc('#navbar_username').UrduEditor("16px");
jqcc("input[name='query']").UrduEditor("18px");
jqcc("input[name='q']").UrduEditor("14px");
jqcc('#userfield_txt').UrduEditor("14px"); jqcc("#userfield_txt").addClass("keyboardInput");
jqcc('#tag_add_input').UrduEditor("14px"); jqcc("#tag_add_input").addClass("keyboardInput");
jqcc('#vb_login_username').UrduEditor("14px"); jqcc("#vb_login_username").addClass("keyboardInput");
});
</script>
You can see the working example in the search bar of following link (you can toggle languages by pressing CTRL+Space):
kitabosunnat.com/forum (http://www.kitabosunnat.com/forum/forum.php)
Look forward to have a good response.
Best Regards