Forum
Welcome, Guest
Please Login to access forum.
Re:Login with FB button position (1 viewing) 
Go to bottom
TOPIC: Re:Login with FB button position
#901
BoxHatch
Fresh Boarder
Posts: 6
User Offline
[Solved] Login with FB button position Karma: 0  
Hi,

Is there an easiest way to place the Login with FB button on the same line with the Joomla default login button? I've looked through the files and tried some things but I'm pretty sure it's not going to work properly.

Too bad the module is using both default.php and default_joomla.php files to display it.

I'm thinking of moving the button from one to the other, but I'm pretty sure I'm going to break the whole thing.

(you can take this as a suggestion too for the next update, if there is going to be one - a few module options)

Thanks!
 
Logged Logged  
  The administrator has disabled public write access.
#903
John Dagelmore
Admin
Posts: 3722
User Offline
Re:Login with FB button position Karma: 79  
Not sure to understand well what you mean, have a look at the following image.

If you mean having 2 buttons on same line in that way the best way is doing this using pure CSS without touch any module template files.
 
Logged Logged  
  The administrator has disabled public write access.
#905
BoxHatch
Fresh Boarder
Posts: 6
User Offline
Re:Login with FB button position Karma: 0  
That's exactly what I mean..

What did you change? Curios to see if it displays correctly on IE too (for some reason, they are always on the wrong side of things when it comes to CSS)
 
Logged Logged  
  The administrator has disabled public write access.
#906
John Dagelmore
Admin
Posts: 3722
User Offline
Re:Login with FB button position Karma: 79  
I think it will work also on IE, i changed just some standard CSS using absolute positioning for the facebook button and relative positioning for the container element
 
Logged Logged  
  The administrator has disabled public write access.
#907
BoxHatch
Fresh Boarder
Posts: 6
User Offline
Re:Login with FB button position Karma: 0  
Yeah, well, I tried positioning with just CSS. On Firefox it looks alright, but on IE it's (of course) a bit off position. Didn't test it on other browsers, but the thing with CSS positioning is that it's always cross browser problematic.

I finally managed to do it, by editing the two template files.

I took this out from the default.php file:

Code:

<form action="" method="post" id="jfbl-login-form-fb" > <a href="#" onclick="fblogin();return false;" class="ifbl_fbloginbutton"> <?php if($customText):?> <label class="jfbl-modlgn <?php echo $ifblTemplate;?>"><?php echo $customText;?></label> <?php endif;?> <img border="0" src="<?php echo JURI::base();?>modules/mod_instantfblogin/assets/images/facebook<?php echo $ifblTemplate;?>.png" /> </a> <div id="facebook-login" style="display:none; text-align:center"> <img border="0" src="<?php echo JURI::base();?>modules/mod_instantfblogin/assets/images/loading.gif" /> <div class="ifbl_custom_msg"><?php echo $displayMsg;?></div> </div> </form>
Contained it into a div, contained the login button into a div in default_joomla.php and pasted the above just below. Small CSS tweaks and it looks great. I didn't delete the button from default.php, I just gave it a display:none style on the enclosing div. Tested the log in / register and it works like a charm. Thank you!
 
Logged Logged  
  The administrator has disabled public write access.
#908
John Dagelmore
Admin
Posts: 3722
User Offline
Re:Login with FB button position Karma: 79  
Well done Thanks also to post the solution on the forum

Keep in touch for next updates

John
 
Logged Logged  
  The administrator has disabled public write access.
Go to top