WordPress.org

Forums

Popups - WordPress Popup
[resolved] Problems with Facebook shortcode (26 posts)

  1. jgrmstr
    Member
    Posted 12 months ago #

    Hi,

    I've just updated from your former popup plugin.
    Well, congrats for the ergonomic admin panel.

    I have some difficulties to configure the Facebook like button, as you can see here : http://42mag.fr/2014/08/fire-challenge-nouveau-defi-facebook/

    Buttons do not align properly.
    Plus, I can't get to make the "show faces" option to work.

    Please give me some help about that !

    https://wordpress.org/plugins/popups/

  2. Damian
    Member
    Plugin Author

    Posted 12 months ago #

    Hi to use faces you need to setup layout to standard but it will not align well i think.
    Also if you move fb to the center i think it will look better.
    put all shortcodes together without spaces between them

  3. Damian
    Member
    Plugin Author

    Posted 12 months ago #

    check new version for faces fix

  4. jgrmstr
    Member
    Posted 12 months ago #

    I confirm that only admin see the Popups item in the menu with the new version.

    Another question about Facebook configuration : how can I set the language of Facebook's widget ? It is in english, I'd like to set it to french.

  5. Damian
    Member
    Plugin Author

    Posted 12 months ago #

    It takes the language of your site. You wp-admin is in french?
    in wp-config.php what locale you have configured?

  6. jgrmstr
    Member
    Posted 12 months ago #

    Yes my wp-admin is in french.
    In wp-config.php it's set to "fr_fr" since the beginning but the Facebook shortcode is displyaed in english

  7. Damian
    Member
    Plugin Author

    Posted 12 months ago #

    Could you check your source code to see what file is being called for Facebook javascripts? Should be located in the header of your site

  8. jgrmstr
    Member
    Posted 12 months ago #

    When I seek in the source code of the page, at the place of your shortcode in the popup, here is the div for Facebook :

    <div class="fb-like fb_iframe_widget" data-width="" data-href="https://www.facebook.com/42mag.fr" data-layout="standard" data-action="like" data-show-faces="true" data-share="false" fb-xfbml-state="rendered" fb-iframe-plugin-query="action=like&app_id=&href=https%3A%2F%2Fwww.facebook.com%2F42mag.fr&layout=standard&locale=en_US&sdk=joey&share=false&show_faces=true">...</div>

    locale=en_US
    It seems like your plugin doesn't load the right language

  9. Damian
    Member
    Plugin Author

    Posted 12 months ago #

    On which page or your site I can check the popup active?
    The code I meant was something like:
    <script type="text/javascript" src="http://connect.facebook.net/fr_FR/all.js#xfbml=1"></script>

    Depending on the language setting you have in wp-config.php that scripts should load with the right locale.

  10. jgrmstr
    Member
    Posted 12 months ago #

    You can check the active popup on http://42mag.fr/2014/08/monopoly-ledition-speciale-the-legend-of-zelda-arrive/

    OK so I've searched in the page code source, and here is the call :
    <script src="http://connect.facebook.net/fr-FR/all.js?ver=1.0.5#xfbml=1" type="text/javascript">

    The script at http://connect.facebook.net/fr-FR/all.js?ver=1.0.5#xfbml=1 returns /*1407239775,,JIT Construction: v1356228,en_US*/

    There is an error with the locale parameter. It should be fr_FR instead of fr-FR. (http://connect.facebook.net/fr_FR/all.js?ver=1.0.5#xfbml=1 returns the correct locale)

  11. Damian
    Member
    Plugin Author

    Posted 12 months ago #

    Try by changing in popups/public/class-social-popup.php line 333
    the following:
    wp_register_script( 'spu-facebook', 'http://connect.facebook.net/'.get_bloginfo('language').'/all.js#xfbml=1', array('jquery'), self::VERSION, FALSE);

    to

    wp_register_script( 'spu-facebook', 'http://connect.facebook.net/'.get_locale().'/all.js#xfbml=1', array('jquery'), self::VERSION, FALSE);

    Let me know fi that works

  12. jgrmstr
    Member
    Posted 12 months ago #

    I've made the change.

    Now the script is not called at all

  13. Damian
    Member
    Plugin Author

    Posted 12 months ago #

    Do you get an error ? Please double check the entered code or that the popup is active on that page.

    I just tried locally and seems to work fine.

    Im trying to check http://42mag.fr/2014/08/monopoly-ledition-speciale-the-legend-of-zelda-arrive/ but I don't see the popup there

  14. jgrmstr
    Member
    Posted 12 months ago #

    I do not have any error.

    Popup configuration has not changed.

    In the plugin editor, popups/public/class-social-popup.php is now flagged as disabled (but the plugin is not disabled).
    I don't know how to reactivate one file ??

  15. Damian
    Member
    Plugin Author

    Posted 12 months ago #

    Try editing your files in FTP to avoid problems.

    I pasted the code in https://gist.github.com/timersys/796ff429951b771e9916 , in case copying from here is giving problems

  16. jgrmstr
    Member
    Posted 12 months ago #

    No cpoying is not the problem.

    It is too late for editing in FTP : the file is flagged as deactivated and I don't know how to reactivate it...

    I tried deactivate then reactivate the plugin but with no avail...

  17. Damian
    Member
    Plugin Author

    Posted 12 months ago #

    if its flagged as feactivated it's because there is a PHP in that file, that's why you need to use ftp to edit the file

  18. jgrmstr
    Member
    Posted 12 months ago #

    I'm OK to use FTP but as I said, it is too late : the file is flagged as deactivated and I don't know how to reactivate it...

  19. Damian
    Member
    Plugin Author

    Posted 12 months ago #

    once the php error get removed, the file should be enabled again.

  20. jgrmstr
    Member
    Posted 12 months ago #

    In case I had edited the file without seeing it, I've just replaced all the code in the file with the PHP found here :
    https://github.com/timersys/popups/blob/master/public/class-social-popup.php

    And the file still is deactivated

  21. Damian
    Member
    Plugin Author

    Posted 12 months ago #

    Did you tried deactivating / activating the plugin?

  22. jgrmstr
    Member
    Posted 12 months ago #

    Yes I tried deactivating / activating the plugin.

    I tried to remove the plugin and reinstall it.

    I event tried to replace the plugin files with a new download of the plugin, manually.

    Still the same. I am very confused...

  23. Damian
    Member
    Plugin Author

    Posted 12 months ago #

    I never saw that error of a single file disabled, sounds really strange. Do you want to share you login details with me, to see If Im able to fix it?

  24. jgrmstr
    Member
    Posted 12 months ago #

    After some changes in the database (table options, plugins_activated), I've finally managed to reactive the plugin and files...

    And your modification (get_locale() instead of get_option('language')) seems to work : http://42mag.fr/2014/08/monopoly-ledition-speciale-the-legend-of-zelda-arrive/.

    Such a headache...

  25. Damian
    Member
    Plugin Author

    Posted 12 months ago #

    Something went really wrong there :S That's why I really prefer FTP over wp editor. To avoid all this crazy problems .

    Im glad everything is working for you now!

  26. jgrmstr
    Member
    Posted 12 months ago #

    Yes online editor should be disabled... To avoid temptation.

    Thank you for your time !

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.