PDA

View Full Version : Facebook Connect, Move


ltwonet
05 Aug 2010, 23:28
hi, Hopefully someone can help, I'd like to move the facebook Connect button/information to the Navbar area, I've tried copying the information in the header and putting it in the navbar but it just disappears and then doesn't work at all, can someone tell me how to move it.

ltwonet
06 Aug 2010, 00:57
Looks like it might be possible via the CSS file vbulletin-chrome unfortantely I am not that familiar with building CSS.

Any help?

Here are is what I was able to dig from the CSS file

.toplinks ul.isuser li#fb_headerbox.hidden,
.toplinks ul.nouser li#fb_headerbox.hidden {
display: none;
}

.toplinks ul.isuser li#fb_headerbox a,
.toplinks ul.nouser li#fb_headerbox a {
padding-top: 0;
background: none;
cursor: pointer;

}
li#fb_headerbox a#fb_link {
position: relative;
}
li#fb_headerbox a#fb_link #fb_squarepic{
position:absolute;
right:-6px;
top:5px;
z-index:1;
border:1px solid #B3CCE7;
padding:1px;
}
li#fb_headerbox a#fb_link #fb_icon{
position:absolute;
right:10px;
top:1px;
z-index:2;
}


Where/what changes do I need to do to move it to this location.

downloadsuk
07 Aug 2010, 02:26
hi, Hopefully someone can help, I'd like to move the facebook Connect button/information to the Navbar area, I've tried copying the information in the header and putting it in the navbar but it just disappears and then doesn't work at all, can someone tell me how to move it.

Well it looks like it's your lucky day my friend. I'm doing exactly the same thing.

You can move the code no problem - and its not the code thats wrong. Its the way VB executes its templates. The template has to be "registered" for use inside another template. From default, the facebook header template that gets called after the VB conditional in header is not registered for use in the navbar template.

You have to create your own addon at template hook "parse_templates" location that fires this code:

vB_Template::preRegister('navbar', array('facebook_header' => $facebook_header));


that will make the facebook header display in the navbar. So far i haven't needed to modify anything else.

Hope that helps. Any questions, just ask.

ltwonet
07 Aug 2010, 13:04
Well it looks like it's your lucky day my friend. I'm doing exactly the same thing.

You can move the code no problem - and its not the code thats wrong. Its the way VB executes its templates. The template has to be "registered" for use inside another template. From default, the facebook header template that gets called after the VB conditional in header is not registered for use in the navbar template.

You have to create your own addon at template hook "parse_templates" location that fires this code:

vB_Template::preRegister('navbar', array('facebook_header' => $facebook_header));


that will make the facebook header display in the navbar. So far i haven't needed to modify anything else.

Hope that helps. Any questions, just ask.

Helps alot thank you very much.

ifitsmedia
10 Aug 2010, 06:29
You have to create your own addon at template hook "parse_templates" location that fires this code:

Can you explain this more?

fishmaster
19 Aug 2010, 03:17
can someone dumb this down some more please..

vivamexico55
20 Aug 2010, 15:25
can someone dumb this down some more please..

+1 :D

--------------- Added 1282318209 at 1282318209 ---------------

Well it looks like it's your lucky day my friend. I'm doing exactly the same thing.

You can move the code no problem - and its not the code thats wrong. Its the way VB executes its templates. The template has to be "registered" for use inside another template. From default, the facebook header template that gets called after the VB conditional in header is not registered for use in the navbar template.

You have to create your own addon at template hook "parse_templates" location that fires this code:

vB_Template::preRegister('navbar', array('facebook_header' => $facebook_header));


that will make the facebook header display in the navbar. So far i haven't needed to modify anything else.

Hope that helps. Any questions, just ask.

Please tell me if I'm wrong:

1. Go to Plugins > Add plugin
2. Select parse_templates as hook location
3. Paste code and enable?

And then move around the previously mentioned code for the FB button? Or is this more complicated than that?

GONUMBER6
20 Aug 2010, 17:23
Tried it, it did not work. Connect button is still next to log in.

FASEOFMARS
30 Aug 2010, 13:10
Well it looks like it's your lucky day my friend. I'm doing exactly the same thing.

You can move the code no problem - and its not the code thats wrong. Its the way VB executes its templates. The template has to be "registered" for use inside another template. From default, the facebook header template that gets called after the VB conditional in header is not registered for use in the navbar template.

You have to create your own addon at template hook "parse_templates" location that fires this code:

vB_Template::preRegister('navbar', array('facebook_header' => $facebook_header));


that will make the facebook header display in the navbar. So far i haven't needed to modify anything else.

Hope that helps. Any questions, just ask.

i have done that but it does not seem to change anything..

is their another step?

themagicm
13 Sep 2010, 15:50
anyone?

--------------- Added 1284394614 at 1284394614 ---------------

ok guys, got it working with an example here:

http://www.vbulletin.com/forum/showthread.php?361140-Moving-Facebook-Connect-out-of-the-header-template-and-into-the-navbar-template&highlight=move+facebook