PDA

View Full Version : Why is shotpost.php redirecting to showthread?


sv1cec
11-30-2013, 10:36 AM
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:


<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;widt h=200&amp;action=like&amp;share=true&amp;font=tahoma&amp;appId=140 9563412612912" 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.


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:


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
showpost.php?p=xxxx&postcount=xxxx where postcount is the post you want, so like this, https://vborg.vbsupport.ru/showpost.php?p=2440082&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:


http://forum.m1911.org/{vb:link thread, {vb:raw thread}}


with?? Perhaps


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