The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi all!
I'm working on a FORUMDISPLAY modification. I want to add an icon to every threadbit with a link to a post that is on another thread (which is maybe on another forum also). How can I achieve that if I can only use PostID? Is "showthread.php?p=PostID" enough even if the post is located in another thread/forum? How can I build such a link using fetch_seo_url function or "vb:link thread" without specifying a threadinfo? I'm just trying to avoid adding a very loud query like fetch_threadinfo of fetch_postinfo to just recover external threadid/title for every threadbit I have to process... ![]() Thanks! |
#2
|
|||
|
|||
![]()
showthread.php?p=PostID works, but it seems to scroll you to the given post instead of showing the top of the thread. But if you want the seo url then I suppose there's no way to avoid having to get the thread title.
|
#3
|
|||
|
|||
![]()
Uh ok! So I'll put something like:
showthread.php?p={vb:raw myvar.mypostid} in my template right? |
#4
|
|||
|
|||
![]()
If myvar.mypostid gives you the post id, then it look OK to me. Of course you can always see if it works the way you want by entering a url in your browser.
|
#5
|
|||
|
|||
![]()
Mhhhh... do you also know how to check if a post still exists from PostID?
I was just thinking about what can happen if the linked post is being deleted... |
#6
|
|||
|
|||
![]()
You could call fetch_postinfo(postid), check if the return is an array, then check 'isdeleted' to see if it has been deleted. But of course that requires a query (you can see the code for fetch_postinfo() in includes/functions.php).
|
#7
|
|||
|
|||
![]()
Thank you!
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|