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 ?
Check the included Documentation/undoc.html file
(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.
You can find it in the XThreads package, inside the Documentation folder.
(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.
(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.
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:
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:
<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' ?
(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.
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.
(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 ?