Log in

View Full Version : Hide the last post of a sub-forum on the home page


anthroforum
12-10-2008, 09:21 AM
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/showthread.php?t=189719&highlight=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

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