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 :-/

GrossKopf 01-10-2010 11:06 PM

Awesome mod. Easy to install!

Zaiaku 01-10-2010 11:31 PM

OK I've been doing a little research on this:

Code:

Fatal error:  Call to undefined method stdClass::called() in /home/xxx/public_html/includes/class_core.php on line 3700
For everyone getting this problem. From what I understand this is a common problem with the JSON wrapper. PHP doesn't like the line:

Code:

$obj = new stdClass();
It's actually suppose to be used with Zend from what I could find. And since this mod is globally used its causing problems in certain places over the site. I have tried replacing the line and the error has vanished so far without any draw baccs yet. Hopefully the auther will be able to figure out something for an official fix.

min0taur 01-11-2010 03:02 PM

3.0 working fine with this plugin https://vborg.vbsupport.ru/showthread.php?t=229608 but after upgrading to 3.1 I can't run css compression in supercharged

Veer 01-11-2010 03:19 PM

Quote:

Originally Posted by min0taur (Post 1952791)
3.0 working fine with this plugin https://vborg.vbsupport.ru/showthread.php?t=229608 but after upgrading to 3.1 I can't run css compression in supercharged

Yes, because when you Store CSS Stylesheets as Files 3.1 will not work.

Veer 01-11-2010 03:23 PM

Finally I have got updated to 3.1 without problem.

People who are getting "Fatal error" on 3.1 product import, Just make sure you do not "Store CSS Stylesheets as Files" and "Not having old 3.8 style".

I hope mrpaint will fix that issues in future version.

Veer 01-11-2010 03:54 PM

I have few suggestions for future versions:

1- On "Connected Users Manager" page:

a) Show "Total Connected Users" count.
b) Add option for admins to control user connection, like edit permissions, delete connection.

2- When we share threads (with images, using IMG bbcode) on facebook, Display images as thumbnails. (currently display as image links)

Thank you :)

Zaiaku 01-11-2010 04:18 PM

#2 is the way it's submitted. If the img comes first it will do that, if the image is last or in the middle, it usually doesn't post a link, atleast that's what worked for me.

aj8690 01-11-2010 10:13 PM

Any update to the installation errors in 3.1??? Very frustrating...and it has broken my Archive.

min0taur 01-12-2010 04:30 AM

Quote:

Originally Posted by Veer (Post 1952815)
Yes, because when you Store CSS Stylesheets as Files 3.1 will not work.

So any other way to fix this?

Zaiaku 01-12-2010 05:13 AM

Quote:

Originally Posted by min0taur (Post 1953273)
So any other way to fix this?

have to wait for the next update
you can edit the library file too but that's more of a temp fix

KURTZ 01-12-2010 10:37 AM

2 troubles:

1) i tried to upgrade @ 3.1 onto my old testing board with this package but i've still the 3.0 ... so i think there is a trouble into the .xml ... (but i used the 3.1 product that you give me last day)
2) i can't see the 'navbar' link ...

hollosch 01-12-2010 12:23 PM

Quote:

Originally Posted by kall (Post 1950510)
Quick question: For existing (registered) members, can they not log in using FB? I was able to use that feature with both of the other FB bridges, but this one appears to not recognise that I have an account.

*edit* A bit of a play reveals that Existing members *can* login using Facebook, but only from their profile (if they are already logged in, in other words). If they are logged out, and click the FB button, then click Login, they get the 'No account found' error and are directed to Register.

What's about users with existing accounts ??? How can they use the bridge?
Because, they're maybe at facebook...

Zaiaku 01-12-2010 01:52 PM

Quote:

Originally Posted by hollosch (Post 1953487)
What's about users with existing accounts ??? How can they use the bridge?
Because, they're maybe at facebook...

Any users with a facebook can add it to their forum account going into the settings. There's a menu option for it. Tested it and its working just fine!

zombietom 01-12-2010 02:54 PM

Quote:

Originally Posted by zombietom (Post 1950496)
I updated and it killed my site ..i'm running 3.7..it seemed to work pretty good but if you try to connect your facebook account you get DB error...trying to get my site back now ..wish me luck...It looks like i have got my site back but ...running really slow at the moment.
Hope there is a quick fix as the idea of this mod is great

Update: Nope it totally killed my site can't even get to cpanel :(

This was the start of trouble for me
Warning: mysql_query() [function.mysql-query]: Unable to save result set in [path]/includes/class_core.php on line 408

got my site back ATM but still slow


What is the best way to uninstalled this version and then reinstall the old version..seems anything i do causes DB errors ..I think it is the iframe causing most of the problems
Thanks

UPDATE
Here is my DB error and it is coming from the core.php file

"mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Too
many connections
/home/mysite/public_html/forum/includes/class_core.php on line 311"

Just trying to help you find what is causing the problem..hope you can fix as this MOD is a popular one with my users.

Quote:

Originally Posted by zombietom (Post 1950531)
Ok, i did a uninstall and reinstalled the old version 2.2.5 ...if you get the 3.0 version solved i would love to update to it.
Only thing i find wrong in the 2.2.5 version is that once you save your settings in usercp , they reset after a few minutes and revert back to "sleeping" or "do nothing"
I'm running 3.7.1 of VB and have no plans to update to 4.0.. maybe 3.8 in time but not anytime soon.

Thanks for your support.

Does the new version fix theses issues?

thanks

hollosch 01-12-2010 04:57 PM

Hi, in my profil-tab comes the following message:

"No Recent Post Available" - Which post will be display in this field ?

UpFriends 01-12-2010 05:22 PM

Installed at UpFriends and is working like a dream. Thanks a ton!

hollosch 01-12-2010 05:45 PM

I only can invite 4 friends. Where can i increase this value, e.g. to 20 ?

thunderclap82 01-12-2010 07:44 PM

Tried installing, but during the install through the Plugin Manager I get this error:

vB4 Default Style ... (Templates) (StyleVars) (Replacement Variables) (CSS) (Controls)
Fatal error: Call to undefined method stdClass::called() in /home/mbuhmann/public_html/forums/includes/class_core.php on line 3700


Any ideas?

nitra1000 01-12-2010 08:18 PM

Won't let me connect anyone, tried on my test accounts it just throws a JS error then the button on this page just stops working :(

Any help? I'll try to avoid turning it off untill later tonight by turning off all the nav links. More info is the connect button appears to have stopped working accross the board, not entirely sure where I went wrong.

Okay narrowing it down now, the problem appears when the program attempts to fetch my login details from FB, the problem will then continue until I logout of facebook again.

obmob 01-12-2010 08:26 PM

Sounds promising, will test it, thanks! :)

sveinung 01-13-2010 01:53 AM

Installed, and now is the failure of the entire page. Get this up when I type the url.

Warning: require ([path] / FBB / hook_init_startup.php) [function.require]: failed to open stream: No such file or directory in [path] / includes / init.php (331): eval () 'd code on line 23

Fatal error: require () [function.require]: Failed opening required '/ home / anabolic / public_html / FBB / hook_init_startup.php' (include_path ='.:/ usr / lib / php: / usr / local / lib / php ') in / home / anabolic / public_html / includes / init.php (331): eval ()' d code on line 23

Can not change anything in the admin cp, what should I do?

sveinung 01-13-2010 03:40 AM

Entered on the database. Can I delete the plug-in from the phpMyAdmin panel that is causing the problem?

Zaiaku 01-13-2010 03:46 AM

You'll be better off disabling it or removing it from the admincp

sveinung 01-13-2010 04:13 AM

Quote:

Originally Posted by Zaiaku (Post 1954134)
You'll be better off disabling it or removing it from the admincp


Only see this on the admincp:

Warning: require ([path] / FBB / hook_init_startup.php) [function.require]: failed to open stream: No such file or directory in [path] / includes / init.php (331): eval () 'd code on line 23

Fatal error: require () [function.require]: Failed opening required '/ home / anabolic / public_html / FBB / hook_init_startup.php' (include_path ='.:/ usr / lib / php: / usr / local / lib / php ') in / home / anabolic / public_html / includes / init.php (331): eval ()' d code on line 23

Can I go to phpMyAdmin and remove the plug-in there?

sveinung 01-13-2010 04:37 AM

Have removed the plug-in from the phpMyAdmin database, you still do not have access to something-what should I do?

sveinung 01-13-2010 06:28 AM

Solved!

Login to your hosted files and navigate to your forum folder.
You'll find a sub folder called includes
inside that folder there is a file called config.php

Disable all plugins temporary from config.php.
Open the file called config.php and add the following line in the beginning, then save it.
PHP Code:
define ( 'DISABLE_HOOKS', true);

Login to your AdminCP and disable the FB plugin and then Reactivate them.

Maybe you can use this another time.

cheers!

ScottiG 01-13-2010 06:39 AM

The "Connect With Facebook" graphic and text does not display in the navbar in two of my site styles, it displays just fine in the other two. What would cause this? What is the code I need to add to the header to include the graphic and link?

I have browsed the navbar templates but could find anything indicating the Facebook graphic or the text for the link, nor do I see it in the CSS header, however, I do know that the code lies there somewhere because I have copied and pasted the entire contents of the header from a style that works to one that does not and the graphic and link appear, but I do not see anything that stands out as the facebook graphic or link reference.

So my question should be simple... What do I need to add or modify in the header of a style where the graphic and link does not show?

Thanks in advance for your help!

Scott

thunderclap82 01-13-2010 01:31 PM

Installed and working. One thing I noticed though is that the Facebook login option is only listed in the forums and not CMS page. Will this be added, or is it available in CMS and I'm missing it?

aj8690 01-13-2010 11:05 PM

Some support with the upgrade/install issue fatal error created in 3.1 would be awesome...please.

ahmedbehiry 01-14-2010 02:33 AM

I have a problem.. is there away to display the post url "unencoded"? as the link is messed up when it's encoded..

Code:

<a class="shade" href="http://www.facebook.com/sharer.php?u={vb:raw url_encoded}&t={vb:raw title_encoded}" target="_blank" onclick="return fbb_share_js_{vb:raw post.postid}();">
is there a variable to display the url as it is rather than the encoded one "{vb:raw url_encoded}"?


All times are GMT. The time now is 05:00 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.02145 seconds
  • Memory Usage 1,865KB
  • 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
  • (11)bbcode_code_printable
  • (1)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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