Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter GoriGeek

    (@ivett)

    Now I’ts working fine! it was a problem with the Theme I just changed the theme!

    Plugin Author blaccspotmedia

    (@blaccspotmedia)

    Great!

    Dear Plugin Author,
    Is it posible to only see the plugin when member are login to my site and not on every page.
    Where is de code in php that i cam change en what to change?
    I just only want to let members see the chatoption.
    Hoop to hear from you soon.
    Kind regards,
    Rick

    Plugin Author blaccspotmedia

    (@blaccspotmedia)

    Hi Rafaello,

    You can add a check for the login in the following file/function.

    Locate the plugin folder /vidone/functions/wp.php

    function wp_set()

    you can wrap everything thats in the function in your login check so…

    function wp_set()
    {

    if($login){
    ……all current script
    }

    }

    Hi blaccspotmedia,
    Thanks for the fast reply, i tried to do what you suggested.
    If i Put if put unction wp_set()
    {

    if($login){
    ……all current script
    }

    }

    in wp.php

    WordPress doesn’t work anymore.

    <?php

    /* SET UP WORDPRESS FOR VID{ONE}

    /*—————————*/

    function wp_set()

    {
    if($login){

    /*UPDATE JQUERY*/

    add_action(‘wp_enqueue_scripts’, ‘prefix_load_scripts’);

    /*REGISTER SCRIPT*/

    wp_register_script(‘vidone_widget’, VIDONE_PLUGINFULLURL.’js/vidtok-vidone-widget-v1.1.min.js’);

    /*LOCALIZE SCRIPT*/

    wp_localize_script(‘vidone_widget’, ‘vidoneAjax’, array(‘ajaxurl’ => admin_url(‘admin-ajax.php’)));

    etc..etc

    Plugin Author blaccspotmedia

    (@blaccspotmedia)

    Sorry replace

    if($login){

    }

    ….with ….

    if (is_user_logged_in()){

    }

    blaccspotmedia?
    }

    if (is_user_logged_in()){

    }

    it doesn t work neither.
    I get a server error

    This is what i got and getting a server error:

    <?php
    
    /*  SET UP WORDPRESS FOR VID{ONE}
    
    /*---------------------------*/
    
    	function wp_set()
    }
    
    if (is_user_logged_in()){
    
    }
    		{
    
    			/*UPDATE JQUERY*/
    
    				add_action('wp_enqueue_scripts', 'prefix_load_scripts');
    
    			/*REGISTER SCRIPT*/
    
    				wp_register_script('vidone_widget', VIDONE_PLUGINFULLURL.'js/vidtok-vidone-widget-v1.1.min.js'); 
    
    			/*LOCALIZE SCRIPT*/
    
    				wp_localize_script('vidone_widget', 'vidoneAjax', array('ajaxurl' => admin_url('admin-ajax.php')));	 
    
    			/*ENQUEUE JQUERY*/
    
    				wp_enqueue_script('jquery'); 
    
    			/*ENQUEUE VID{ONE} WIDGET*/	 
    
    				wp_enqueue_script('vidone_widget');	
    
    				wp_enqueue_style('vidone', plugins_url() . '/vidtok-vidone-video-chat-using-tokboxs-opentok-api/css/vidone.css'); 
    
    				wp_enqueue_style('bootstrap', plugins_url() . '/vidtok-vidone-video-chat-using-tokboxs-opentok-api/css/bootstrap.min.css'); 
    
    				wp_enqueue_script('tokbox', 'https://static.opentok.com/v1.1/js/TB.min.js'); 
    
    				wp_enqueue_script('watermark', plugins_url() . '/vidtok-vidone-video-chat-using-tokboxs-opentok-api/js/jquery.watermark.js', array('jquery'));
    
    				wp_enqueue_script('purl', plugins_url() . '/vidtok-vidone-video-chat-using-tokboxs-opentok-api/js/purl.js', array('jquery')); 
    
    				wp_enqueue_script('vidtok-vidone', 'https://static.vidtok.co/vidone/v1.0/stable/vidtok.vidone.v1.0.min.js', array('jquery'));
    
    		}
    
    /*  REQUIRE JQUERY 1.8.3
    
    /*---------------------------*/		
    
    	function prefix_load_scripts() {
    
    		if(is_admin()) return;
    
    		global $wp_scripts;
    
    		if($wp_scripts->registered['jquery']->ver != '1.8.3'){ 
    
    			wp_deregister_script( 'jquery' );
    
    			wp_enqueue_script('jquery', 'https://code.jquery.com/jquery-1.8.3.min.js');
    
    		}else{
    
    			wp_enqueue_script('jquery');
    
    		}
    
    	}

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Plugin Author blaccspotmedia

    (@blaccspotmedia)

    Please erase everything in your file and replace it with:

    <?php
    
    /*  SET UP WORDPRESS FOR VID{ONE}
    /*---------------------------*/
    
    	function wp_set()
    		{
    
    			if (is_user_logged_in()){
    
    			/*UPDATE JQUERY*/
    				add_action('wp_enqueue_scripts', 'prefix_load_scripts');
    
    			/*REGISTER SCRIPT*/
    				wp_register_script('vidone_widget', VIDONE_PLUGINFULLURL.'js/vidtok-vidone-widget-v1.1.min.js'); 
    
    			/*LOCALIZE SCRIPT*/
    				wp_localize_script('vidone_widget', 'vidoneAjax', array('ajaxurl' => admin_url('admin-ajax.php')));	 
    
    			/*ENQUEUE JQUERY*/
    				wp_enqueue_script('jquery'); 
    
    			/*ENQUEUE VID{ONE} WIDGET*/
    				wp_enqueue_script('vidone_widget');	
    
    				wp_enqueue_style('vidone', plugins_url() . '/vidtok-vidone-video-chat-using-tokboxs-opentok-api/css/vidone.css');
    				wp_enqueue_style('bootstrap', plugins_url() . '/vidtok-vidone-video-chat-using-tokboxs-opentok-api/css/bootstrap.min.css'); 
    
    				wp_enqueue_script('tokbox', 'https://static.opentok.com/v1.1/js/TB.min.js');
    				wp_enqueue_script('watermark', plugins_url() . '/vidtok-vidone-video-chat-using-tokboxs-opentok-api/js/jquery.watermark.js', array('jquery'));
    				wp_enqueue_script('purl', plugins_url() . '/vidtok-vidone-video-chat-using-tokboxs-opentok-api/js/purl.js', array('jquery'));
    				wp_enqueue_script('vidtok-vidone', 'https://static.vidtok.co/vidone/v1.0/stable/vidtok.vidone.v1.0.min.js', array('jquery'));
    
    			}
    
    		}
    
    /*  REQUIRE JQUERY 1.8.3
    /*---------------------------*/		
    
    	function prefix_load_scripts() {
    		if(is_admin()) return;
    
    		global $wp_scripts;
    
    		if($wp_scripts->registered['jquery']->ver != '1.8.3'){ 
    
    			wp_deregister_script( 'jquery' );
    			wp_enqueue_script('jquery', 'https://code.jquery.com/jquery-1.8.3.min.js');
    
    		}else{
    
    			wp_enqueue_script('jquery');
    
    		}
    	}

    Thanks for the reply. This works.
    i’m very grateful.
    Kind regards

    Plugin Author blaccspotmedia

    (@blaccspotmedia)

    Great!

    Is it possible for this to do the following…

    Creating a online site something where visitors can join and talk to specialists in a field. Can this plugin show whos online or even I can use BuddyPress for the and can implement a chat now or book appointment to chat with the person.

    Basically something like signing up to talk to specialist it records how long you chat etc so they can be billed.

    Plugin Author blaccspotmedia

    (@blaccspotmedia)

    We are developing new features in the next iteration of the plugin and it will include that ability. Sign up for an account on vidtok.co and will notice you once the plugin is available.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘vid{one} video chat using Tokbox afects my webpage design’ is closed to new replies.