vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   How To Remove &goto=newpost (https://vborg.vbsupport.ru/showthread.php?t=293827)

BUDIMAN 01-11-2013 10:35 AM

How To Remove &goto=newpost
 
Code:

<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/m...s_syntax_links

Plz help..

WorldCraft 01-11-2013 03:44 PM

Try this

HTML Code:

<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. :)


All times are GMT. The time now is 02:45 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01759 seconds
  • Memory Usage 1,720KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete