MyBB Hacks

Full Version: Referencing XThreads Fields on Other Pages?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to get XThreads fields to show up on pages where threads are displayed but XThreads doesn't currently function. The pages in question are:
  • ./usercp.php (Your Latest Threads)
  • ./usercp.php?action=subscriptions (Thread Subscriptions)

I've been trying to edit usercp.php manually for the desired result, but since I'm not exactly experienced with PHP my success has been less than fruitful. Would anyone happen to know a way to make this work? I know it's a tall order but I figure it can't hurt to ask.

If it helps at all, I'm running myBB 1.8.10, XThreads 1.68 and the XThreads field key I'm trying to reference is "desc".
There's generally two main things you need to do:
- obtain the thread field data
- format/evaluate the data

For the first, this typically involves modifying the query that gets the threads to join with the threadfield_data table, so that the appropriate field data gets pulled across.

For the second, you can use xthreads_sanitize_disp on each piece of data.
See the xthreads_get_threadfields function in inc/plugins/xthreads.php for an example.
Reference URL's