The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
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 ??! ![]() |
|
#2
|
||||
|
||||
|
Threadbit Template
Find Code:
<!-- threadstats -->
<vb:if condition="!$show['notificationtype']">
Edit Code:
<ul class="threadstats td alt">
<li>New Column</li>
</ul>
<!-- threadstats -->
<vb:if condition="!$show['notificationtype']">
Forumdisplay Template Find Code:
<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 Code:
<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 Code:
.threadlisthead span.threadinfo {
width: 48%;
}
.threadbit .threadinfo {
width: 48%;
}
Results See attachment . |
| 4 благодарности(ей) от: | ||
| Kane@airrifle, MarkFL, omardealo, TheLastSuperman | ||
|
#3
|
||||
|
||||
|
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 |
|
#4
|
||||
|
||||
|
okay i edit it
Code:
<ul class="threadstats td alt"> Code:
<ul class="threadstats td"> |
| 2 благодарности(ей) от: | ||
| MarkFL, TheLastSuperman | ||
|
#5
|
|||
|
|||
|
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). |
| Благодарность от: | ||
| omardealo | ||
|
#6
|
||||
|
||||
|
Quote:
|
|
#7
|
||||
|
||||
|
Quote:
Code:
{vb:raw thread.city}
Code:
{vb:raw threadinfo.city}
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|