The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
threadbit template help please
Hi everyone, Im making a mobile theme for one of my forums and i cant seem to get the threads to use the "first unread post" function. So when a user clicks a thread instead of taking them to the first post of the thread it takes them to the first unread post in that thread.
This is the code im using in the thread bit template , as you can see ive added the Last post icon too which is how i want it . Code:
<li> <a class="title<vb:if condition="$show['gotonewpost']"> threadtitle_unread</vb:if>" href="{vb:link thread, {vb:raw thread}, {vb:raw pageinfo}, 'threadid', 'threadtitle'}" id="thread_title_{vb:raw thread.realthreadid}">{vb:raw thread.threadtitle}</a> <a href="{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_lastpost}, 'threadid', 'threadtitle'}#post{vb:raw pageinfo_lastpost.p}" class="lastpostdate understate" title="{vb:rawphrase go_to_last_post}"><img src="{vb:stylevar imgdir_button}/lastpost-{vb:stylevar right}.png" alt="{vb:rawphrase go_to_last_post}" /></a> <div class="smallfontlight">{vb:rawphrase replies}: {vb:raw thread.replycount} | {vb:rawphrase views}: {vb:raw thread.views}</div> </li> |
#2
|
|||
|
|||
Maybe you're confusing "last post" with "first unread"? The "first unread" link looks like this:
HTML Code:
<vb:if condition="$show['gotonewpost']"><a href="{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_newpost}, 'threadid', 'threadtitle'}" id="thread_gotonew_{vb:raw thread.realthreadid}"><img class="gotonewpost" src="{vb:stylevar imgdir_button}/firstnew.png" alt="{vb:rawphrase go_to_first_new_post}" /></a> </vb:if> (that is, you should have pageinfo_newpost in there instead of just pageinfo). |
Благодарность от: | ||
Adam H |
#3
|
|||
|
|||
Yeah ive tried that code too but all it keeps doing it going to the first post on the last page of the thread. Really cant see what is wrong at the min.
|
#4
|
||||
|
||||
Are you sure that the page code (the php for the page) actually creates the variables you want to use and that the postid for the first unread post is actually available for use - is pageinfo_lastpost.p an actual real variable that is defined on the page?
|
#5
|
|||
|
|||
I had forgot to include the Post id's in the post bit template, Because the theme has been stripped down so much i didnt realise they had been removed.
Added this back into the post bit and it seems to have solved my issue : Code:
<a name="post{vb:raw post.postid}" href="{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_post}}#post{vb:raw post.postid}" class="<vb:if condition="$show['inlinemod']">ie</vb:if>postcounter">#{vb:raw post.postcount}</a><a id="postcount{vb:raw post.postid}" name="{vb:raw post.postcount}"></a> |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|