× Joomla Facebook Connect support forum

Topic-icon Empty mod_jfbclogin

Active Subscriptions:

None
12 years 4 months ago #16606 by playak
Empty mod_jfbclogin was created by playak
i clean up the template for mod_jfbclogin after every upgrade. would be cool if you could do it in the distribution. my problem is that I don't want to show anything to logged in users (i use a different module for that), so i disabled profile picture, powered by etc in the module settings, but it still contain an empty div element and a couple of linebreaks, so the module still shows up, it just looks empty. solution is simple: change
get('showGreeting');
    $greetingName = $params->get('greetingName');

    if ($showGreeting)
    {
        if ($greetingName == 0) //Username
            $name = $user->get('username');
        else
            $name = $user->get('name');
        echo JText::sprintf('MOD_JFBCLOGIN_WELCOME', $name);
    }
?>
 
to
        $showGreeting = $params->get('showGreeting');
    $greetingName = $params->get('greetingName');

    if ($showGreeting)
    {
		echo "";
        if ($greetingName == 0) //Username
            $name = $user->get('username');
        else
            $name = $user->get('name');
        echo JText::sprintf('MOD_JFBCLOGIN_WELCOME', $name);
		echo "";
    }
and clean up some line breaks between closing and upening php tags.

thanks,
jeroen
The topic has been locked.
Active Subscriptions:

None
12 years 4 months ago #16607 by playak
Replied by playak on topic Empty mod_jfbclogin
hmm, looks like this parser eats the html div elements in my code. anyway, hope you get the idea.
The topic has been locked.
Support Specialist
12 years 4 months ago #16618 by alzander
Replied by alzander on topic Empty mod_jfbclogin
Jeroen,
In the next release of JFBConnect, we'll be replacing the JFBCLogin module with the SCLogin module that will work for both JFBConnect and JLinked. That module breaks out the login and logout files into their own template, because the JFBCLogin module is just plain ugly. Once that happens, you should simply be able to 'clear' the logout.php file (or do whatever you want to make it show nothing).

Hopefully, that will be enough for you, and sorry for all the past trouble upgrading.. hopefully, it will be a thing of the past with 4.1, coming later this month.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 4 months ago #16622 by playak
Replied by playak on topic Empty mod_jfbclogin
thanks. my proposal that that i don't have to change any templates at all. i.e. i just switch off all module output options in the backend, and then it results in an empty module, which means that joomla will not show the module at all. a lot easier than having to change a template after each update...
The topic has been locked.
Support Specialist
12 years 4 months ago #16623 by alzander
Replied by alzander on topic Empty mod_jfbclogin
Jeroen,
Normally, even if a module doesn't output any code, the template will still wrap the 'empty' contents in a div with a class of moduletable. Some templates don't do that, but in that case, they don't use the moduleclass-suffix parameter either, which can be a problem. That's why we (and many other modules) don't have options to hide when logged in, because it's (usually) not truly hidden.

There's 2 ways you can get around this now and one more in the next 4.1 release:
1) Use something like Advanced Module Manager from nonumber.nl. With this, you can easily set specific modules to not display if the user is logged in. This completely hides the module correctly.
2) (Unrealistic, but still going to mention it) Upgrade to Joomla 1.7 which allows you to create different access groups (which will let you hide modules from logged in users).
When 4.1 comes out:
3) Simply add an empty logout.php file to /templates<your_template>/html/mod_sclogin/logout.php - This will create a template override which will always display nothing. That file won't be overridden when you upgrade.

Hope one of those solutions helps!
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 4 months ago #16625 by playak
Replied by playak on topic Empty mod_jfbclogin
thanks alzander. i wasn't aware of that. in the (artisteer) templates i use, empty modules automatically disappear, which i find handy, and logical :)
The topic has been locked.
Support Specialist
12 years 4 months ago #16646 by alzander
Replied by alzander on topic Empty mod_jfbclogin
Jeroen,
We agree that empty modules should just disappear. However, with Joomla 1.5, and the most common style setting used by templates (XHTML), all modules are wrapped in the div I mentioned (so that each module can be styled individually) regardless of the contents.

I do hope the suggestions above help, and like I said, in (and after) 4.1, it should just be creating one file and never having to deal with it for any other upgrades.

Good luck,
Alex
The topic has been locked.