The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I need to be able to link to the last post in a thread. Not the last unread post, but the last item posted... the link needs to work regardless of how a user has their post order sorted, or if the user is not logged in.
Currently I use something like showthread.php?t=9180#post3107513 where post = larger number than the number of posts in a thread. However, this link goes to the first post for some users and non-logged in users. This is a link from a non php page. If there is a way to do it via php I am willing. THanks. |
#2
|
||||
|
||||
![]()
Didn't you already post this? I know I've seen it before and even read a discussion about it just today or yesterday.
|
#3
|
||||
|
||||
![]() Quote:
If someone else posted this I apologize but I haven't been able to find the answer in all my searches thus far. I see for forums (forumdisplay.php) you have sorting like &sort=lastpost &order=desc & daysprune= etc. Would be nice to know what options there are for showthread.php Thanks. |
#4
|
||||
|
||||
![]()
I don't know that there is a static way of linking to the last thread. I think you have to use some variables in the link. Don't you do a query to grab the thread id? In the thread table is also the column "lastpost". Why can't you grab that at the same time you get the threadids?
|
#5
|
||||
|
||||
![]() Quote:
At that point its not really worth it. Hmmm.... --------------- Added 10 Sep 2008 at 18:44 --------------- Quote:
THis might be working. |
#6
|
|||
|
|||
![]()
In the postbit_wrapper template try adding the bit in green:
Code:
<!-- post #$post[postid] --> <if condition="$post['islastshown']"><a id="lastpostbit" name="lastpostbit"></a></if> <if condition="$show['spacer']"> $spacer_open <div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px"> <if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if> </if> $postbit <if condition="$show['spacer']"> </div> $spacer_close </if> <!-- / post #$post[postid] --> Code:
showthread.php?t=9180#lastpostbit |
#7
|
||||
|
||||
![]()
I like how you think outside the lines, Opserty!
|
#8
|
||||
|
||||
![]() Quote:
Is there a way to also get it to jump to the last page, then the last post? Another possibility - is there a way to force a sort order based on a thread? |
#9
|
|||
|
|||
![]()
Oh sorry I misunderstood your question.
![]() |
#10
|
||||
|
||||
![]()
Well, I was still able to use your suggestion.
What I did was edited the first post in the threads in question. I put a notice that they were looking at an old post and inserted a link with page=99999#lastpostbit which shoots them to the last post. I wish there was a better way but for now this might do. Note: in case anyone is curious, what we have are threads where people post up trail conditions for mountain bike trails we have in the area. Then we have a page that lists all our trails with links to the most recent trail condition. Eventually we'd like to get fancy and have a page that could pull that information in, or build a better trail conditions sytem... but for now this lets us update it in one place and hope people are able to get to the latest information quickly. The whole sort order thing just got in our way, unfortunately. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|