The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#7
|
|||
|
|||
![]()
OK, well, to answer your question about how the signature option gets handled: if you look at script newthread.php and look for this section (around line 97):
Code:
// ############################### start post thread ############################### if ($_POST['do'] == 'postthread') { you can see below that there's a call to $vbulletin->input->clean_array_gpc), that gets the values from the form that was submitted and puts them in the $vbulletin->GPC[] array. So you'd want to add your authorship field to that list. Then if you look below that, what's happening in general is that the form values from $vbulletin->GPC[] are being transfered to the $newpost array, so you'd want to take your authorship value and do that (probably it would just be $newpost['authorship'] = $vbulletin->GPC['authorship']). Now if you go back to looking at build_new_post() in functions_newpost.php, you can see the values from the $post parameter (which is just the $newpost from before) are being transfered to the datamanager. So you'd want to add something like: Code:
if ($type == 'thread' AND isset($post['authorship'])) { $dataman->set('authorship', $post['authorship']); } I think that should do it. If you do all that then I think you should be able to check $threadinfo['authorship'] in an <if> tag in the template. BTW, I don't think you're making it complicated - it's quite a bit to figure out from scratch. (And it's not the only way to do it, obviously). Also I'm assuming you're not trying to use plugins but are changing the files? That's OK, using plugins does sometimes make it harder to figure out how to get things done, and since vb3 isn't being updated any more (or at least rarely), it doesn't make much difference. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|