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:


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