PDA

View Full Version : How To Remove &goto=newpost


BUDIMAN
01-11-2013, 10:35 AM
<vb:if condition="$show['lastpostinfo']">
<p class="lastposttitle">
<vb:if condition="$show['icon']"><img src="{vb:raw icon.iconpath}" class="postimg" alt="{vb:raw icon.title}" border="0" /></vb:if>
<vb:if condition="$lastpostinfo['prefix']">{vb:raw lastpostinfo.prefix}</vb:if>

<a href="{vb:link thread, {vb:raw threadinfo}, {vb:raw pageinfo_newpost}}" class="threadtitle">{vb:raw lastpostinfo.trimthread}</a>

<a href="{vb:link thread, {vb:raw threadinfo}, {vb:raw pageinfo_lastpost}}#post{vb:raw lastpostinfo.lastpostid}"><img src="{vb:stylevar imgdir_button}/lastpost-{vb:stylevar right}.png" alt="{vb:rawphrase go_to_last_post}" /></a>
</p>

<p class="lastpostdate">{vb:raw lastpostinfo.lastpostdate}<vb:if condition="!$show['detailedtime']">, <span class="time">{vb:raw lastpostinfo.lastposttime}</span></vb:if></p>
<vb:else />
<span class="lastpostdate">{vb:raw lastpostinfo.lastpostdate} <vb:if condition="!$show['detailedtime']"><span class="time">{vb:raw lastpostinfo.lastposttime}</span></vb:if></span>
<a href="{vb:link thread, {vb:raw threadinfo}, {vb:raw pageinfo_lastpost}}#post{vb:raw lastpostinfo.lastpostid}"><img src="{vb:stylevar imgdir_button}/lastpost-{vb:stylevar right}.png" alt="{vb:rawphrase go_to_last_post}" /></a>
</vb:if>



This is html code from forumhome_lastpostby template...


When we click any last post in forum home...it will redirect to new post....


So my question is, how to make the link just goes to normal thread link ?

I mean, need to get rid this : &goto=newpost


<a href="{vb:link thread, {vb:raw threadinfo}, {vb:raw pageinfo_newpost}}" class="threadtitle">{vb:raw lastpostinfo.trimthread}</a>


Which code should be edited ?


It's hard for me to understand here : http://www.vbulletin.com/docs/html/main/styleref_templates_syntax_links

Plz help..

WorldCraft
01-11-2013, 03:44 PM
Try this

<a href="{vb:link thread, {vb:raw threadinfo}}" class="threadtitle" title="{vb:rawphrase view} {vb:raw lastpostinfo.lastthread}">{vb:raw lastpostinfo.trimthread}</a>



If you're wondering how this works, here's my best explanation.

The original code's href has 3 arguments as shown in the template: {vb:link thread}, {vb:raw threadinfo}, and {vb:raw pageinfo_newpost}. The first argument is a string that generates your base URL: 'http://myforum.com/forum/showthread.php' in this case. The second argument, an array passes the thread's info, ie: 'http://myforum.com/forum/showthread.php?1234-Thread-Title'. Lastly, the third argument, another array passes the &goto=newpost.

To put it all together, you write it like this {first_argument, {second_argument}, {third_argument}}. Notice the first argument's closing brace wraps around the other arguments. The change to get rid of the &goto=newpost is to remove the argument that holds it, in this case being the third.

Hope this (and my horrible explanation) was of help. :)