Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Thread Descriptions
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #1
Thread Descriptions
This is a simple thing to do, and this example should give you a general idea of the basics of XThreads.

Alrighty, after installing and activating XThreads, follow these steps on how to add thread description functionality for your threads:
  1. Go to your AdminCP -> Configuration -> Custom Thread Fields section
  2. Choose to Add Thread Field
  3. On this page, enter in the following:
    Title: Thread Description
    Key: desc
    Description: Further describe your thread here
    Display Format: <div>{VALUE}</div>
    (leave other fields on their defaults)
  4. Now scroll down to the bottom of the page and Add Thread Field
  5. If you go to your forum and try to make a new thread, you should notice that there's a "Thread Description" text box below the "Thread Subject" text box, however this doesn't actually do anything right now.  We'll need to add the description into MyBB's templates for it to be of any use.
  6. Go to your AdminCP -> Templates & Style -> Templates
  7. Select the template set you're using (if you have multiple template sets, you need to repeat the following steps with all template sets; alternatively, if you know how, you can also use the Global Templateset)
  8. Now, expand "Forum Display Templates"
  9. Click on the forumdisplay_thread template to edit it
  10. Find the following line of code:

    HTML Code
    <div class="author smalltext">{$thread['profilelink']}</div>

    and add the following before it:

    HTML Code
    {$threadfields['desc']}

  11. Save the template
  12. Back at the templates list page, expand "Search Templates", and select the search_results_threads_thread template to edit
  13. Perform the same edit as you did for the forumdisplay_thread template, and save this edited template
  14. Now, go make a new thread and confirm that thread descriptions appear properly on the forumdisplay and search pages.


If you got to the end without troubles, congratulations! you have managed to use XThreads to create a thread description.
This may seem like a bit of a convoluted method of doing such, but it does give you a lot of flexibility with various things.

As alluded to earlier, this is a very basic example and shows the basics of XThreads.
Hopefully this wasn't too difficult.  Maybe you can go on and try one of the more complicated examples. Tongue

My Blog
04-22-2010 04:48 PM
Find all posts by this user Quote this message in a reply
Shadowss Offline
Junior Member
**
Posts: 4
Joined: Sep 2010
Post: #2
RE: Thread Descriptions
Hello ppl.

I want to set {$threadfields['desc']} in Thread not in front of.

I atache a pictures

Not in forumdisplay_thread if you understand me. I want to put in showthread
(This post was last modified: 09-22-2010 07:43 PM by Shadowss.)
09-22-2010 06:08 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #3
RE: Thread Descriptions
Unfortunately, I'm having a bit of trouble understanding you.  I'm guessing you're trying to put the description in showthread somewhere (postbit template?) but having trouble with it?

My Blog
09-22-2010 06:16 PM
Find all posts by this user Quote this message in a reply
Shadowss Offline
Junior Member
**
Posts: 4
Joined: Sep 2010
Post: #4
RE: Thread Descriptions
Yes i want to put this mod not in front of my thread. I want to put in showthread after post. I think is postbit template. Can you tell me exactly where please

This is my postbit template

Quote:{$ignore_bit}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
<tr>
<td class="tcat" colspan="2">
<span style="float: right;">
{$post['posturl']}
</span>
{$post['postdate']} {$post['posttime']}
</td>
</tr>

<tr>
<td class="postbit" rowspan="2" width="200px" valign="top" style="white-space: nowrap; text-align: center;"><a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
<div class="postbit_name">{$post['onlinestatus']}{$post['profilelink']}<br />
<span style="float: right;">{$post['userstars']}</span><span class="postbit_usertitle">{$post['usertitle']}</span></div>
<span class="smalltext">
{$post['useravatar']}
{$post['groupimage']}
{$post['user_details']}{$post['newpoints_postbit']}
</span>
</td>
<td class="trow1" valign="top">
<table width="100%">
<tr><td><span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>
<br />
<div id="pid_{$post['pid']}" style="padding: 5px 0 5px 0;">
{$post['message']}
</div>
{$post['attachments']}
{$post['signature']}
<div style="text-align: right; vertical-align: bottom;" id="post_meta_{$post['pid']}">
<div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
{$post['iplogged']}
</div>
</td></tr>
</table>
</td>
</tr>
<tr>
<td class="trow2" style="vertical-align: middle; height: 10px;">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr valign="bottom">
<td align="left" ><span class="smalltext">{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}</span></td>
<td align="right">{$post['button_spam']}{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}</td>
</tr>
</table>
</td>
</tr>
</table>
(This post was last modified: 09-22-2010 06:30 PM by Shadowss.)
09-22-2010 06:28 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #5
RE: Thread Descriptions
After {$post['message']} ?
I don't know.

Learn HTML, it's not hard.

My Blog
09-22-2010 07:06 PM
Find all posts by this user Quote this message in a reply
Shadowss Offline
Junior Member
**
Posts: 4
Joined: Sep 2010
Post: #6
RE: Thread Descriptions
Pffff ... Thanks Smile not in here ...
09-22-2010 07:26 PM
Find all posts by this user Quote this message in a reply
1master1 Offline
Member
***
Posts: 232
Joined: Oct 2010
Post: #7
RE: Thread Descriptions
This modification is nice. Well, having a description with same font-size as thread subject doesnt seems cool?? Right?
How can we decrease the size of the thread description? Can we use <span style="">{$threadfields['desc']}</span>?
10-25-2010 01:05 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #8
RE: Thread Descriptions
Yes.

My Blog
10-25-2010 04:05 PM
Find all posts by this user Quote this message in a reply
RocketFoot Offline
Senior Member
****
Posts: 338
Joined: Jul 2010
Post: #9
RE: Thread Descriptions
is anyone using this example?  I'd like to see it before I try it!  Biggrin

[Image: gallery_2_628_39582.jpg]
12-18-2010 12:52 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #10
RE: Thread Descriptions
Yes, I am using it on THIS forum

http://www.leefish.nl/mybb/forum-53.html

Site is SUPER slow at the moment - have complained to host but meh.


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 12-18-2010 01:08 AM by leefish.)
12-18-2010 01:06 AM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: