The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Editing forumhome_lastpostby template
Was pointed here by the vBulletin Support Team.
I need to alter the "Last Post" bit in certain forums to go to the first post instead... Here is the email I received that I suggested to contact you guys. "That requires editing this template: Admin CP -> Styles & Templates -> Style Manager -> ? ? -> Forum Home Templates -> forumhome_lastpostby But I don't have exact code for you. If you need help with specific code then the people on www.vbulletin.org may be able to help." Would anyone know exactly what has to be changed? Here is my current forumhome_lastpostby template : Code:
<if condition="$show['lastpostinfo']"> <div class="smallfont" align="$stylevar[left]"> <div> <span style="white-space:nowrap"> <if condition="$show['icon']"><img class="inlineimg" src="$icon[iconpath]" alt="$icon[title]" border="0" /></if> <if condition="$lastpostinfo['prefix']"> $lastpostinfo[prefix] </span><if condition="is_browser('safari')"><!--bug#24775--> </if> <span style="white-space:nowrap"> </if> <a href="showthread.php?$session[sessionurl]goto=newpost&t=$lastpostinfo[lastthreadid]" style="white-space:nowrap" title="<phrase 1="$lastpostinfo[lastthread]">$vbphrase[go_first_unread_in_thread_x]</phrase>"><strong>$lastpostinfo[trimthread]</strong></a></span> </div> <div style="white-space:nowrap<if condition="is_browser('ie', 6)">; float:$stylevar[left]</if>"> <phrase 1="member.php?$session[sessionurl]find=lastposter&f=$lastpostinfo[forumid]" 2="$lastpostinfo[lastposter]">$vbphrase[by_x]</phrase> </div> <div align="$stylevar[right]" style="white-space:nowrap"> $lastpostinfo[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$lastpostinfo[lastposttime]</span></if> <a href="showthread.php?$session[sessionurl]p=$lastpostinfo[lastpostid]#post$lastpostinfo[lastpostid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a> </div> </div> <else /> <div class="smallfont" align="$stylevar[right]"> $lastpostinfo[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$lastpostinfo[lastposttime]</span></if> <a href="showthread.php?$session[sessionurl]p=$lastpostinfo[lastpostid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a> </div> </if> |
#2
|
||||
|
||||
You'd have to do more than just edit the template if you want to go to the first post instead of the last post. You'd have to modify the code to get the username, time, and postid for the first post also.
|
#3
|
|||
|
|||
I'm assuming that all the "lastpost" tags in the html need to be changed to something like "firstpost"? But I am not that advanced in html or vbulletin. Is this even possible to do? Any advice would be appreciated.
|
#4
|
||||
|
||||
Just about anything is possible if you code it. I'm pretty sure (but not positive) that the lastpostinfo is in the forumcache which means if you change it, you will have to instead do a query for every single one of those forums. If you are OK at coding, I'm sure you can optimize the query to not be too bad, but it won't be as nice as just grabbing it from the cache.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|