Saturday, September 17, 2011

Please wait while loading image - JavaScript


Today wanted add loading please wait kind of image when user click on likedin button from one of the page of site. Actually when user click on linkedin image it takes time to redirect from site to linkedin log-in. Between this time wanted to show an loading image so that user will get something is happening need to wait for a moment. So initially i thought to use many images & use them with time function it will work as i wanted. First googled to get some ready made script but i didn't get exactly. Later got this link which solved my problem so frequently that i never thought. Just went to that site, chosen the type of image i wanted & called that image in div tag & made that div style block on onClick event. That's it so simple & looks great.
Check the code which is pretty simple.
<scrip>
function showimage()
{
document.geElementById('showloadingimg').style.display = "block";
}
</script>
<a href='link to redirect' onClick="showimage()"><img src="image path" /> </a>
<div id="showloadingimg" style="display: none"><img src="here is path of that downloaded image" />
</div>

Thursday, September 8, 2011

How & when to use DBkiss.php

Working on Joomla site & don't have Cpanel details to access phpmyadmin. Don't want to waste time to get C-panel details. Don't worry here is the solution & that is DBKiss. Its just a php file which allows you to access database. Interface is not to good as compared to phpmyadmin but it works faster than phpmyadmin. If you google you will get dbkiss.php easily, you can find it here as well. Just paste this php file into the root folder & open it in browser. Now submit the database details from configuration.php file. If you submit details correctly, you will get database access. Its not necessary to have Joomla based site for DBKiss. I personally think if you have phpmyadmin access then its nonsense to use DBKiss. This is from developers point of view. Now if you want to give database access someone without sharing C-panel details then you can suggest that person to use DBKiss.

Saturday, September 3, 2011

JUser::_load: Unable to load user with id jomsocial shSEF404 joomla

Installed jomosocial & ShSEF404 components on Joomla site & getting "JUser::_load: Unable to load user(userid)" error, when you view some jomsocial profiles on site.
To solve this issue i did following things hope it will work in your case too.
Go to sh404SEF -> Control panel -> Url Manager.
Search the Jomsocial username's for which you are getting this problem. You can search one username at a time it will be more diffcult if you encounter this problem with large number of profiles.
You will get the list of url related to that profile, look at 'Duplicates' column. Remove those rows where you can see the duplicate values.
Go to the frontend do hard refresh & error will be disabled.
Writtng this post specifically cause if you googled this errror you get most of the nonsense things & waste time while doing that things as i did.