Welcome Guest, Not a member yet? Register   Sign In
CODE TAGS!!!!
#1

[eluser]cideveloper[/eluser]
Please, please, please use code tags when posting code. It is getting very hard to keep on reading code that is badly formatted. Look at the difference.

public function change_pass() {
if ($this->form_validation->run() == FALSE)
{
$data = array (
'message' => (validation_errors()) ? validation_errors() : $this->session->flashdata('message')
);
$this->load->vars($data);
$this->load->view('header');
$this->load->view('change_pass');
$this->load->view('footer');
}
else
{
$data = array (
'password' => $this->input->post('password', TRUE)
);
if($this->ion_auth->update_user($this->session->userdata('user_id'), $data)) {
$this->session->set_flashdata('message', $this->ion_auth->messages());
}
else
{
$this->session->set_flashdata('message', $this->ion_auth->errors());
}
redirect('/todo');
}
}


Code:
public function change_pass() {
        if ($this->form_validation->run() == FALSE)
        {
            $data = array (
                'message' => (validation_errors()) ? validation_errors() : $this->session->flashdata('message')
            );
            $this->load->vars($data);
            $this->load->view('header');
            $this->load->view('change_pass');
            $this->load->view('footer');
        }
        else
        {
            $data = array (
                'password'  => $this->input->post('password', TRUE)
            );
            if($this->ion_auth->update_user($this->session->userdata('user_id'), $data)) {
                $this->session->set_flashdata('message', $this->ion_auth->messages());
            }
            else
            {
                $this->session->set_flashdata('message', $this->ion_auth->errors());
            }
            redirect('/todo');
        }
    }


Almost every single post today has code with no code tags.

Please admins, put some notifications EVERYWHERE to remind people to do this. Or maybe have some javscript that would read the textbox and look for the greater than or lesser than symbol and as if it finds it remind the user to use code tags.

I love helping out when I can but this is getting very hard.


Messages In This Thread
CODE TAGS!!!! - by El Forum - 06-17-2011, 11:14 AM
CODE TAGS!!!! - by El Forum - 06-17-2011, 11:18 AM
CODE TAGS!!!! - by El Forum - 06-17-2011, 11:32 AM
CODE TAGS!!!! - by El Forum - 06-17-2011, 08:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB