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: #1
Question [Solved] Display/Sort forum threadlist with xthread field ?
Currently forum threadlist shows 'subject' and 'author' display (per forumdislplay_threadlist) with same sort-by options.

Possible to replace 'author' with an 'xthread field' at threadlist display, and add to sort-by list (instead of 'author' ) ?

Believe have seen some references to this question when browsing (including at MYBB HACKS), but unable to find specific info in threads/posts etc.

Any ideas on where to look ?

Ps:  Involve work with ACP xthreadfield 'filtering' option ?

Thanks again for your help !
(This post was last modified: 03-15-2012 01:45 AM by akm.)
03-08-2012 04:43 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Sort forum threadlist by xthread field ?
Check the included Documentation/undoc.html file

My Blog
03-08-2012 10:12 PM
Find all posts by this user Quote this message in a reply
akm Offline
Member
***
Posts: 115
Joined: Nov 2011
Post: #3
RE: Sort forum threadlist by xthread field ?
(03-08-2012 10:12 PM)ZiNgA BuRgA Wrote:  Check the included Documentation/undoc.html file

Thanks for the reference.
Have 'looked' all over the place but not found undoc.html.
Where to look ?

Ps: Not sure if you meant 'included' in post, but didnt see any additional text, code, or attachment.

Thanks again for your help !
(This post was last modified: 03-09-2012 03:36 AM by akm.)
03-09-2012 12:02 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #4
RE: Sort forum threadlist by xthread field ?
You can find it in the XThreads package, inside the Documentation folder.

03-09-2012 04:01 AM
Find all posts by this user Quote this message in a reply
akm Offline
Member
***
Posts: 115
Joined: Nov 2011
Post: #5
RE: Sort forum threadlist by xthread field ?
(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

Thanks again for your help !
(This post was last modified: 03-09-2012 06:03 AM by akm.)
03-09-2012 05:14 AM
Find all posts by this user Quote this message in a reply
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: 2493)

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
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #7
RE: Display/Sort forum threadlist by xthread field ?
If you are still asking about the sort thread by XThreads Custom Thread Fields, you can read it in the Other sections of the undoc.html.
The example is in our Downloads Section here:
http://mybbhacks.zingaburga.com/forumdisplay.php?fid=29
You can sort the threads by the Downloads (click the Downloads link at the table header).

If you are asking about the {$filters_set} array, you can find some example here:
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=301&pid=40
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=443&pid=79
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=443&pid=33

03-10-2012 08:02 AM
Find all posts by this user Quote this message in a reply
akm Offline
Member
***
Posts: 115
Joined: Nov 2011
Post: #8
RE: Display/Sort forum threadlist by xthread field ?
(03-10-2012 08:02 AM)RateU Wrote:  If you are still asking about the sort thread by XThreads Custom Thread Fields, you can read it in the Other sections of the undoc.html.
If you are asking about...

Thank you for the followup.
Have read the undoc a number of times, and did concentrate on the 'sort' section, but had a specific question, which got taken out of the post you replied to when I mistakenly used |code| in part of the question and it took out the next paragraph of the question.
Hopefully it is now displayed in the previous post you responded to...

Quote:...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 ?...

In the undoc... "if you've enabled filtering on a thread field named "myfield", the corresponding key is myfield. As for var, the
following are available:".

Just wanted to make sure am using right 'name' and 'key' input, for starters, and have the ACP - Custom Thread Fields / Edit Thread Field setup done correctly.

Thanks again for your help !
(This post was last modified: 03-11-2012 04:28 AM by akm.)
03-11-2012 03:53 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #9
RE: Display/Sort forum threadlist with xthread field ?
XThreads doesn't care what name/title you give - that's only for yourself and users.
It only cares about the key, so all references etc are based off that.

My Blog
03-11-2012 11:08 AM
Find all posts by this user Quote this message in a reply
akm Offline
Member
***
Posts: 115
Joined: Nov 2011
Post: #10
[Updated] RE: Display/Sort forum threadlist with xthread field ?
(03-11-2012 11:08 AM)ZiNgA BuRgA Wrote:  XThreads doesn't care what name/title you give - that's only for yourself and users.It only cares about the key, so all references etc are based off that.

Thank you for the followup.

Guess am confusing the terminology.
At undoc it says...

Quote: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....

To sort by a thread field, prefix its key with tf_, for example, forumdisplay.php?fid=2&sortby=tf_myfield will sort the
threads by myfield."

Am assuming the 'key' is the key setup at ACP custom thread field setup (which put in a |code| box in previous post), but not sure what the 'name' 'myfield' is referring to ?

Using the info from that previous post custom thread field setup |code| box, its almost like the 'tf_myfield' would be 'ct_Custom Thread:'

But that doesn fly when do code T&E.

Or, maybe should be adding something else to that custom thread field setup (referring to custom thread field setup in |code| box at previous thread) ?

Ps:  
Am doing a PHP tutorial at http://www.tizag.com/, and appears like the 'name' is a variable name ?  How to set that name in ACP custom thread field setup ?  Guess just grabbing at things ?

Thanks again for your help !
(This post was last modified: 03-11-2012 02:02 PM by akm.)
03-11-2012 12:39 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: