View Full Version : How can i hide the last post of a subforum?
acast
09-01-2008, 11:21 AM
Hi friends, i want to hide the last post viewed from forumhome of one subforum. How can i do it? I look for it in the search button, but i didnt find it.
Thanks.
acast
09-07-2008, 11:12 PM
I read that i have to put this, but i put it and it doesnt work:
<if condition="!in_array($forum['forumid'], array(1,2,3,6))"></if>
Dismounted
09-08-2008, 06:39 AM
You actually have to put the code that should be shown or not shown in between the two conditional tags.
acast
09-08-2008, 02:35 PM
You actually have to put the code that should be shown or not shown in between the two conditional tags.Do you know which code is?
Dismounted
09-09-2008, 02:42 AM
The column in one (or a few) of the forumhome_forumbit_* templates. I don't have a copyo f vBulletin in front of me right now.
acast
09-09-2008, 06:06 AM
The column in one (or a few) of the forumhome_forumbit_* templates. I don't have a copyo f vBulletin in front of me right now.
I find this in forumhome_forumbit_level2_post:
</if>
</td>
<td class="alt2" nowrap="nowrap">$forum[lastpostinfo]</td>
<td class="alt1">$forum[threadcount]</td>
<td class="alt2">$forum[replycount]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="alt1"><div class="smallfont">$forum[moderators] </div></td>
</if>
I try something like that but it doesnt work:
<if condition="!in_array($forum['28'], nowrap="nowrap">$forum[lastpostinfo] array(28))"></if>
I cant put that code.
Sweeks
09-20-2008, 11:09 AM
Tried the same code and gives an error straight away.
Parse error: syntax error, unexpected '=' in /public_html/root/includes/adminfunctions_template.php(3729) : eval()'d code on line 15
Here is the full code after editing:
<tr align="center">
<td class="alt2"><img src="$stylevar[imgdir_statusicon]/$forum[imageprefix]forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /></td>
<td class="alt1Active" align="$stylevar[left]" id="f$forum[forumid]">
<div>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
<if condition="$show['browsers']"><span class="smallfont">(<phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase>)</span></if>
</div>
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
<if condition="$show['forumsubscription']"><div class="smallfont"><strong><a href="subscription.php?$session[sessionurl]do=removesubscription&f=$forum[forumid]" rel="nofollow">$vbphrase[unsubscribe_from_this_forum]</a></strong></div></if>
<if condition="$show['subforums']"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
</td>
<if condition="!in_array($forum['158'], nowrap="nowrap">$forum[lastpostinfo] array(158))"></if>
<td class="alt2">$forum[lastpostinfo]</td>
<td class="alt1">$forum[threadcount]</td>
<td class="alt2">$forum[replycount]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="alt1"><div class="smallfont">$forum[moderators] </div></td>
</if>
</tr>
$childforumbits
Any help on this would be really appreciated or a point in the right direction. Thank you
________
PUBLIC MOVIES (http://www.++++tube.com/categories/35/public/videos/1)
Lynne
09-20-2008, 02:23 PM
This is the line you want to get rid of?
<td class="alt2" nowrap="nowrap">$forum[lastpostinfo]</td>How about:
<td class="alt2" nowrap="nowrap"><if condition="$forum['forumid'] == '158'"> <else />$forum[lastpostinfo]</if></td>That should put a space/blank in if it is forumid 158, but it will show the lastpostinfo for all other forums. (I have not tried it.)
acast
09-21-2008, 08:26 AM
This is the line you want to get rid of?
<td class="alt2" nowrap="nowrap">$forum[lastpostinfo]</td>How about:
<td class="alt2" nowrap="nowrap"><if condition="$forum['forumid'] == '158'"> <else />$forum[lastpostinfo]</if></td>That should put a space/blank in if it is forumid 158, but it will show the lastpostinfo for all other forums. (I have not tried it.)It doesnt work, perhaps we are in the wrong place, and we only have to put a code in the forumhome template.
Sweeks
09-21-2008, 10:52 AM
I have tried this too and it did not work.
I am having a problem where It is not showing the post amount or thread amount within the new sub forums I am creating too.
Basically what I am after is to be able to hide the last post info of two sub forums and still have the thread and post count to show to all. Also these forums are passworded too.
If anyone can help me achieve this I will be really grateful.
Thank you
________
Motorcycle Tires (http://www.motorcycle-tech.com/tires/motorcycle-tires)
Lynne
09-21-2008, 03:35 PM
It doesnt work, perhaps we are in the wrong place, and we only have to put a code in the forumhome template.
Instead of using $forum[forumid], try using $foruminfo[forumid]. Maybe that will work instead. (Also, try it with and without single quotes around "forumid". I always forget if it needs the quotes in there or not!)
Also, are you editing the correct template? Do this - 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.
acast
09-27-2008, 01:26 PM
I did it with this code in forumhome:
<if condition="$show['lastpostinfo'] AND $forumid!=28">
anthroforum
12-09-2008, 09:37 AM
I would like to know how to do this, but not replace with a blank space.
Instead, the last post column is filled by the latest post from one of the other sub-forums.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.