Y'day i was moving my Joomla 1.7 local site on live server. Everything was going correct & when i opened my site i got this error "Infinite loop detected in JError". I haven't done anything wrong then why this error ocurred. Same thing i tried one more time but same problem.
I googled this error. Somewhere told that it was hosting problem so call hosting support & they will solve this problem & somewhere was go to such n such line number in Joomla folder n replace those lines with these n all. Somewhere told that you have entered wrong database either username, password or database name in configuration file, but i have entered correct database details & checked 10 times whether i did any mistake.
At last decided to write to hosting support team. It was not their problem then how are they going to solve it. While waiting reply from hosting i checked whether i assigned correct user to correct database. Opened Cpanel & assigned correctly & it worked hushhh....
Finally the coclusion is that if you are getting "Infinite loop detected in JError" error. Then just check whether you have assigned corret user to correct database. That was it. I am glad that i solved this error myself. I am sharing this through my blog cause i didn't get correct answer & i'll be happy if this help you.
Friday, March 2, 2012
Wednesday, February 8, 2012
True Joomla Related Article module
Recently i wanted a module which shows list of related articles. You will say "ohh..! no problem you will get it easily from joomla extensions." Yeah thats right but lets clear what exactly 'related article' means. Ok related article means those articles which are from same categories. Correct, isn't it? That is what my requirement was. So i didn't get any module which fullfil my 'Related Articles' defination. So created 'True Related Articles' module for Joomla 1.7 which does what i explained. Based on the article id from url it pulls list of articles from same category. If you want it you can download here.
Sunday, January 22, 2012
User - Domain Restriction for Joomla and Jomsocial
Recently I was asked to create a plugin which allows new user to register with specific list of email-domains. For e.g. i want to allow to register only those users who have gmail addresses.
I was not aware of whether the site is using Jomsocial.
So created two plugins one user plugin for Joomla registration & community plugin for Jomsoical.
Added snippet for jomsocial on onRegisterValidate event & for joomla its onBeforeStoreUser.
Compared entered email domain with the list of email-domains configuration parameter of the plugin.
I was thinking of creating just a plugin instead of two plugin but didn't get jomsocial data on joomla's onBeforeStoreUser event. That's why created two plugin.
You can download these plugins here for Jomsocial & Joomla
I was not aware of whether the site is using Jomsocial.
So created two plugins one user plugin for Joomla registration & community plugin for Jomsoical.
Added snippet for jomsocial on onRegisterValidate event & for joomla its onBeforeStoreUser.
Compared entered email domain with the list of email-domains configuration parameter of the plugin.
I was thinking of creating just a plugin instead of two plugin but didn't get jomsocial data on joomla's onBeforeStoreUser event. That's why created two plugin.
You can download these plugins here for Jomsocial & Joomla
Saturday, December 10, 2011
Sobi2 Tabbing css n some problems
Installed sobi2 Joomla component on your site..? Then you should use sobi2 tabs on the Details View of your directory at least. Well its very easy if you find this page.
Just go through the above page you will get it. Its easy. Find the sobi2.details.tmpl.php from correct folder(depends on selected template) & add tabbing code in this file according to your requirement.
I guess definitely you want to customize this default tabbing style to suit your site.
To change css go to com_sobi2/includes/tab.webfx.css & make as you want. check this css file for reference.
If everything is fine then don't read this. If your page is going up-down when you click on the tabs you have created then go to com_sobi2/includes/js/tabpane.js & comment line no. 209 which contain a.href = "#"; Don't worry it won't affect anywhere so make this change without hesitation.
Just go through the above page you will get it. Its easy. Find the sobi2.details.tmpl.php from correct folder(depends on selected template) & add tabbing code in this file according to your requirement.
I guess definitely you want to customize this default tabbing style to suit your site.
To change css go to com_sobi2/includes/tab.webfx.css & make as you want. check this css file for reference.
If everything is fine then don't read this. If your page is going up-down when you click on the tabs you have created then go to com_sobi2/includes/js/tabpane.js & comment line no. 209 which contain a.href = "#"; Don't worry it won't affect anywhere so make this change without hesitation.
Wednesday, December 7, 2011
Jomsocial creating a new group - pre-select the proper category
When we create a new group in Jomsocial, we have to select category from drop-down. Jomsocial shows the list of categories you have created from back-end in accending order of category names. What if you want to change a default value, don't look at administrator site there is no option. So for that you need to just override groups.forms.php file from template folder & add this code at the end. The value will be changed according to what should set as a default value from the options(just inspect element n find value).
<script>
joms.jQuery("#categoryid option[value='1']").attr("selected", "selected");
</script>
e.g if have Automotive, Business, General, Internet, Music as categories Jomsocial displays Automative now it shows General as default. That is what i wanted.
When creating a new group, it should pre-select the proper category.
<script>
joms.jQuery("#categoryid option[value='1']").attr("selected", "selected");
</script>
e.g if have Automotive, Business, General, Internet, Music as categories Jomsocial displays Automative now it shows General as default. That is what i wanted.
When creating a new group, it should pre-select the proper category.
Saturday, December 3, 2011
Powered by Sigsiu.NET remove
Have Joomla website & used sobi2 component...? Then definitely you must be wondering to remove the line 'Powered by Sigsiu.NET'. When my TL told to remove this line, first i googled & looked at sobi2 forum but i didn't get anywhere. I thought its not big problem let us try.
I got the solution. You want it then say thanks to sobi2 component developers then n then you can see following lines.
To remove Powered by Sigsiu.NET.
Just open frontend.class.php file in com_sobi2
find getFooter funtion & replace return $this->sobi2Footer; to return; .
that's it.
I got the solution. You want it then say thanks to sobi2 component developers then n then you can see following lines.
To remove Powered by Sigsiu.NET.
Just open frontend.class.php file in com_sobi2
find getFooter funtion & replace return $this->sobi2Footer; to return; .
that's it.
Friday, November 11, 2011
How to show modal popup window on login in joomla
Wanted to show an article in a modal popup window to the user when log-in to the site first time & the article is updated as well. So that created a system plugin & triggered the onAfterRender event. Checked the userlastvisitdate. If its 0000-00-00 00:00:00 excuted a javascript code which shows popup modal to the logged in user. Its easy to write what i did but very diffcult at the time of coding. code is as follows
function onAfterRender()
{
$user = &JFactory::getUser();
$js = '';
$plugin = JPluginHelper::getPlugin( 'system', 'popupmodal' );
$plugin_params = new JParameter( $plugin->params );
$first_article = $plugin_params->get('firstlogin_article');
if($user->lastvisitDate == "0000-00-00 00:00:00")
{
$js = <<<EOT
<script>
var dummylink = new Element('a', {
href: "index.php?option=com_content&view=article&id=<?php echo $first_article; ?>&tmpl=component" ,
rel: "{handler: 'iframe', size: {x: 350, y: 350}}"
});
SqueezeBox.fromElement(dummylink);
</script>
EOT;
}
$user =''; // i stuck at this line cause when user logged in still i was getting lastvisitdate 0.
$body = JResponse::getBody();
$body = str_replace('</body>', $js.'</body>', $body);
JResponse::setBody($body);
}
Half work was done here. Now needed to show this popup modal to all the user of site when they log-in when article which showing in popup modal updated. It was tricky first we need to check whether that article has been updated. To check that we triggered onAfterRoute & execute the follwing code which checks article id & whether the task is save if it is then update lastvisitDate for all user so that our above condition satisfied & every user can see popup modal on log-in.
function onAfterRoute()
{
$id = JRequest::getVar('id');
$task = JRequest::getVar('task');
$plugin = JPluginHelper::getPlugin( 'system', 'popupmodal' );
$plugin_params = new JParameter( $plugin->params );
$frst_art = $plugin_params->get('firstlogin_article');
if($id == $first_article && $task == "save")
{
$db = JFactory :: getDBO();
$query = 'UPDATE #__users SET lastvisitDate = "0000-00-00 00:00:00"';
$db->setQuery($query);
$db->query();
}
}
I'll save your work you can download the plugin here
Subscribe to:
Posts (Atom)
