• hello friend ..

    i using ip geo block in my chat script to block so country ..

    but i found some issue ..

    https://www.moonmasr.com/mchat/

    facebook login button not work also emotion in chat

    you can click on ?????? ?????

    and typing any name like name123
    click on emotion icone then try to click on any emotion not insert in chat box

    im using this
    <?php
    // Load the WordPress library.
    require_once( dirname( dirname(__FILE__) ) . ‘/wp-load.php’ );

    // Start your script.
    ;

    in chat index.php

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter egy6girls

    (@egy6girls)

    and while i didn’t add this line
    // Load the WordPress library.
    require_once( dirname( dirname(__FILE__) ) . ‘/wp-load.php’ );
    in chat index
    every thing back to work again ..

    i not face this issue before last 3 updates for ip geo plugin .

    Plugin Author tokkonopapa

    (@tokkonopapa)

    Hi @egy6girls,

    I assume that your chat page has changed to one of the WordPress page using a certain template since you posted last, because:

    and while i didn’t add this line
    // Load the WordPress library.
    require_once( dirname( dirname(__FILE__) ) . ‘/wp-load.php’ );
    in chat index every thing back to work again ..

    It means your chat page does not need to include wp-load.php any more.

    For you and other users, I’d like to introduce another way how to add a specific type of template.

    1. Make a template page named chat-page and put it into your theme or child theme folder as named chat-page.php:

    <?php
    /**
     * Template Name: chat-page
     */
    
    get_header(); ?>
    
    <div class="wrap">
    <?php
        // you script here
        $option = IP_Geo_Block::get_option();
        $ipadrs = IP_Geo_Block::get_ip_address( $option );
        $geoloc = IP_Geo_Block::get_geolocation( $ipadrs );
        $result = IP_Geo_Block::validate_country( NULL, $geoloc, $option );
    ?>
        <pre><?php var_dump( $geoloc, $result ); ?></pre>
    </div><!-- .wrap -->
    
    <?php get_footer();

    2. Make a page using chat-page template:

    Creating a chat page

    3. Enqueue/Dequeue your custom css and js in your functions.php using template tag is_page_template():

    add_action( 'wp_print_scripts', 'my_page_template' );
    function my_page_template() {
        if ( is_page_template( 'chat-page.php' ) ) {
            // dequeue a certain IP Geo Block js file if you don't need it
            wp_dequeue_script( 'ip-geo-block-auth-nonce' );
        }
    }

    4. Done!

    Chat page

    Thread Starter egy6girls

    (@egy6girls)

    thanks in advance for this way..
    but my chat page is another script not related to wordpress.
    it’s have a folder called /mchat

    also since last 2 / 3 pulgin update , its work fine .
    there is from 3 months, 1 week ago.

    It means that every visitor to /mchat/ should load WordPress core once. But I do not know what will happen as a side effect ”

    at this time is no side effect happen .

    Thread Starter egy6girls

    (@egy6girls)

    i put that line
    require_once( dirname( dirname(__FILE__) ) . ‘/wp-load.php’ );
    at end of the page.
    everything work fine.

    BesT Regards
    kero

    Thread Starter egy6girls

    (@egy6girls)

    mmm
    it work fine
    it was cach

    and still some button not work

    Plugin Author tokkonopapa

    (@tokkonopapa)

    Hi @egy6girls,

    and still some button not work

    How is the button related to my plugin? What happens when you click the button.

    Usually, certain JavaScript code will run when you click it. Then the script will do something or request to somewhere.

    I understand that you just use my plugin as a PHP program in your original chat program which is not related to WordPress.

    I can get nothing from just

    button not work

    . Please include as much information as possible.

    • This reply was modified 6 years, 5 months ago by tokkonopapa.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘i have some issue some buttons not work and emo icones’ is closed to new replies.