vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Editing forumhome_lastpostby template (https://vborg.vbsupport.ru/showthread.php?t=215953)

abmm 06-11-2009 08:45 PM

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-->&nbsp;</if>
                        <span style="white-space:nowrap">
                </if>
                <a href="showthread.php?$session[sessionurl]goto=newpost&amp;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&amp;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>


Lynne 06-11-2009 08:51 PM

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.

abmm 06-11-2009 09:00 PM

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.

Lynne 06-11-2009 10:30 PM

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.


All times are GMT. The time now is 02:22 AM.

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.00997 seconds
  • Memory Usage 1,725KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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