Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Add custom thread field to thread's subject
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #4
RE: Add custom thread field to thread's subject
If you want to hard code the field into the subject, that^ could work, but the problem is that you're relying on the client supplying you the right information (may be okay for your purposes).
XThreads supports doing the reverse, ie bringing the subject into a thread field, but otherwise doesn't really touch MyBB's subject line.  So for what you want, you'll probably need a code edit.

Open newthread.php, and before

PHP Code:
if($mybb->input['action'] == "do_newthread" && $mybb->request_method == "post")

add

PHP Code:
if(in_array($fid, array(1,2,3))) $mybb->input['subject'] = "{$mybb->input['xthreads_singer']} - {$mybb->input['xthreads_songname']}";

(replacing 1,2,3 with the list of applicable forum IDs)

Untested code.


My Blog
12-24-2013 12:45 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Add custom thread field to thread's subject - ZiNgA BuRgA - 12-24-2013 12:45 PM

 Standard Tools
Forum Jump: