Important security update, please update to Osclass 3.7.4
At Osclass we have changed our Privacy Policy and Terms of Use in order to adapt them to the new General Data Protection Regulation (GDPR). We want you to know what user data we store, what we need them for, and who we share them with in each specific case. Furthermore, we are making it even easier for you to exercise your right to manage your own data.
Our goal is that you enjoy the best possible experience with our website. As the GDPR comes into force, legislation requires us that you grant us permission—both to us and our partners—to store cookies in your browser. Remember you can find more information about what we do with your data by clicking here.
I accept Osclass SL’s Terms of Use and Cookies Policy and grant them permission to manage my data.
<?php/* Plugin Name: Search By Voice Plugin URI: http://osclass.org Description: Search by Voice Version: 1.0.1 Author: Carlison Author Email: ******* Author URI: http://osclass.org Plugin update URI: search-by-voice Short Name: search-by-voice */function search_by_voice_install() { //nothing for now}function search_by_voice_uninstall() { //nothing for now }function search_by_voice() { ?><style> .speech {border: 1px solid #DDD; width: 300px; padding: 0; margin: 0} .speech input {border: 0; width: 240px; display: inline-block; height: 30px;} .speech img {float: right; width: 40px }</style><!-- Search Form --><form id="labnol" method="get" action="<?php echo osc_base_url() ; ?>index.php?page=search"> <div class="speech"> <input type="text" name="q" id="transcript" placeholder="Speak" /> <img onclick="startDictation()" src="<?php echo osc_base_url() ; ?>/oc-content/plugins/search_by_voice/search.gif" /> </div></form><!-- HTML5 Speech Recognition API --><script> function startDictation() { if (window.hasOwnProperty('webkitSpeechRecognition')) { var recognition = new webkitSpeechRecognition(); recognition.continuous = false; recognition.interimResults = false; recognition.lang = "en-US"; recognition.start(); recognition.onresult = function(e) { document.getElementById('transcript').value = e.results[0][0].transcript; recognition.stop(); document.getElementById('labnol').submit(); }; recognition.onerror = function(e) { recognition.stop(); } } }</script> <?php}function search_by_voice_config() { osc_admin_render_plugin('search_by_voice/help.php');}osc_add_hook(osc_plugin_path(__FILE__) . "_configure", 'search_by_voice_config');osc_add_hook('search_by_voice_form', 'search_by_voice');osc_register_plugin(osc_plugin_path(__FILE__), 'search_by_voice_install');osc_add_hook(osc_plugin_path(__FILE__) . "_uninstall", 'search_by_voice_uninstall');
when i have use with theme then it was not work
please be more specific...Quote from: _Carlisonwhen i have use with theme then it was not work