vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Why is shotpost.php redirecting to showthread? (https://vborg.vbsupport.ru/showthread.php?t=305193)

sv1cec 11-30-2013 10:36 AM

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!

ozzy47 11-30-2013 11:06 AM

Code:

showpost.php?p=xxxx&postcount=xxxx
where postcount is the post you want, so like this, https://vborg.vbsupport.ru/showpost....&postcount=122

nhawk 11-30-2013 11:18 AM

There is no equivalent of the old vB3 showpost function in vB4. vB4 redirects showpost to showthread.

sv1cec 11-30-2013 11:30 AM

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}}

nhawk 11-30-2013 11:37 AM

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


All times are GMT. The time now is 10:03 PM.

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.01056 seconds
  • Memory Usage 1,722KB
  • 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
  • (6)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete