vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Hide the last post of a sub-forum on the home page (https://vborg.vbsupport.ru/showthread.php?t=198513)

anthroforum 12-10-2008 09:21 AM

Hide the last post of a sub-forum on the home page
 
Where/how would I insert the <if> condition?

Lynne 12-10-2008 02:15 PM

To find the template - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code.

anthroforum 12-10-2008 07:27 PM

I'm having no luck, I have tried the code in a previous couple of discussions already :/

https://vborg.vbsupport.ru/showthrea...ight=last+post

Lynne 12-10-2008 08:37 PM

Did you do what I suggested? What template did your page source say was being used? And then post exactly what you did in that template and perhaps we can spot the error.

anthroforum 12-14-2008 09:31 PM

Hi, this is where I am at so far;

https://vborg.vbsupport.ru/external/2008/12/61.jpg

Not sure what I got wrong. Obviously where it says "Test" should be the name of the last thread posted in.

What I would like is this: for the Last Post column to always show the most recently updated thread from the Relationships forum, and never from the Adult sub-forum.

BTW the test "Age of Consent" thread was posted in forum ID 74.

Template = forumhome_lastpostby

HTML Code:

<if condition="$show['lastpostinfo']">
<div class="smallfont" style="width: 250px;" 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>


<if condition="$show['lastpostinfo'] AND $forumid!=10">Test<else />$lastpostinfo[trimthread]</if>


</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 12-14-2008 09:49 PM

I thought you wanted to hide the Last Post By column. I do not know the code to not show the Last Post By if it's from a Sub-Forum. I think that will require code changes, not just template changes.


All times are GMT. The time now is 01:01 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.02340 seconds
  • Memory Usage 1,737KB
  • 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_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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