× Joomla Facebook Connect support forum

Topic-icon Change Login Button

Active Subscriptions:

None
14 years 10 months ago #1203 by pixel97504
I want to change the connect button to the long version...
<!-- m --><a class="postlink" href="static.ak.fbcdn.net/images/fbconnect/log...ge_long.gif?8:121776">static.ak.fbcdn.net/images/fbcon ... f?8:121776

Can you tell me where I can change this? Thanks
The topic has been locked.
Support Specialist
14 years 10 months ago #1206 by alzander
Replied by alzander on topic Change Login Button
The best way to do this is to start with a template override. A template override is where you put your own custom template for a module into your templates directory, which then allows your customizations to stay even if you install a new version of the module.

Creating the template override:
- Go to your /templates/<YOUR_CURRENT_TEMPLATE_DIR>/
- Create the directory 'html' if it doesn't exist
- Create the sub-directory 'mod_jfbclogin' under 'html'. You should now have a directory /templates/<YOUR_CURRENT_TEMPLATE_DIR>/html/mod_jfbclogin/
- Copy the file /modules/jfbc_login/tmpl/default.php to your newly created directory


Now you have a copy of the original mod_jfbclogin template in your template override directory. You can modify this file however you want and it won't be erased if a new version of the module comes out (though you may need to update it).

Now, edit the new default.php file (in the html/mod_jfbclogin directory). Go to line 31, it starts with '<fb:login-button'. Add the following bold text to the line:
<fb:login-button length="long" onlogin="javascript&#058;fb_login_button_click();"></fb:login-button>

You can add any of the parameters from the following page to customize that button how you want.
<!-- m --><a class="postlink" href="wiki.developers.facebook.com/index.php/Fb:login-button">wiki.developers.facebook.com/ind ... gin-button
The topic has been locked.
Active Subscriptions:

None
14 years 7 months ago #1924 by lalit_singla
Replied by lalit_singla on topic Change Login Button
Re: Change Login Button

you can do this just in two steps firstly if you want to show only login image (button) without text boxes just enable jfbclogin module in a hidden div or insert a new image and call this function "FB.Connect.requireSession()" on click event of this image.

and if you want to show all text boxes and just want to replace the image then open following path modules -> mod_jfbclogin -> tmpl and open default.php, and replace <fb:login-button onlogin="javascript&#058;fb_login_button_click();"></fb:login-button> with <img src="images/logo-bottom.png" onclick="FB.Connect.requireSession()" />
The topic has been locked.
Support Specialist
14 years 7 months ago #1940 by alzander
Replied by alzander on topic Change Login Button
This is absolutely correct. We generally suggest people try to do the template override method so that when a new version is released, they don't loose their changes, but the steps you describe above work too.
The topic has been locked.