Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-30-2013, 10:36 AM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Why is shotpost.php redirecting to showthread?

OK, I am trying to add a Facebook "Like" button in each post in my site, and I have a problem, but first let me explain what I have so far.

I've managed to install a button, at the beginning of a thread, the code for it is:

Code:
<vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '1')"
<!-- Facebook Like -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http://forum.m1911.org/{vb:link thread, {vb:raw thread}}&amp;layout=button_count&amp;show_faces=false&amp;width=200&amp;action=like&amp;share=true&amp;font=tahoma&amp;appId=1409563412612912" colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:250px; height:30px"></iframe>
<!-- / Facebook Like -->
</vb:if>
Now obviously, if you change the conditional at the top, you can make the button appear in every post, BUT, the Like will be assigned to the thread again, not the individual post. So, somehow, I should change the following code to something else.

Code:
http://forum.m1911.org/{vb:link thread, {vb:raw thread}}
To something that will point to the individual post. Unfortunately, if you use the old, traditional code for showpost, something like:

Code:
http://forum.m1911.org/showpost.php?p=xxxx
It redirects back to showthread, it just positions the page, so that the post you want is the first thing shown in the page. That's not exactly what I need. Isn't there a way to show just one single post, in vBulletin 4.2.2, so that I can use that, in the Like button code??

Of course, if someone knows of a modification, that allows you to do all that (add a Like button in every post), I would definitely appreciate it. The only one I've managed to find is vbseo, but that hack is no longer supported and there is no site from where to download it.

Thanks for your attention folks!
Reply With Quote
  #2  
Old 11-30-2013, 11:06 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
showpost.php?p=xxxx&postcount=xxxx
where postcount is the post you want, so like this, https://vborg.vbsupport.ru/showpost....&postcount=122
Reply With Quote
  #3  
Old 11-30-2013, 11:18 AM
nhawk nhawk is offline
 
Join Date: Jan 2011
Posts: 1,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is no equivalent of the old vB3 showpost function in vB4. vB4 redirects showpost to showthread.
Reply With Quote
  #4  
Old 11-30-2013, 11:30 AM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's what I figured.

So then the question becomes, what is the proper code to use for a redirecting link? In other words, what do I replace this:

Code:
http://forum.m1911.org/{vb:link thread, {vb:raw thread}}
with?? Perhaps

Code:
http://forum.m1911.org/{vb:link post, {vb:raw post}}
Reply With Quote
  #5  
Old 11-30-2013, 11:37 AM
nhawk nhawk is offline
 
Join Date: Jan 2011
Posts: 1,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To bring the single post into view, I would us the second one.

FYI, here's the original JIRA report on this topic..
http://tracker.vbulletin.com/browse/VBIV-13689
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:51 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.03854 seconds
  • Memory Usage 2,196KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete