vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Show Thread Enhancements - Add New Facebook "Like" button to your threads (https://vborg.vbsupport.ru/showthread.php?t=241011)

ericgtr 05-05-2010 08:14 PM

Quote:

Originally Posted by gyaronn (Post 2032268)
ok and another question i am traying to make a Like Box from facebook as a widget at my web site (www.fmsas.org) by using this code :

but for some reason it does not work can any one help me?

I just took a look and can't see why that's happening either, I even tested your code here http://developers.facebook.com/docs/...ugins/like-box I wonder if there is a problem with that right now on their end.

gyaronn 05-05-2010 08:27 PM

should it be an static HTML or something deferent ?

gyaronn 05-05-2010 08:32 PM

ok got it working the idiots on FB wrote the wrong code dont know how i did not see it before :-(
they wrote: profile_id=XXXX but its not a profile so if you delete the "profile" and stay with id=XXXX than it works perfect :-)

this is the corect code to use (you need to change the XXXXXXXX to the page id):

Code:

<iframe src="http://www.facebook.com/plugins/likebox.php?id=XXXXXXXXXXXX&amp;width=223&amp;height=295&amp;connections=6&amp;stream=false&amp;header=false" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:223px; height:295px;" allowTransparency="true"></iframe>
you can see an example at my site :-)

Xencored 05-06-2010 02:04 PM

Awesome!
I hate facebook but soo many use it. Its free SEO!! Thanks<33

edit does not work on Albums

even with the changed code

PHP Code:

<!-- Facebook Like -->
<
iframe src="http://www.facebook.com/plugins/like.php?href={vb:raw page_url}&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;font=tahoma&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:75px"></iframe>
<!-- / 
Facebook Like --> 

As soon as i click it it shows my image than bang a second later its gone

salvador21 05-07-2010 04:50 PM

Quote:

Originally Posted by ericgtr (Post 2031139)
I've updated the first post to give the locations frequently asked here, these include photo albums, blogs and vbcms.

Thanks but it still isn't working in CMS or blog.

It's fine and dandy in the forum

Xencored 05-07-2010 05:07 PM

Quote:

Originally Posted by salvador21 (Post 2033242)
Thanks but it still isn't working in CMS or blog.

It's fine and dandy in the forum

The code linked above works fine on CMS

ericgtr 05-07-2010 05:26 PM

When we see the on and off (sporadic) behavior it could have to do with FB being overloaded and not loading. That's one of the benefits of iframe, it lets the rest of the page load around it.

Xencored 05-07-2010 05:34 PM

Quote:

Originally Posted by ericgtr (Post 2033272)
When we see the on and off (sporadic) behavior it could have to do with FB being overloaded and not loading. That's one of the benefits of iframe, it lets the rest of the page load around it.

I see but it works fine everytime on say forums
not albums /blog

ericgtr 05-07-2010 05:58 PM

Quote:

Originally Posted by Animemike (Post 2033277)
I see but it works fine everytime on say forums
not albums /blog

Okay, just a couple of basics just to double check things. First we want to make sure you are sure the template is for the style you are using (even I overlook this sometimes) what I like to do is just type in "test" or something that will stick out where you would normally put that code and see if it displays.

Xencored 05-07-2010 06:06 PM

1 Attachment(s)
Quote:

Originally Posted by ericgtr (Post 2033293)
Okay, just a couple of basics just to double check things. First we want to make sure you are sure the template is for the style you are using (even I overlook this sometimes) what I like to do is just type in "test" or something that will stick out where you would normally put that code and see if it displays.

Album code

PHP Code:

{vb:stylevar htmldoctype}
<
html xmlns="http://www.w3.org/1999/xhtml"<vb:if condition="$vboptions['enablefacebookconnect']"xmlns:fb="http://www.facebook.com/2008/fbml"</vb:if> dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}">
<
head>
    {
vb:raw headinclude}
    <
script type="text/javascript" src="clientscript/vbulletin_quick_edit_generic.js?v={vb:raw vboptions.simpleversion}"></script>
    <
script type="text/javascript" src="clientscript/vbulletin_quick_edit_picturecomment.js?v={vb:raw vboptions.simpleversion}"></script>

    <
vb:if condition="$vboptions['storecssasfile']">
        <
link rel="stylesheet" type="text/css" href="{vb:raw vbcsspath}album-rollup.css" />
    <
vb:else />
        <
link rel="stylesheet" type="text/css" href="{vb:raw vbcsspath}album.css,postbit-lite.css" />
    </
vb:if>

    {
vb:raw usercss}
    <
title>{vb:rawphrase picture_x_of_y_from_album_z, {vb:raw pic_location.pic_position},{vb:raw albuminfo.picturecount}, {vb:raw albuminfo.title}}</title>
    {
vb:raw headinclude_bottom}
</
head>
<
body>
{
vb:raw header}
{
vb:raw navbar}
<
div id="albumtop" class="floatcontainer"
    <
vb:if condition="$show['picture_nav']">
        <
ul class="picturenav">
        <
li><a href="album.php?{vb:raw session.sessionurl}albumid={vb:raw albuminfo.albumid}&amp;attachmentid={vb:raw pic_location.prev_attachmentid}" class="textcontrol arrowprev">&larr; {vb:raw pic_location.prev_text_short}</a></li>
            <
li><a href="album.php?{vb:raw session.sessionurl}albumid={vb:raw albuminfo.albumid}&amp;attachmentid={vb:raw pic_location.next_attachmentid}" class="textcontrol arrownext">{vb:raw pic_location.next_text_short} &rarr;</a></li>
            <
vb:if condition="$show['usercss_switch']"><li><a href="profile.php?{vb:raw session.sessionurl}do=switchusercss&amp;hash={vb:raw bbuserinfo.logouthash}&amp;u={vb:raw userinfo.userid}">{vb:raw usercss_switch_phrase}</a></li></vb:if>
        </
ul>
    </
vb:if>
        <
vb:if condition="$show['edit_picture_option'] OR $show['reportlink'] OR $show['add_group_link']">
            <
ul id="picturecontrols"
                <
vb:if condition="$show['add_group_link']"><li><a href="album.php?{vb:raw session.sessionurl}do=addgroup&amp;albumid={vb:raw albuminfo.albumid}&amp;attachmentid={vb:raw pictureinfo.attachmentid}" class="add">{vb:rawphrase add_to_group}</a></li></vb:if>
                <
vb:if condition="$show['edit_picture_option']"><li><a href="album.php?{vb:raw session.sessionurl}do=editpictures&amp;albumid={vb:raw albuminfo.albumid}&amp;attachmentid={vb:raw pictureinfo.attachmentid}&amp;frompicture=1" class="editinfo">{vb:rawphrase edit_picture}</a></li></vb:if>
                <
vb:if condition="$show['reportlink']"><li><a href="album.php?{vb:raw session.sessionurl}do=report&amp;albumid={vb:raw albuminfo.albumid}&amp;attachmentid={vb:raw pictureinfo.attachmentid}" class="report">{vb:rawphrase report_picture}</a></li></vb:if>
            </
ul>
        </
vb:if>
    <
h1>{vb:rawphrase picture_x_of_y_from_album_z, {vb:raw pic_location.pic_position},{vb:raw albuminfo.picturecount}, {vb:raw albuminfo.title}}</h1>
</
div>
<
div id="picturecontainer">
<!-- 
Facebook Like -->
<
iframe src="http://www.facebook.com/plugins/like.php?href={vb:raw page_url}&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;font=tahoma&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:75px"></iframe>
<!-- / 
Facebook Like --> 
        <
vb:if condition="$show['picture_nav']">
            <
div id="picturelink"><a href="album.php?{vb:raw session.sessionurl}albumid={vb:raw albuminfo.albumid}&amp;attachmentid={vb:raw pic_location.next_attachmentid}" title="{vb:rawphrase show_next_picture}"><img src="attachment.php?attachmentid={vb:raw pictureinfo.attachmentid}&amp;d={vb:raw pictureinfo.dateline}" alt="{vb:raw pictureinfo.caption_censored}" /></a></div>
        <
vb:else />
            <
div id="picturelink"><img src="attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw pictureinfo.attachmentid}&amp;d={vb:raw pictureinfo.dateline}" alt="{vb:raw pictureinfo.caption_censored}" /></div>
        </
vb:if>

    <
vb:if condition="$show['moderation']"><p><strong>{vb:rawphrase picture_waiting_moderator_approval}</strong></p></vb:if>
    <
vb:if condition="$show['picture_owner']">
            <
ul id="pictureurls">
                <
li><label for="picture_url">{vb:rawphrase picture_url} <input type="text" class="textbox" id="picture_url" value="{vb:raw pictureinfo.pictureurl}" readonly="readonly" onfocus="this.select()" dir="ltr" tabindex="1" /></label></li>
                <
li><label for="bb_code_snippet">{vb:rawphrase bb_code} <input type="text" class="textbox" id="bb_code_snippet" value="[img]https://vborg.vbsupport.ru/[/img]" readonly="readonly" onfocus="this.select()" dir="ltr" tabindex="1" /></label></li>
            </
ul>
        </
vb:if>
        <
vb:if condition="$pictureinfo['caption_html']"><p id="picturecaption">{vb:raw pictureinfo.caption_html}</p></vb:if>
    <
dl class="stats" id="picturestats">
            <
dt>{vb:rawphrase picture_added}</dt>
        <
dd>{vb:raw pictureinfo.adddate} <vb:if condition="!$show['detailedtime']"><span class="time">{vb:raw pictureinfo.addtime}</span></vb:if></dd>
        <
dt>{vb:rawphrase album}</dt>
            <
dd><a href="album.php?{vb:raw session.sessionurl}albumid={vb:raw albuminfo.albumid}">{vb:raw albuminfo.title}</a></dd>
        <
dt>{vb:rawphrase added_by}</dt>
        <
dd><a href="{vb:link member, {vb:raw userinfo}}" class="username">{vb:raw userinfo.username}</a></dd>
        </
dl>

</
div>


{
vb:raw picturecomment_commentarea}


{
vb:raw footer}
</
body>
</
html

I added it here because is shows alot better

Attachment 116806

And it is now working on my blogs :eek:

Cadellin 05-08-2010 09:24 PM

Firstly this is a great mod - my members love it already and I'm expecting to pick a lot of traffic up from it so thank you :)

Secondly I can't get it working on albums. Using the {vb:raw page_URL} in the href attribute results in the following error from Facebook

Quote:

You must specify an URL as part of this widget or API.
What should I be using as the href for albums?

salvador21 05-09-2010 08:25 AM

Quote:

Originally Posted by ericgtr (Post 2033293)
Okay, just a couple of basics just to double check things. First we want to make sure you are sure the template is for the style you are using (even I overlook this sometimes) what I like to do is just type in "test" or something that will stick out where you would normally put that code and see if it displays.

OK I tried it with "test" and it showed up fine. Then I tried the code and nothing.

Then I tried the code with the vb:if and it works.

Code:

<!-- Facebook Like -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http://MYSITEURLHERE.com/{vb:link thread, {vb:raw thread}}&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;font=tahoma&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:75px"></iframe>
<!-- / Facebook Like -->

Maybe I missed it before in the CMS because it is positioned at the bottom of the article. I now have the code at the top of the article, after

Code:

<div class="article cms_clear restore postcontainer">

salvador21 05-09-2010 08:33 AM

I can now get it to show in a blog by using the code without the "vb:if etc", but when you click on it the link in Facebook is going to a thread in the forum instead.

BiZiMDiYaR 05-09-2010 06:14 PM

Hi,

I tried option 2, but it doesn;t show up... I have VB .3 and also edited the postbit with the code and added it, but still doesn't show up.. What am I doing wrong ?

Thanks.

Xencored 05-09-2010 06:24 PM

Quote:

Originally Posted by BiZiMDiYaR (Post 2034216)
Hi,

I tried option 2, but it doesn;t show up... I have VB .3 and also edited the postbit with the code and added it, but still doesn't show up.. What am I doing wrong ?


Thanks.

In Postbit (or legacy)
Which ever you are using you edit

BiZiMDiYaR 05-09-2010 08:48 PM

Quote:

Originally Posted by Animemike (Post 2034222)
In Postbit (or legacy)
Which ever you are using you edit

Hi,

I edited the postbit... I only need to edit 1, right ?

Thanks.

wIrEs 05-09-2010 09:54 PM

many unknown location in online.php, IP addresses are from facebook.
using vb4.0.3

Xencored 05-09-2010 10:14 PM

Quote:

Originally Posted by BiZiMDiYaR (Post 2034271)
Hi,

I edited the postbit... I only need to edit 1, right ?

Thanks.

you will need to edit which ever one you are using on your forums mate

my forums uses legacy

postbit legacy
https://vborg.vbsupport.ru/external/2010/05/51.png

postbit
https://vborg.vbsupport.ru/external/2010/05/52.png

BiZiMDiYaR 05-09-2010 11:44 PM

Quote:

Originally Posted by Animemike (Post 2034305)
you will need to edit which ever one you are using on your forums mate

my forums uses legacy

postbit legacy
https://vborg.vbsupport.ru/external/2010/05/51.png

postbit
https://vborg.vbsupport.ru/external/2010/05/52.png



Owwwww... so that was the case :))))

Thanks very much animemike :))) That did it..

murekhalir 05-11-2010 06:54 AM

option one... squishes my text content into a small box. Anyway to make the like button right aligned? and keep the true width of content text.

Michael2 05-11-2010 07:20 PM

Is there a way to place this under the thread title at the top of the showthread template (above the first post and below the top reply button). I'd like to have it on every page since it's not convenient to go back to the first post to click "like." When I try it I get a big gap under the FB button/text.

Xencored 05-11-2010 07:58 PM

Quote:

Originally Posted by Michael2 (Post 2035333)
Is there a way to place this under the thread title at the top of the showthread template (above the first post and below the top reply button). I'd like to have it on every page since it's not convenient to go back to the first post to click "like." When I try it I get a big gap under the FB button/text.

you will get a big gap under it, Thats the code ( the facebook members Avatars show after they click it)in this space

ericgtr 05-11-2010 08:17 PM

Quote:

Originally Posted by Animemike (Post 2035349)
you will get a big gap under it, Thats the code ( the facebook members Avatars show after they click it)in this space

Right, it's the iframe container. Additionally, that could be a modification to the showthread template instead of the postbit and I'm not sure the URL code will work in that template.

sose 05-11-2010 09:41 PM

I don't have an advertising section...

hilfe-forum 05-12-2010 08:04 PM

We have a Problem with the Facebook-Like Button in our Board. Sometimes the words are in english, sometimes in german. If it is in english and sombody clicks the "Like"-Button, appears "You like ist". If it is in german, appears the complete Name. Is there an facility for doing something, so that there appears only "You"?

Cadellin 05-14-2010 07:55 PM

Any suggestions how to get this to work in the gallery?

Gargi 05-15-2010 04:40 PM

Hi! Maybe a silly question, but how do I exclude special forum ids with a conditional?

cu
Gargi

Dashmaster 05-18-2010 12:38 AM

Sweet Dude. Works n1 :)

TimberFloorAu 05-19-2010 08:41 AM

Notice tonight we are getting an error.

Example http://www.australiabound.org/forum/...e-been-Cufon-d

Error is:

The page at http://www.australiabound.org/forum/...e-been-Cufon-d could not be reached.



STRIKE THAT;;;;; error seems to be if we have ' in title

Ocean-Wonders 05-19-2010 09:17 AM

seems to be working fine on mine so far, thanks :D

speedimpulse 05-19-2010 07:06 PM

installed and working great

HobbesGTS 05-26-2010 05:40 PM

I added this code to the calendar_showeventsbit template, so now people can 'Like' events. I also have vbEventsForum installed, so not sure if it would be different for someone who didn't have it installed.

Code:

<vb:if condition="(THIS_SCRIPT == showthread)"
<!-- Facebook Like -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.mysite.com/forum/{vb:link thread, {vb:raw thread}}&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;font=tahoma&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:30px"></iframe>
<!-- / Facebook Like -->
</vb:if>


hcmagix 05-26-2010 08:30 PM

Quote:

Originally Posted by hilfe-forum (Post 2035941)
We have a Problem with the Facebook-Like Button in our Board. Sometimes the words are in english, sometimes in german. If it is in english and sombody clicks the "Like"-Button, appears "You like ist". If it is in german, appears the complete Name. Is there an facility for doing something, so that there appears only "You"?

dann setze statt facebook.com bitte facebook.de ein dann ist alles in deutsch :-)

Schreib mir bitte ob es bei Dir klappt, ich bekomme die Thread URL leider nicht nach Facebook

TeknoSounds 05-27-2010 02:08 AM

Recommendation:
Where you have in the Like link www.YOURSITE.com you should replace that with {vb:raw $vboptions[bburl]}

Fantastic mod :D Works great, tho I'm trying to figure out how to get it to post to the stream. Plus it doesn't say "likes this thread at mywebsite.com" it just says "likes this thread" and links to it.
I'm using the postbit option for install.

hcmagix 05-27-2010 08:50 PM

it works for me, thanks TeknoSounds :D

TeknoSounds 05-27-2010 10:30 PM

much welcome hcmagix :D

MichaelDance 05-28-2010 02:04 PM

Thanks mate love this :)

Gargi 06-01-2010 04:23 PM

The past two days I get the message "error" besides the URL to click. Anobody else got this Problem?

hcmagix 06-02-2010 03:05 AM

Yes, same here

Gargi 06-02-2010 03:46 AM

Seems to work again for now :)


All times are GMT. The time now is 06:34 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.01624 seconds
  • Memory Usage 1,909KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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