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: #15
[Update2] RE: Display/Sort forum threadlist with xthread field ?
(03-12-2012 08:51 PM)ZiNgA BuRgA Wrote:  Again, no name at all.  You can set the name to absolutely anything and XThreads won't care, and it won't affect any code whatsoever.
It's just the key that matters.

Thank you for the clarification !
Think may be getting it, but was also thinking key needed to go b4 name (key_name) but Rateu cleared me up (name_key_ works) below.
And did use 'any name' (used custthrd_ ).

(03-13-2012 02:13 AM)RateU Wrote:  
(03-12-2012 11:23 AM)akm Wrote:  <option value="???" {$sortsel['???']}>Custom Thread:</option>
Assume ??? would include the thread field key = 'ct_' ?
Based on the documentation:
undoc.html Wrote:To sort by a thread field, prefix its key with tf_
undoc.html Wrote:eg {$sortsel['tf_myfield']}
where myfield = key
So, based on this custom field:
(03-12-2012 11:23 AM)akm Wrote:  1. If thread field key = ct_
this code:
(03-12-2012 11:23 AM)akm Wrote:  <option value="???" {$sortsel['???']}>Custom Thread:</option>
will be come something like this:

HTML Code
<option value="tf_ct_" {$sortsel['tf_ct_']}>Sort by: {$GLOBALS['threadfields_x']['ct_']['title']}</option>


Thank you for the code help !
'Name b4 key' was very helpful.

Now the sort box display is there (scrnshot attached), but it is still sorting by 'author'.

Not sure how to change that, but will look closer at undoc and templates.

Any other place should be looking ?

Quote:Also am trying to figure out how to take out the 'author' from the multi thread display and replace with the input from the ct_ textbox field (no link required).
Is that possible, without too much code editing, and does the undoc' address that modification ?
Will take more looks at in the meantime, and hopefully figure it out.
Am able to just omit the 'author' display by commenting out...
<div class="author smalltext">{$thread['profilelink']}</div>
...but have no idea how to replace with the ct_ textbox characters.
Any clues on that one ?
Update... think got that one with...
<div>{$GLOBALS['threadfields']['ct_']}</div>

Ps: [Update2] Do need to do some editing at forumdisplay.php ( // Sort by which field? ) for the sorting question ?


Attached File(s) Thumbnail(s)
   

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

« Next Oldest | Next Newest »

Messages In This Thread
[Update2] RE: Display/Sort forum threadlist with xthread field ? - akm - 03-13-2012 09:14 AM

 Standard Tools
Forum Jump: