Advertisement:

Author Topic: Facebook connect on the Twitter design?  (Read 6044 times)

Tanjeria

  • Newbie
  • *
  • Posts: 34
Facebook connect on the Twitter design?
« on: September 11, 2013, 08:35:01 pm »
Hello everybody,

I am new here and I have a problem. I installed the Facebook connect plugin and it was successful, then I added the API Key and secret. Now I tried to add the code <?php fbc_button(); ?> to the header.php of the Twitter design. But it is totally equal where I post the code, every time I add this specific code my page does not load anymore. It just stays white... If I add it at the bottom of the header page I can see the header, but nothing else. Only the header and my categories.

Can someone please help me? Because I would like to add the facebook connect to this design, but it seems it does not work. What else do I need to do, in order to show it correctly? I mean it can't be that the whole page does not show whenever I add this code <?php fbc_button(); ?>

Where do I need to add this code? Or is there maybe another error in the header.php itself that I can't see?

here's the original code:

Code: [Select]
        <!-- header -->
        <div class="container">
            <div class="row login_nav">
                <ul class="unstyled">
                    <li>
<?php if( osc_users_enabled() ) { ?>
    <?php if( osc_is_web_user_logged_in() ) { ?>
                            <?php printf(__('Hi %s''twitter'), osc_logged_user_name() . '!'); ?>  &middot;
                            <a href="<?php echo osc_user_dashboard_url() ; ?>"><?php _e('My account''twitter') ; ?></a> &middot;
                            <a href="<?php echo osc_user_logout_url() ; ?>"><?php _e('Logout''twitter') ; ?></a>
                        <?php } else { ?>
<a href="<?php echo osc_user_login_url() ; ?>"><?php _e('Login''twitter') ; ?></a> &middot;
                            <a href="<?php echo osc_register_account_url() ; ?>"><?php _e('Register''twitter') ; ?></a>
                        <?php ?>
                    <?php ?>
                    </li>
                    <?php if ( osc_count_web_enabled_locales() > 1) { ?>
                    <?php osc_goto_first_locale() ; ?>
                    <li class="languages">
                        &middot;
                        <a class="active" href="#"><?php _e('Language''twitter'); ?> <?php while ( osc_has_web_enabled_locales() ) { if( osc_locale_code() == osc_current_user_locale()) { ?>(<?php echo osc_locale_field('s_short_name') ; ?>)<?php } } ?></a>
                        <ul>
                        <?php $i ;  ?>
                        <?php osc_goto_first_locale() ; ?>
                        <?php while ( osc_has_web_enabled_locales() ) { ?>
                            <li <?php if($i == 0) { echo "class='first'"; } ?>><a id="<?php echo osc_locale_code() ; ?>" href="<?php echo osc_change_language_url osc_locale_code() ) ; ?>"><?php echo osc_locale_field('s_short_name') ; ?></a></li>
                        <?php $i++ ; } ?>
                        </ul>
                    </li>
                </ul>
                <?php ?>
            </div>
            <div class="logo">
                <?php if( file_existsWebThemes::newInstance()->getCurrentThemePath() . "images/logo.jpg" ) ) { ?>
                    <a href="<?php echo osc_base_url() ; ?>">
                        <img src="<?php echo osc_current_web_theme_url('images/logo.jpg') ; ?>" alt="<?php echo osc_page_title() ; ?>" title="<?php echo osc_page_title() ; ?>" />
                    </a>
                <?php } else { ?>
                <div class="row">
                    <div class="span16 columns">
                        <h3><a href="<?php echo osc_base_url() ; ?>"><?php echo osc_page_title() ; ?></a></h3>
                    </div>
                </div>
                <?php ?>
            </div>
            <div class="topbar-wrapper" style="z-index: 5;">
                <div class="topbar">
                    <div class="fill">
                        <div class="container">
                            <?php osc_goto_first_category() ; ?>
                            <?php if(osc_count_categories () > 0) { ?>
                            <ul class="nav">
                                <?php while ( osc_has_categories() ) { ?>
                                <li class="<?php echo osc_category_slug() ; ?><?php if ( osc_count_subcategories() > ) { ?> menu<?php ?>">
                                    <a href="<?php echo osc_search_category_url() ; ?>" <?php if ( osc_count_subcategories() > ) { ?>class="menu"<?php ?>><?php View::newInstance()->_erase('subcategories'); echo osc_category_name() ; ?></a>
                                    <?php if ( osc_count_subcategories() > ) { ?>
                                    <ul class="menu-dropdown">
                                        <?php while ( osc_has_subcategories() ) { ?>
                                        <li class="<?php echo osc_category_slug() ; ?>"><a href="<?php echo osc_search_category_url() ; ?>"><?php echo osc_category_name() ; ?></a></li>
                                        <?php ?>
                                    </ul>
                                    <?php ?>
                                </li>
                                <?php ?>
                            </ul>
                            <?php ?>
                            <ul class="nav secondary-nav">
                                <li class="publish">
                                    <a href="<?php echo osc_item_post_url_in_category() ; ?>"><?php _e("Publish your ad for free"'twitter'); ?></a>
                                </li>

                            </ul>
                        </div>
                    </div><!-- /fill -->
                </div><!-- /topbar -->
            </div>
        </div>
        <!-- header end -->

best regards,
Tanjeria

fog

  • Hero Member
  • *****
  • Posts: 1062
Re: Facebook connect on the Twitter design?
« Reply #1 on: September 11, 2013, 09:56:50 pm »
Now you need you place the code with this code, to see how you laid him.  :)

Tanjeria

  • Newbie
  • *
  • Posts: 34
Re: Facebook connect on the Twitter design?
« Reply #2 on: September 12, 2013, 12:05:33 am »
What do you mean? I mean the installation of the Facebook connect plugin says I should add the code <?php fbc_button(); ?> in the header of the template, which I did. But every time I add this code, my page does not load anymore. It's like something in the header.php itself is not correct and that's why it does not load anymore. The whole page stays white as soon I add this Facebook connect code.

Can someone post the complete code of the Twitter design, with the Facebook button included?

Tanjeria

  • Newbie
  • *
  • Posts: 34
Re: Facebook connect on the Twitter design?
« Reply #3 on: September 12, 2013, 01:03:35 am »
Okay it's not just a Twitter design error. I also get it with other designs. Seems like it's not possible to use the Facebook login :(

fog

  • Hero Member
  • *****
  • Posts: 1062
Re: Facebook connect on the Twitter design?
« Reply #4 on: September 12, 2013, 05:12:01 am »
Disable all plugins you have and is only enabled facebook plugin. See if it works that way first. If it works, then there is a conflict between plugins. Go activating a plugin at a time until you see which of the plugins is causing the conflict problem.

Is this the plugin you're using?
http://forums.osclass.org/plugins/%28plugin%29-facebook-like-box-plugin/

Regards

Tanjeria

  • Newbie
  • *
  • Posts: 34
Re: Facebook connect on the Twitter design?
« Reply #5 on: September 12, 2013, 07:44:35 am »
Okay I will try that later, so far I am using the modern theme now and it works, but the Facebook button does not show.

I am using this plugin:


Facebook Connect Help

What is Facebook Connect Plugin?

Facebook Connect plugin allows your users to log into your webpage with their Facebook accounts.

Using Facebook login

You can freely obtain an appId and secret key (needed to use Facebook login on your website) after signing up on this URL: http://www.facebook.com/developers/createapp.php

In order to use Facebook login in your website you should include at least one facebook button for login (and logout). To do that place the following code where you want it to appear:
            <?php fbc_button(); ?>
   <- This is what does not work, it just does not show on any of my themes I am using :(
           

* You can freely obtain an appId and secret key after signing up on this URL: http://www.facebook.com/developers/createapp.php.

garciademarina

  • Administrator
  • Hero Member
  • *****
  • Posts: 974
Re: Facebook connect on the Twitter design?
« Reply #6 on: September 13, 2013, 12:07:58 pm »
Hi @Tanjeria,

Can you turn on osclass debug please?

Follow this instructions doc.osclass.org/Debug_PHP_errors

If when you add facebook button  page becomes blank, it should be because cannot find fbc_button function declaration.

Turn debug on and share your log please

Regards

Student to Student

  • Newbie
  • *
  • Posts: 2
Re: Facebook connect on the Twitter design?
« Reply #7 on: September 18, 2013, 01:04:42 am »
Hello Tanjeria,

I see on your website that you got the twitter, facebook & Google+ on your homepage. I am wondering how did you get that fixed (with the facebook plugin).

Greetz

Tanjeria

  • Newbie
  • *
  • Posts: 34
Re: Facebook connect on the Twitter design?
« Reply #8 on: September 18, 2013, 05:22:07 am »
Hi Student!


I added the code for all three Twitter, Facebook and Google + to the main.php of my Theme.


I will show you where I've added the code


main.php:


Code: [Select]
<?php osc_current_web_theme_path('header.php'); ?>
<div class="form_publish">
<br>
<table align="right">
            <tr>
            <td>
            <a href="https://twitter.com/share" class="twitter-share-button" data-url="https://www.adwall.us" data-via="TanjaArtStudio">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></td>
            <td>
            <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="" send="false" layout="button_count" show_faces="false" font=""></fb:like>
            </td>
            <td>
            <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script><g:plusone size="medium"></g:plusone>
            </td>
            </tr>
        </table>

Student to Student

  • Newbie
  • *
  • Posts: 2
Re: Facebook connect on the Twitter design?
« Reply #9 on: September 18, 2013, 10:09:15 pm »
Thanks, thats a start. And how do i make sure it links to my own Facebook and Google+.
Because i think if i use your exact codes it will link towards yours.

Greetz