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 04-23-2010 02:54 PM

Quote:

Originally Posted by dirtycrow (Post 2025996)
OK, so i don't have VBseo installed, i've tried with both "basic Friendly URLs" and "advanced Friendly URLs" in my Server Settings and Optimization Options panel in the admin cp and on my facebook wall it displayed "likes (the forum name)" as opposed to "like (thread title) on (forum name).

is this how its supposed to work? it there something i'm missing to get the title of the thread to display? please advise.

To be clear, this modification is setup to work with out of the box VB without VBSEO, that takes a separate plugin to work. As for it now showing the titles properly I would make sure that you don't have any other SEO mods/plugins running.

ericgtr 04-23-2010 02:56 PM

Quote:

Originally Posted by dirtycrow (Post 2025997)
i run a private forum, is that why my thread title are not being shown? my forum is set up so you have to have an account before you see any content.

That will do it, remember that FB has to be able to read the thread as a guest in order to display its title.

dirtycrow 04-23-2010 03:01 PM

Quote:

Originally Posted by ericgtr (Post 2026009)
That will do it, remember that FB has to be able to read the thread as a guest in order to display its title.

damn. no work around huh?

NFLfbJunkie 04-23-2010 03:05 PM

I inserted the code so that the FB Like will only show in certain forums, but it continues to show in all forums. I have seen this code in two different ways in this thread. Is either one correct.

<vb:if condition="in_array($forum['forumid'], array(2,14))">Show this to forum 2 and 14</vb:if>

<vb:if condition="in_array($forum['forumid'],array(2,14))">

This is what I have and it doesn't just show these two forums:

PHP Code:

<vb:if condition="in_array($forum['forumid'], array(2,14))">
<
vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '1')">
<!-- 
Facebook Like -->
<
iframe src="http://www.facebook.com/plugins/like.php?href=http://www.mydomain.com/forums/{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 -->
</
vb:if> 


hiker 04-23-2010 05:27 PM

Quote:

Originally Posted by Bellinis (Post 2025826)
One thing I don't understand yet: will this button also show up for users not using facebook/facebook connect?
For people not using FB, this like-button has no use, has it?

Maybe my screenshots will help. If you're not logged into facebook, you'll see this:

http://www.bogley.com/forum/attachme...1&d=1272003191

And when you are logged into facebook, you'll see this:

http://www.bogley.com/forum/attachme...1&d=1272003174

Obviously, the above examples are using Option 2.

Option 1 would look like this, and I didn't like the way it was wrapping the text.

http://www.bogley.com/forum/attachme...1&d=1272003056

And here's option 2 on the same thread:

http://www.bogley.com/forum/attachme...1&d=1272003108

Mutt 04-23-2010 05:27 PM

Quote:

Originally Posted by Ranger375 (Post 2025899)
Is there a way to use option 2, but have it so that it doesnt show the names of the people who like the post?


change
Code:

show_faces=true
to
Code:

show_faces=false

worried 04-23-2010 08:54 PM

Marked as unistalled. Although there seems to be no danger, it serves no purpose in a inaccessible forum.
EDIT: Installed. Having the code to specify forums changed my mind

dirtycrow 04-23-2010 09:02 PM

Quote:

Originally Posted by dirtycrow (Post 2026011)
damn. no work around huh?

why doesn't it pull from the URL in private forums? the url's are supposed to be SEO friendly after all.

ericgtr 04-23-2010 09:03 PM

Quote:

Originally Posted by dirtycrow (Post 2026187)
why doesn't it pull from the URL in private forums? the url's are supposed to be SEO friendly after all.

Because FB cannot access the URL as a guest. Try to think of FB as a guest on your site, if a guest cannot access a forum it cannot see the title.

AURFSCAN 04-23-2010 09:13 PM

ONLY DISPLAY IN CERTAIN FORUMS

29 and 133 being the forum ids you want this to show in.. more forums would be 29,44,123,49 etc


its not $forum[forumid] its $thread[forumid] :)




Code:



<vb:if condition="in_array($thread['forumid'],array(29,133))">
<vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '1')">

<!-- Facebook Like -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.yoursite.com/{vb:link thread, {vb:raw thread}}&amp;layout=standard&amp;show_faces=false&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>
</vb:if>



All times are GMT. The time now is 07:18 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.01346 seconds
  • Memory Usage 1,755KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (7)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
  • (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