6 added 250 characters in body
source | link
wp_register_script('lightbox',get_template_directory_uri() . '/js/lightbox.js',
                       array(   'jquery', 'wp-ajax-response' ) );
wp_enqueue_script( 'lightbox');
wp_localize_script( 'lightbox', 'MyAjax''ajaxurl', 
                array( 
                    'ajaxurl' => admin_url( 'admin-ajax.php' ),
                )
        );

It was working fine In the morning..But after sometime dont know why it got crashed and didnt work aferwards..Someone

this is what shows in console

<script type="text/javascript">
/* <![CDATA[ */
var wpAjax = {"noPerm":"You do not have permission to do that.","broken":"An unidentified error has occurred."};
/* ]]> */
</script>

Someone please help me

wp_register_script('lightbox',get_template_directory_uri() . '/js/lightbox.js',
                       array(   'jquery', 'wp-ajax-response' ) );
wp_enqueue_script( 'lightbox');
wp_localize_script( 'lightbox', 'MyAjax', 
                array( 
                    'ajaxurl' => admin_url( 'admin-ajax.php' ),
                )
        );

It was working fine In the morning..But after sometime dont know why it got crashed and didnt work aferwards..Someone please help me

wp_register_script('lightbox',get_template_directory_uri() . '/js/lightbox.js',
                       array(   'jquery', 'wp-ajax-response' ) );
wp_enqueue_script( 'lightbox');
wp_localize_script( 'lightbox', 'ajaxurl', 
                array( 
                    'ajaxurl' => admin_url( 'admin-ajax.php' ),
                )
        );

It was working fine In the morning..But after sometime dont know why it got crashed and didnt work aferwards..

this is what shows in console

<script type="text/javascript">
/* <![CDATA[ */
var wpAjax = {"noPerm":"You do not have permission to do that.","broken":"An unidentified error has occurred."};
/* ]]> */
</script>

Someone please help me

5 added 677 characters in body
source | link

Update:

I use the following script to register the js Dont know why it is not applying. Eventhough it gets registered the code is not working...

wp_register_script('lightbox',get_template_directory_uri() . '/js/lightbox.js',
                       array(   'jquery', 'wp-ajax-response' ) );
wp_enqueue_script( 'lightbox');
wp_localize_script( 'lightbox', 'MyAjax', 
                array( 
                    'ajaxurl' => admin_url( 'admin-ajax.php' ),
                )
        );

It was working fine In the morning..But after sometime dont know why it got crashed and didnt work aferwards..Someone please help me

Update:

I use the following script to register the js Dont know why it is not applying. Eventhough it gets registered the code is not working...

wp_register_script('lightbox',get_template_directory_uri() . '/js/lightbox.js',
                       array(   'jquery', 'wp-ajax-response' ) );
wp_enqueue_script( 'lightbox');
wp_localize_script( 'lightbox', 'MyAjax', 
                array( 
                    'ajaxurl' => admin_url( 'admin-ajax.php' ),
                )
        );

It was working fine In the morning..But after sometime dont know why it got crashed and didnt work aferwards..Someone please help me

    Notice removed Draw attention by MidhuN
    Bounty Ended with Sunyatasattva's answer chosen by MidhuN
    Tweeted twitter.com/#!/StackWordPress/status/321305002226380800
4 deleted 331 characters in body
source | link

I have tried the following but it shows all authors list inside the light box.

 add_action( 'wp_ajax_ajaxified_function', 'ajaxified_function' );
 add_action( 'wp_ajax_nopriv_ajaxified_function', 'ajaxified_function' );
 function ajaxified_function() 
 { 
    $authors$author = get_usersget_the_author_meta('role=author&orderby=post_count&order=DESC'$_POST['author_id']);
    foreach($authors as $author) {
        echo "<li id=\"blogger_main\" style=\"float:left\">";
        echo$auth_name "<a= href=\"".get_bloginfothe_author_meta('url')."/?author=";
        echo'display_name', $author->ID;
        echo "\" id=\"bloggers_image\">";>ID);
        echo$avatar= get_avatar($author->ID);
        echo "</a>";
        echo '<div>';
        echo "<a href=\"".get_bloginfo('url')."/?author=";
        echo $author->ID;
        echo "\" id=\"blogger_name\">";
       $desc echo= the_author_meta('display_name''description', $author->ID);
        echo "</a>";
        echo'<div "<id="bloggers_title">'.$auth_name.'</div>";div>
        echo "<div id=\"auth_desc\">";
        echo the_author_meta('description',<div $author->ID);id="bloggers_avatar">'.$avatar.'</div>
        echo "</div>";
        echo<div "<id="bloggers_desc">'.$desc.'</li>";div>';
    }die();
  
}

But this displays all the author list in the light boxjust an image which is not the oneclearly seen Please tell me where I neededhave done wrong.

Hope Hope I am clear with my question. Thanks in advance for any help.

I have tried the following but it shows all authors list inside the light box.

 add_action( 'wp_ajax_ajaxified_function', 'ajaxified_function' );
 add_action( 'wp_ajax_nopriv_ajaxified_function', 'ajaxified_function' );
 function ajaxified_function() 
 { 
    $authors = get_users('role=author&orderby=post_count&order=DESC');
    foreach($authors as $author) {
        echo "<li id=\"blogger_main\" style=\"float:left\">";
        echo "<a href=\"".get_bloginfo('url')."/?author=";
        echo $author->ID;
        echo "\" id=\"bloggers_image\">";
        echo get_avatar($author->ID);
        echo "</a>";
        echo '<div>';
        echo "<a href=\"".get_bloginfo('url')."/?author=";
        echo $author->ID;
        echo "\" id=\"blogger_name\">";
        echo the_author_meta('display_name', $author->ID);
        echo "</a>";
        echo "</div>";
        echo "<div id=\"auth_desc\">";
        echo the_author_meta('description', $author->ID);
        echo "</div>";
        echo "</li>";
    }
 }

But this displays all the author list in the light box not the one I needed.

Hope I am clear with my question. Thanks in advance for any help.

I have tried the following

 add_action( 'wp_ajax_ajaxified_function', 'ajaxified_function' );
 add_action( 'wp_ajax_nopriv_ajaxified_function', 'ajaxified_function' );
 function ajaxified_function() 
{ 
    $author = get_the_author_meta($_POST['author_id']);
    $auth_name = the_author_meta('display_name', $author->ID);
    $avatar= get_avatar($author->ID);
    $desc = the_author_meta('description', $author->ID);
    echo '<div id="bloggers_title">'.$auth_name.'</div>
            <div id="bloggers_avatar">'.$avatar.'</div>
            <div id="bloggers_desc">'.$desc.'</div>';
  die();
 
}

But this displays just an image which is not clearly seen Please tell me where I have done wrong. Hope I am clear with my question. Thanks in advance for any help.

3 deleted 6 characters in body
source | link
    Notice added Draw attention by MidhuN
    Bounty Started worth 50 reputation by MidhuN
2 added 1761 characters in body
source | link
1
source | link