Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-05-2016, 04:12 PM
omardealo's Avatar
omardealo omardealo is offline
 
Join Date: Nov 2008
Location: egypt
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default [SOLVED] Add New Column On ForumDisplay Template

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 ??!

Attached Images
File Type: jpg Untittytled.jpg (57.3 KB, 0 views)
Reply With Quote
  #2  
Old 11-06-2016, 01:11 PM
Seven Skins's Avatar
Seven Skins Seven Skins is offline
 
Join Date: Sep 2008
Location: London, UK
Posts: 1,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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



.
Attached Images
File Type: jpg 001375.jpg (64.7 KB, 0 views)
Reply With Quote
4 благодарности(ей) от:
Kane@airrifle, MarkFL, omardealo, TheLastSuperman
  #3  
Old 11-06-2016, 03:37 PM
omardealo's Avatar
omardealo omardealo is offline
 
Join Date: Nov 2008
Location: egypt
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Attached Images
File Type: jpg Untxcxczxitled.jpg (55.4 KB, 0 views)
Reply With Quote
  #4  
Old 11-06-2016, 03:54 PM
omardealo's Avatar
omardealo omardealo is offline
 
Join Date: Nov 2008
Location: egypt
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

okay i edit it
Code:
<ul class="threadstats td alt">
TO
Code:
<ul class="threadstats td">
thanks again bro :up:
Reply With Quote
2 благодарности(ей) от:
MarkFL, TheLastSuperman
  #5  
Old 11-07-2016, 01:53 AM
grey_goose grey_goose is offline
 
Join Date: Jun 2009
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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).
Reply With Quote
Благодарность от:
omardealo
  #6  
Old 11-07-2016, 02:17 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by grey_goose View Post
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.
Reply With Quote
  #7  
Old 11-07-2016, 10:56 AM
omardealo's Avatar
omardealo omardealo is offline
 
Join Date: Nov 2008
Location: egypt
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by grey_goose View Post
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}
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:20 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04436 seconds
  • Memory Usage 2,267KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (9)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_box_bit
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (3)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete