
02-11-2011, 05:07 PM
|
|
|
Join Date: Oct 2007
Location: UK
Posts: 2,802
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by stationar
How can I get a question type like "custom"? For example, the question is what is your favorite song? The answer would be address of the mp3 file. But in the results the answer would be "built in" to the player html code. (same functionality as BB code).
In the other words, can I create a custom bb code and format the answer with it?
|
2 possible options
- Use custom output
- Create vBulletin Hook with following attributes: (AdminCP -> Plugins & Products -> Add new plugin)
Change 44 for appropriate form id and 325 for appropriate question id
Change for appropriate bb code- Title
- Hook
Code:
easy_forms_post_question_start
- PHP Code
PHP Code:
if ($fid == 44 && $formbit['id'] == 325)
{
$form['saveprea'] = $form[prea];
$form['savepsta'] = $form[psta];
$form[prea] = $form[prea]."[mp3]";
$form[psta] = "[/mp3]".$form[psta];
}
elseif ($fid == 44 && $form['saveprea'] && $form['psta'])
{
$form['prea'] = $form['saveprea'];
$form['psta'] = $form['savepsta'];
$form['saveprea'] = $form['savepsta'] = '';
}
- Active
|