PDA

View Full Version : [SOLVED] Add New Column On ForumDisplay Template


omardealo
11-05-2016, 04:12 PM
How i can add a new column On ForumDisplay Template , i have already add new filed on thread table [database] and i will show data of filed on this new column ...

I tried edit FORUMDISPLAY,threadbit .. but did not succeed in altering them :erm:
Any Help ??! :rolleyes:

https://vborg.vbsupport.ru/attachment.php?attachmentid=155461&d=1478366075

Seven Skins
11-06-2016, 01:11 PM
Threadbit Template

Find
<!-- threadstats -->
<vb:if condition="!$show['notificationtype']">


Edit
<ul class="threadstats td alt">
<li>New Column</li>
</ul>

<!-- threadstats -->
<vb:if condition="!$show['notificationtype']">




Forumdisplay Template

Find
<vb:if condition="$show['search_engine']">

<span class="threadstats td">{vb:rawphrase replies} {vb:raw sortarrow.replycount} / {vb:rawphrase views}</span>
<span class="threadlastpost td">{vb:rawphrase last_post_by}{vb:raw sortarrow.lastpost}</span>
<vb:else />

<span class="threadstats td"><a href="{vb:link forum, {vb:raw foruminfo}, {vb:raw pageinfo_replycount}}" rel="nofollow">{vb:rawphrase replies}{vb:raw sortarrow.replycount}</a> / <a href="{vb:link forum, {vb:raw foruminfo}, {vb:raw pageinfo_views}}" rel="nofollow">{vb:rawphrase views}{vb:raw sortarrow.views}</a></span>
<span class="threadlastpost td"><a href="{vb:link forum, {vb:raw foruminfo}, {vb:raw pageinfo_flastpost}}" rel="nofollow">{vb:rawphrase last_post_by}{vb:raw sortarrow.lastpost}</a></span>
<vb:if condition="$show['inlinemod']"><span class="threadimodimod td"></span></vb:if>
</vb:if>


Edit
<vb:if condition="$show['search_engine']">
<span class="threadstats td">New Column</span>

<span class="threadstats td">{vb:rawphrase replies} {vb:raw sortarrow.replycount} / {vb:rawphrase views}</span>
<span class="threadlastpost td">{vb:rawphrase last_post_by}{vb:raw sortarrow.lastpost}</span>
<vb:else />
<span class="threadstats td">New Column</span>

<span class="threadstats td"><a href="{vb:link forum, {vb:raw foruminfo}, {vb:raw pageinfo_replycount}}" rel="nofollow">{vb:rawphrase replies}{vb:raw sortarrow.replycount}</a> / <a href="{vb:link forum, {vb:raw foruminfo}, {vb:raw pageinfo_views}}" rel="nofollow">{vb:rawphrase views}{vb:raw sortarrow.views}</a></span>
<span class="threadlastpost td"><a href="{vb:link forum, {vb:raw foruminfo}, {vb:raw pageinfo_flastpost}}" rel="nofollow">{vb:rawphrase last_post_by}{vb:raw sortarrow.lastpost}</a></span>
<vb:if condition="$show['inlinemod']"><span class="threadimodimod td"></span></vb:if>
</vb:if>


Additional.css
.threadlisthead span.threadinfo {
width: 48%;
}
.threadbit .threadinfo {
width: 48%;
}


Results See attachment



.

omardealo
11-06-2016, 03:37 PM
Seven Skins
thanks a lot brother , it is very good now
but i have a very small problem , i want change background color .. i want it like lastpost column

https://vborg.vbsupport.ru/attachment.php?attachmentid=155464&stc=1&d=1478453816

omardealo
11-06-2016, 03:54 PM
okay i edit it
<ul class="threadstats td alt"> TO <ul class="threadstats td">

thanks again bro :up:

grey_goose
11-07-2016, 01:53 AM
Those templates will only create the space for the info to go into.

If you're wanting to fetch a custom column you'll need a plugin or to manually edit forumdisplay.php to include your column in the threads query (~ line 947) and then register it for use in threadbit (~ line 1120).

MarkFL
11-07-2016, 02:17 AM
Those templates will only create the space for the info to go into.

If you're wanting to fetch a custom column you'll need a plugin or to manually edit forumdisplay.php to include your column in the threads query (~ line 947) and then register it for use in threadbit (~ line 1120).

I've merged the two duplicate threads, so that all posts pertaining to this issue are in the same thread.

omardealo
11-07-2016, 10:56 AM
Those templates will only create the space for the info to go into.

If you're wanting to fetch a custom column you'll need a plugin or to manually edit forumdisplay.php to include your column in the threads query (~ line 947) and then register it for use in threadbit (~ line 1120).

how i can register it by a plugin , i try to fetch the filed data but it not worked
{vb:raw thread.city}
but in another plugin it is works good
{vb:raw threadinfo.city}