vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   [SOLVED] Add New Column On ForumDisplay Template (https://vborg.vbsupport.ru/showthread.php?t=323817)

omardealo 11-05-2016 04:12 PM

[SOLVED] Add New Column On ForumDisplay Template
 
1 Attachment(s)
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/attachmen...1&d=1478366075

Seven Skins 11-06-2016 01:11 PM

1 Attachment(s)
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



.

omardealo 11-06-2016 03:37 PM

1 Attachment(s)
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/attachmen...1&d=1478453816

omardealo 11-06-2016 03:54 PM

okay i edit it
Code:

<ul class="threadstats td alt">
TO
Code:

<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

Quote:

Originally Posted by grey_goose (Post 2577901)
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

Quote:

Originally Posted by grey_goose (Post 2577901)
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
Code:

{vb:raw thread.city}
but in another plugin it is works good
Code:

{vb:raw threadinfo.city}


All times are GMT. The time now is 01:10 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01092 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete