Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 [Solved] Display/Sort forum threadlist with xthread field ?
akm Offline
Member
***
Posts: 115
Joined: Nov 2011
Post: #6
RE: Display/Sort forum threadlist with xthread field ?
(03-09-2012 05:14 AM)akm Wrote:  
(03-09-2012 04:01 AM)RateU Wrote:  You can find it in the XThreads package, inside the Documentation folder.
Thanks for the info !
Looks like new learning curve.   Smile

Read the 'Undocumented Features' (attached), and am thinking this is way over my head in code etc.
But, have tried to layout below what seems to be the basic considerations for link up what needs to be entered where.
The first paragraph/s of the UF...

Quote:"XThreads offers a {$filters_set} array variable on the forumdisplay page when thread filters are used. This section
describes this array.
The general format to use in templates is something like this: {$filters_set['key']['var']}. key refers to the filter; for
example, if you've enabled filtering on a thread field named "myfield", the corresponding key is myfield. As for var, the
following are available:"

...refers to 'thread field named'.

In this case, per custom field setup (in code box below, couldnt figure out a better way do display), the Title 'name', displayed beside the textbox at the thread, is "Custom Thread:"
So is the 'filtering on the thread field named 'Custom Thread:', or is there some other 'name' needed to setup ?
And is the 'key' still ct_ ?
Or, is there some other direction should be taking ?

Start with...

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 ACP - Custom Thread Fields / Edit Thread Field
----------------------------------------
Edit Thread Field
-----------------
Title:  Custom Thread:
Key:  ct_
Description:   special title
Applicable Forums:  __________
Input Field Type:  Textbox
Maximum Text Length:  30
Field Input Width:  40
Editable by / Required Field ?:  Everyone
Display Parsing:  Plain text
Display Order:  3
Capture Tab Key:  Yes

Advanced Options
----------------
Allow Filtering:  Yes
Blank Replacement Value: 
Default Value:  
Display Format:  (VALUE}
Underlying Data Type:  Text
Allow multiple values for theis field:  No
Text Mask Filter:  Anything
Formatting Map List:  
Settable Value Permissions:
Viewable by Usergroups: 
Unviewable Value:
Hide Input Field:  No


Then modify the thread displays at ct_forumdisplay_thread...

Code:
1
2
3
4
5
6
7
8
9
10
11
<td class="{$bgcolor}{$thread_type_class}">
{$attachment_count}
<div>
<span>{$prefix} {$gotounread}{$thread['threadprefix']}
<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" 
id="tid_{$inline_edit_tid}">{$thread['subject']}</a>
{$thread['multipage']}
</span>
<div class="author smalltext">{$thread['profilelink']}</div>
</div>
</td>

...for display the 'custom thread' field name instead of the 'author' ?

Then modify for sorting at ct_forumdisplay_threadlist ...

Code:
<option value="subject" {$sortsel['subject']}>Special Title</option>
<option value="starter" {$sortsel['starter']}>{$lang->sort_by_starter}</option>

...for sort by the 'custom name' field instead of the 'author' ?



Attached File(s)
.pdf  HackMyBB-undoc_html.pdf (Size: 48.39 KB / Downloads: 2672)

Thanks again for your help !
(This post was last modified: 03-11-2012 03:17 AM by akm.)
03-10-2012 06:57 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread

 Standard Tools
Forum Jump: