Code to get the Facebook login status on a website

Embed the code to know the login status of a user on a a website

It will tell you whether the user is logged in or not in his facebook account.if user is logged in then it will fetch the user name and profile pic and will display it.


<h1>Login, Logout, Name and Profile Picture</h1>
<div id=”account-info”></div>

function showAccountInfo() {
method: ‘fql.query’,
query: ‘SELECT name, pic_square FROM user WHERE uid=’+FB.getUserID()
function(response) {‘API Callback’, response);
document.getElementById(‘account-info’).innerHTML = (
‘<img src=”‘ + response[0].pic_square + ‘”> ‘ +
response[0].name +
‘ <button class=”btn” onclick=”FB.logout()”>Logout</button>’


function showLoginButton() {
document.getElementById(‘account-info’).innerHTML = (
‘<button class=”btn btn-primary” onclick=”FB.login()”>Login</button>’


function onStatus(response) {‘onStatus’, response);
if (response.status === ‘connected’) {
} else {
FB.getLoginStatus(function(response) {
FB.Event.subscribe(‘auth.statusChange’, onStatus);

How to add Jquery Datepicker/Calender Plugin in wordpress form

It takes time to add jquery ui calneder plugin to add in WordPress

The reason is the jquery conflict which arise due to many JS libraries in the wordpress theme

To add the calender follow the steps

add the below script


<input type=”text” name=”jdate” id=”journeydate”>


wp_enqueue_style(‘jquery-style’, ‘’);

in the above css link you can replace “dot-luv” with your jquery ui theme name. (another trick 4 u ;) )
<script type=”text/javascript”>

jQuery(document).ready(function() {
dateFormat : ‘dd-mm-yy’


Keep Coding !

Zombie Softwares(\m/)


How to close bootstrap modal manually

I was working on a project , i have a scenario where i need to close the modal for the save with using Ajax content displaying in the modal box.

I don’t want to refresh the page , since i was using form with modal box. To close the modal use below code.


Hope it works for someone.

base_url() not working in Codeigniter

In Codeigniter we user base_url() to refer as site url of the website.

We set its value in config.php file in the config folder.

If base_url() is not working then , it means you have not loaded the helper file.

so you have to add below lines in the autoload.php file

$autoload['helper'] = array(‘url’);

.Hope it works for you :)