vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Integration with vBulletin - YAFB - Yay! Another Facebook Bridge (https://vborg.vbsupport.ru/showthread.php?t=232457)

KristerSwe 01-10-2010 10:34 AM

1 Attachment(s)
[Suggestion]

See the pic .. had been a nice addition to this great addon
what you think.. i can give users psd and png ...

What you think. changed it on my homepage

KristerSwe 01-10-2010 01:21 PM

[Fixed]

I had to change in function.php from UTF-8 to ISO-8859-1 to make it work
when its sending from forum post to facebook.
exemple (Not sure this right method) but its worked
Code:

function &fb_stream_addcomment($post_id, $comment, $uid = null) {
        fb_encoding_to_Facebook($comment);

        try {
                fb_forcessk();
                $result =& theFacebook()->api_client->stream_addComment(
                        $post_id
                        , $comment
                        , $uid
                );
               
                if (function_exists('mb_convert_encoding')) {
                        $comment = mb_convert_encoding($comment,'ISO-8859-1');
                }
               
                $data = array(
                        'post_id' => $post_id,
                        //'comment' => $comment,
                        'uid' => $uid,
                );
                fb_log(FBF_stream_addcomment,$result,$data);
        } catch (FacebookRestClientException $e) {
                fb_log_exception(FBF_stream_addcomment,$e,$data);
        }
       
        return $result;
}


mrpaint 01-10-2010 01:41 PM

Quote:

Originally Posted by KristerSwe (Post 1951927)
[Fixed]

I had to change in function.php from UTF-8 to ISO-8859-1 to make it work
when its sending from forum post to facebook.
exemple (Not sure this right method) but its worked
Code:

function &fb_stream_addcomment($post_id, $comment, $uid = null) {
        fb_encoding_to_Facebook($comment);

        try {
                fb_forcessk();
                $result =& theFacebook()->api_client->stream_addComment(
                        $post_id
                        , $comment
                        , $uid
                );
               
                if (function_exists('mb_convert_encoding')) {
                        $comment = mb_convert_encoding($comment,'ISO-8859-1');
                }
               
                $data = array(
                        'post_id' => $post_id,
                        //'comment' => $comment,
                        'uid' => $uid,
                );
                fb_log(FBF_stream_addcomment,$result,$data);
        } catch (FacebookRestClientException $e) {
                fb_log_exception(FBF_stream_addcomment,$e,$data);
        }
       
        return $result;
}


Can you try removing these 3 lines
Code:

                if (function_exists('mb_convert_encoding')) {
                        $comment = mb_convert_encoding($comment,'ISO-8859-1');
                }

I think it will just work since I called
Code:

fb_encoding_to_Facebook($comment);
before :D

KURTZ 01-10-2010 02:05 PM

@mrpaint: thanks for your support dude, now like you can know all seems to be correct ... just enable the php safe mode ... :)

but, just a question: maybe there are some security troubles with this setting enabled?

Veer 01-10-2010 02:30 PM

Quote:

Originally Posted by mrpaint (Post 1951701)
How many styles do you have in your forums? Do you keep any incompatible style from vBulletin 3.8 installation? Did you make any changes to YAFB templates manually?

Well, I have just setup a new vBulletin 4.0 Gold forums, install YAFB 3.0 and upgrade to YAFB 3.1, no problem at all. Also, there are other people who managed to upgrade to 3.1 successfully so please give more detail about your situation so I can track the issue down and solve it (if I can, actually, I think it's vBulletin issue since the error is in one of the core script)

You have a PM :)

KristerSwe 01-10-2010 02:34 PM

Quote:

Originally Posted by mrpaint (Post 1951942)
Can you try removing these 3 lines
Code:

                if (function_exists('mb_convert_encoding')) {
                        $comment = mb_convert_encoding($comment,'ISO-8859-1');
                }

I think it will just work since I called
Code:

fb_encoding_to_Facebook($comment);
before :D

Sorry didnt work ...

have to have like this strange

Code:

function fb_encoding(&$data,$toFacebook = true) {
        global $stylevar;
       
        $data_original = $data;
        if ($toFacebook) {
                $destination_charset = $stylevar['charset'];
                $target_charset = 'ISO-8859-1';
        } else {
                $destination_charset = 'ISO-8859-1';
                $target_charset = $stylevar['charset'];
        }
       
        if ($destination_charset != $target_charset) {
                if ($stylevar['charset'] == 'ISO-8859-1') {
                        fb_encoding_iso_utf($data,$toFacebook);
                        $function = 'fb_encoding_iso_utf';
                } else if (function_exists('iconv')) {
                        fb_encoding_iconv($data,$destination_charset,$target_charset);
                        $function = 'fb_encoding_iconv';
                } else if (function_exists('mb_convert_encoding')) {
                        fb_encoding_mbstring($data,$destination_charset,$target_charset);
                        $function = 'fb_encoding_mbstring';
                } else {
                        DEVDEBUG('SKIPPED fb_encoding: no converter available');
                }
        } else {
                DEVDEBUG('SKIPPED fb_encoding: matched charset');
        }
}


KristerSwe 01-10-2010 02:49 PM

Now i have reupload all files and cleared all cache and deleted your 3 lines and its worked...

But i still have iso-8859-1 like this in the function.php

Code:

function fb_encoding(&$data,$toFacebook = true) {
        global $stylevar;
       
        $data_original = $data;
        if ($toFacebook) {
                $destination_charset = $stylevar['charset'];
                $target_charset = 'ISO-8859-1';
        } else {
                $destination_charset = 'ISO-8859-1';
                $target_charset = $stylevar['charset'];
        }
       
        if ($destination_charset != $target_charset) {
                if ($stylevar['charset'] == 'ISO-8859-1') {
                        fb_encoding_iso_utf($data,$toFacebook);
                        $function = 'fb_encoding_iso_utf';
                } else if (function_exists('iconv')) {
                        fb_encoding_iconv($data,$destination_charset,$target_charset);
                        $function = 'fb_encoding_iconv';
                } else if (function_exists('mb_convert_encoding')) {
                        fb_encoding_mbstring($data,$destination_charset,$target_charset);
                        $function = 'fb_encoding_mbstring';
                } else {
                        DEVDEBUG('SKIPPED fb_encoding: no converter available');
                }
        } else {
                DEVDEBUG('SKIPPED fb_encoding: matched charset');
        }
}


Zaiaku 01-10-2010 05:25 PM

Quote:

Originally Posted by kall (Post 1951722)
PHP Code:

Fatal error:  Call to undefined method stdClass::called() in /home/xxx/public_html/includes/class_core.php on line 3700 


Seeing this error on my friends site now that he has i installed.

Messing up Archive display and storing CSS as file

taffy056 01-10-2010 06:02 PM

well I am still getting the same problems in post 54 after installing the updated version, don't know whether its me with my settings or not, has anyone got any ideas about it

Quote:

Originally Posted by taffy056 (Post 1950540)
well I have this setup, and its in the user control panel, it seems to forget that I have logged in, I get this error message, when trying to change permissions

Request for special permissions
You must be logged in to Facebook to use this feature.And the connect button does not appear in the navbar, other than all that it works ;

Hope someone can help ?


rikognition 01-10-2010 10:25 PM

I checked the PM, also try the new version. I'm still getting the error similar to Zaiaku's :-/


All times are GMT. The time now is 10:24 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.03636 seconds
  • Memory Usage 1,774KB
  • 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
  • (8)bbcode_code_printable
  • (1)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete