<?php
$group = 4;
$optionscode = 'radio
key=item
2=Admin
3=Usuario
invitado=Usuario no logueado';
$new_config = array(
'name' => 'radio_input_test',
'title' => 'Radio input test',
'description' => '',
'optionscode' => $optionscode,
'value' => '2',
'disporder' => 4,
'gid' => $group
);
$db->insert_query("settings", $content);
<?php
$new_config = array(
'name' => 'radio_input_test',
'title' => 'Radio input test',
'description' => '',
'optionscode' => "radio \n1=test \n2=etc \n3=ETC",
'value' => '2',
'disporder' => 4,
'gid' => $group
);
<?php
$types = array(
'f' => $lang->forum,
'c' => $lang->category
);
$create_a_options_f = array(
'id' => 'forum'
);
$create_a_options_c = array(
'id' => 'category'
);
if($copy_data['type'] == "f")
{
$create_a_options_f['checked'] = true;
}
else
{
$create_a_options_c['checked'] = true;
}
<form>
<input type="radio" name="sex" value="male" /> Male<br />
<input type="radio" name="sex" value="female" /> Female
</form>
<?php
$mybb->input('sex');
<?php
if($mybb->input['action'] == "credits")
{
$tabs[$lang->Name] = array(
'title' => $lang->taberror,
'link' => "index.php?module=forum/NewThreadRequerPost",
'description' => $lang->tab
);
$tabs["redireccionar"] = array(
'title' => $lang->tabredireccion,
'link' => "index.php?module=forum/NewThreadRequerPost&page=link",
'description' => $lang->desredireccion
);
$tabs[$lang->taboptions] = array(
'title' => $lang->taboptions,
'link' => "index.php?module=forum/NewThreadRequerPost&page=options",
'description' => $lang->desredireccion
);
$tabs[$lang->credits] = array(
'title' => $lang->credits,
'link' => "index.php?module=forum/NewThreadRequerPost&action=credits",
'description' => $lang->descriptioncredits
);
$page->output_nav_tabs($tabs, $lang->credits);
$table = new Table;
$table->construct_header("<center>{$lang->Name}</center>", array('width' => '100%'));
$table->construct_cell("aqui muestro mi texto");
$table->construct_row();
$table->output($lang->credits);
$page->output_footer();
}
<?php
if($mybb->input['page'] == "options")
{
"aqui lo que va en esta pestaña y AQUI quiero los radios"
}
<?php
if($mybb->input['page'] == "options")
{
if($mybb->input['save'] == '1')
{
$sex = $mybb->input['sex'];
$db->update_query('UPDATE mybb_info SET sex = ' . $sex . ' WHERE uid = ' . $mybb->user['uid']);
}
$q = $db->simple_select('info', 'sex', 'uid = ' . $mybb->user['uid'], array('limit' => 1));
$sex = $db->fetch_field('sex', $q);
?>
<form action="archivo.php?page=options&save=1" method="post">
<input type="radio" name="sex" value="male" <?php if($sex == 'male') { echo 'checked="checked"'; } ?> /> Male<br />
<input type="radio" name="sex" value="female" <?php if($sex == 'female') { echo 'checked="checked"'; } ?>/> Female
</form>
<?php
}
<?php
if($mybb->input['action'] == "credits")
{
$q = $db->simple_select('info', 'sex', 'uid = ' . $mybb->user['uid'], array('limit' => 1));
$sex = $db->fetch_field('sex', $q);
switch($sex)
{
case "male":
echo "Sos macho";
break;
case "female":
echo "No sos macho";
break;
}
}