PDA

View Full Version : last post on forum home not working


falco008
05-13-2008, 11:54 PM
hi all in a custom made style I try to have the last post show up on the index page ( like on this site)

however I cannot get it to work,

<tr align="center">
<td class="thead">&nbsp;</td>
<td class="thead" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead">$vbphrase[threads]</td>
<td class="thead">$vbphrase[posts]</td>

this is the current code.. I tried adding

<td class="thead">$vbphrase[last_post]</td>, but this doesnt do the trick, anyone any ideas ?

Lynne
05-14-2008, 02:50 AM
If all you are doing is adding that line, all you will get is the writing at the top of the table to say "Last Post". You need to add the column into the threadbit template (and possibly others) also. That column is in default vbulletin templates, so if you view the default template, it should be there.

falco008
05-14-2008, 06:43 AM
Hi lynne, thanks for replying,

so basically I should copy that piece in the default threadbit template to the threadbit template of the new layout..

think I can do that.. well at least try..because as you said I only get a column heading and nothing else..

I could use someone like you to iron out some of the bugs in our site ;)

-------------

edit : hi lynn.. went throught the deault threadbit code and compared line by line with the threadbit code in my custsom template however dont find any changes..?? any ideas?

anyone else any ideas ? I'm getting small migraines trying to solve this. im sure it something ez to do but dont find where or how to change it

Lynne
05-14-2008, 03:09 PM
I'm sorry, I don't know why I said threadbit, it is forumhome_lastpostby that you need to look at and that template gets called in the
forumhome_forumbit_levelxx_post template (xx being 1 or 2). Are those default templates for you or have you modified them?

falco008
05-14-2008, 07:07 PM
hey

what has been modified in our style:

forumhome, forumhome_forumbit_level1_nopost and level2_post

and under forum display templates ,forumdisplay self...

lastpostby wasnt changed


in forum display :

default =

if condition="$show['forumslist']">
<!-- sub-forum list -->


<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<tr>
<td class="tcat" width="100%">$vbphrase[subforums]<span class="normal"> : $foruminfo[title]</span></td>
<if condition="$show['forumsearch']">
<td class="vbmenu_control" id="forumsearch.subforums" nowrap="nowrap"><a href="search.php?$session[sessionurl]f=$foruminfo[forumid]" rel="nofollow">$vbphrase[search_this_forum]</a> <if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("forumsearch.subforums"); </script></if></td>
</if>
</tr>
</table>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>

changed code:<if condition="$show['forumslist']">
<!-- sub-forum list -->

<div class="tcat_alt">
<div class="tcat_alt_right">
<table cellpadding="0" cellspacing="0" style="float:right">
<tr>
<if condition="$show['forumsearch']">
<td class="vbmenu_alt" id="forumsearch.subforums" nowrap="nowrap"><a href="search.php?$session[sessionurl]f=$foruminfo[forumid]" rel="nofollow">$vbphrase[search_this_forum]</a> <if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("forumsearch.subforums"); </script></if></td>
</if>
</tr>
</table>
<div class="tcat_alt_title">
<a href="">$foruminfo[title]</a>
</div>




------------------


default :

<thead>
<tr align="center">
<td class="thead">&nbsp;</td>
<td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead" width="175">$vbphrase[last_post]</td>
<td class="thead">$vbphrase[threads]</td>
<td class="thead">$vbphrase[posts]</td>
<if condition="$vboptions[showmoderatorcolumn]">
<td class="thead">$vbphrase[moderator]</td>
</if>
</tr>
</thead>

new

<thead>
<tr align="center">
<td class="thead">&nbsp;</td>
<td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead" width="175">$vbphrase[last_post]</td>
<td class="thead">$vbphrase[threads]</td>
<td class="thead">$vbphrase[posts]</td>
<td class="thead">$forum[lastpostinfo]</td>
<if condition="$vboptions[showmoderatorcolumn]">
<td class="thead">$vbphrase[moderator]</td>
</if>
</tr>
</thead>


-------------------thats more or less it

in forumhome :

default code

<!-- / guest welcome message -->
<br />
</if>

<!-- main -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr align="center">
<td class="thead">&nbsp;</td>
<td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead" width="175">$vbphrase[last_post]</td>
<td class="thead">$vbphrase[threads]</td>
<td class="thead">$vbphrase[posts]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="thead">$vbphrase[moderator]</td>
</if>
</tr>
</thead>
$forumbits
<tbody>
<tr>
<td class="tfoot" align="center" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><div class="smallfont"><strong>
<a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a>
<if condition="$vboptions['forumleaders']">&nbsp; &nbsp;
<a href="showgroups.php$session[sessionurl_q]" rel="nofollow">$vbphrase[view_forum_leaders]</a></if>
</strong></div></td>
</tr>
</tbody>
</table>
$forumhome_markread_script
<!-- /main -->


our code:
<!-- / guest welcome message -->
<br />
</if>

$forumbits

<!-- Mark Forums Read & Forum Leaders -->

$forumhome_markread_script
<!-- End Mark Forums Read & Forum Leaders -->

---------------------forumhome_forumbit_level1_nopost

default

<tbody>
<tr>
<td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
<if condition="$childforumbits">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>
</if>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
<if condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
</td>
</tr>
</tbody>
<if condition="$childforumbits">
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
$childforumbits
</tbody>
</i


our style =

div class="tcat_alt">
<div class="tcat_alt_right">
<a style="float:$stylevar[right];padding: 4px 5px 0px 0px" href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>
<div class="tcat_alt_title"><a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a></div>
</div>
</div>

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="1" border="0" width="100%" align="center" style="border-top-width:0px;border-top:0px;">
<if condition="$childforumbits">
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
<tr align="center">
<td class="thead">&nbsp;</td>
<td class="thead" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead">$vbphrase[threads]</td>
<td class="thead">$vbphrase[posts]</td>


</tr>
$childforumbits
</tbody>
</if>
</table>
<div class="bottom_gradient">
<div class="bottom_gradient_left"> </div>
<div class="bottom_gradient_right"> </div>
</div>

<br />

------------forumhome_forumbit_level2_post


default

<tr align="center">
<td class="alt2"><img src="$stylevar[imgdir_statusicon]/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&amp;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>
<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]&nbsp;</div></td>
</if>
</tr>
$childforumbits


our style :

<if condition="THIS_SCRIPT == 'index'">

<tr align="center">
<td width="57" height="64" class="alt2"><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /></td>
<td class="alt1" align="$stylevar[left]" id="f$forum[forumid]">
<div class="bigfont">
<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&amp;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>
<td width="70" class="alt2"><strong>$forum[threadcount]</strong></td>
<td width="70" class="alt2"><strong>$forum[replycount]</strong></td>
</tr>
$childforumbits

<else />

<tr align="center">
<td class="alt2"><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" /></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&amp;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>
<td class="alt1" nowrap="nowrap">$forum[lastpostinfo]</td>
<td class="alt1">$forum[threadcount]</td>
<td class="alt1">$forum[replycount]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="alt1"><div class="smallfont">$forum[moderators]&nbsp;</div></td>
</if>
</tr>
$childforumbits

</if>

Lynne
05-14-2008, 07:12 PM
You probably removed the part from your forumhome_forumbit_xxx templates that calls the forumhome_lastpostby template. Go to the forumhome_forumbit_xxx templates and then click on View History. You can then compare your template to a default Jelsoft template and see what needs to be added.

falco008
05-14-2008, 07:26 PM
hi lynn I posted everything above maybe it makes sense to you