Quote:
Originally Posted by bananalive
- Title
Code:
Change Signature to Thread Link
- Hook
Code:
easy_forms_post_after_actions
- PHP Code - change 43 to appropriate form id
PHP Code:
if ($fid == 43)
{
if ($complete)
{
$userinfo = $vbulletin->userinfo;
$threadinfo = fetch_threadinfo($threadid);
$usersig = "[url]".$vbulletin->options['bburl']."/".fetch_seo_url('thread', $threadinfo)."[/url]";
$userdata =& datamanager_init('User', $vbulletin, ERRTYPE_STANDARD);
$userdata->set_existing($userinfo);
$userdata->set('signature', $usersig);
$userdata->save();
}
}
- Active
|
This is awesome, works great, thanks a lot.
I have 2 other questions:
1) How can I pull data from the form and put it inside the signature? For example, let's say I ask what his favorite icecream is and he answers vanilla => how do I put "vanilla" in his signature right under the link to the thread that was just created?
2) How do I force users from a certain usergroup to fill in the form before they can proceed? I'm using
Force Threads but it doesn't work with a form because forced threads uses thread ids. Tried htaccess redirect but that's an endless loop. How would you got about forcing a usergroup to fill in the form before proceeding?
Thanks!