vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   Facebook Connect, Move (https://vborg.vbsupport.ru/showthread.php?t=248068)

ltwonet 08-05-2010 10:28 PM

Facebook Connect, Move
 
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 08-05-2010 11:57 PM

1 Attachment(s)
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

Code:

.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 08-07-2010 01:26 AM

Quote:

Originally Posted by ltwonet (Post 2079813)
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:

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 08-07-2010 12:04 PM

Quote:

Originally Posted by downloadsuk (Post 2080341)
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:

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 08-10-2010 05:29 AM

Quote:

Originally Posted by downloadsuk (Post 2080341)
You have to create your own addon at template hook "parse_templates" location that fires this code:

Can you explain this more?

fishmaster 08-19-2010 02:17 AM

can someone dumb this down some more please..

vivamexico55 08-20-2010 02:25 PM

Quote:

Originally Posted by fishmaster (Post 2086104)
can someone dumb this down some more please..

+1 :D

--------------- Added [DATE]1282318209[/DATE] at [TIME]1282318209[/TIME] ---------------

Quote:

Originally Posted by downloadsuk (Post 2080341)
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:

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 08-20-2010 04:23 PM

Tried it, it did not work. Connect button is still next to log in.

FASEOFMARS 08-30-2010 12:10 PM

Quote:

Originally Posted by downloadsuk (Post 2080341)
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:

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 09-13-2010 02:50 PM

anyone?

--------------- Added [DATE]1284394614[/DATE] at [TIME]1284394614[/TIME] ---------------

ok guys, got it working with an example here:

http://www.vbulletin.com/forum/showt...=move+facebook


All times are GMT. The time now is 07:39 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02797 seconds
  • Memory Usage 1,747KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete