Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function interest_in_init() {
- ossn_add_hook('user', 'default:fields', 'interest_in');
- }
- function interest_in($hook, $type, $fields) {
- echo "<div id=\"interest-in\">";
- echo "<label class=\"checkbox-block\">" . ossn_print('interest_in') . "</label>";
- //Male
- $interestMale_checkbox = array(
- 'name' => 'interestMale',
- 'label' => ossn_print('male'),
- //'checked' => $user->interestMale == true ? 'checked' : null,
- );
- if ($user->interestMale == true) {
- $interestMale_checkbox['checked'] = 'checked';
- }
- echo ossn_plugin_view('input/checkbox', $interestMale_checkbox);
- //Female
- $interestFemale_checkbox = array(
- 'name' => 'interestFemale',
- 'label' => ossn_print('female'),
- 'checked' => $user->interestFemale == true ? 'checked' : null, //different test. Not working also
- );
- echo ossn_plugin_view('input/checkbox', $interestFemale_checkbox);
- /* others options here */
- echo "</div>";
- }
- ossn_register_callback('ossn', 'init', 'interest_in_init', 100);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement