Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to select by default source mode editor in usercp #646

Merged
merged 1 commit into from Jul 1, 2014
Merged

Option to select by default source mode editor in usercp #646

merged 1 commit into from Jul 1, 2014

Conversation

martec
Copy link
Contributor

@martec martec commented May 31, 2014

Original Thread: http://community.mybb.com/thread-154407.html

Option to select by default source mode editor in usercp

@Destroy666x
Copy link
Contributor

I think you should also include the new field in inc/datahandlers/user.php -> verify_options() and insert_user()

@martec
Copy link
Contributor Author

martec commented Jun 21, 2014

@Destroy666x
Thanks... Fixed.

@Destroy666x
Copy link
Contributor

I browsed some other commits and I forgot one more thing - it also needs to be in ACP Edit User like here: eb45fac

Also, I don't think the if conditional for codebuttons in datahandler file is correct (it isn't even compliant with MyBB coding standards), probably should use the verify_yesno_option as in the linked commit instead.

@martec
Copy link
Contributor Author

martec commented Jun 21, 2014

@Destroy666x

thanks again. Fixed.

@Sama34
Copy link
Contributor

Sama34 commented Jul 1, 2014

Why this has to bee an user option instead of a administrator one?

@martec
Copy link
Contributor Author

martec commented Jul 1, 2014

@Sama34
for me better usercp option...
not all users want use source mode by default.
personally i don`t like idea of admin decide all thing to user.
Moreover this kind of discussion better in forum than here to view users' comments
http://community.mybb.com/thread-154407.html

@Destroy666x
Copy link
Contributor

Yea, users should be able to change it as it's a personal preference.

I tested it and it works, so it can be merged. Maybe only one last small correction is needed:

"sourceeditor" => intval($mybb->input['sourceeditor']),

intval is not needed there, as I said above showcodebuttons option is introduced in a weird way that doesn't match other yes/no options. Would be nice and helpful if you could also fix showcodebuttons standard (both files - verify_yesno asnd intval) in this PR.

@martec
Copy link
Contributor Author

martec commented Jul 1, 2014

@Destroy666x
done.
Check for me if all ok.

@Destroy666x
Copy link
Contributor

Ok, thank you. I'll merge it since it works fine as I said.

Destroy666x added a commit that referenced this pull request Jul 1, 2014
Option to select by default source mode editor in usercp
@Destroy666x Destroy666x merged commit b778bb6 into mybb:feature Jul 1, 2014
@martec martec deleted the scsource branch July 1, 2014 11:30
@martec
Copy link
Contributor Author

martec commented Jul 1, 2014

@Destroy666x

thank very much!
and also thanks for the help to fix this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b:1.8 Branch: 1.8.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants