I am trying to follow @pupi1985 suggestions to build a plugin to allow only each user to publish in each own wall: http://www.question2answer.org/qa/43652/there-way-hack-wall-permission-order-allow-user-post-her-wall
1) The first part of the plugin seems to be working:
qa_register_plugin_overrides('caju-wall-overrides.php','qa_wall_error_html','Write on your wall');
and in caju-wall-overrides.php I override the function qa_wall_error_html as suggested in the previous question.
2) The second part is not working. I basically need to remove
<input name="wall" type="checkbox" value="1" checked="" class="qa-form-wide-checkbox">
that arises in user's profile edition. In order to do that I am including
qa_register_plugin_layer('caju-WYW-layer.php', 'Caju WYW Layer');
Inside caju-WYW-layer.php, I have
<?php
if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser
header('Location: ../../');
exit;
}
class qa_html_theme_layer extends qa_html_theme_base {
function doctype() {
unset($this->content['form_profile']['table']['wall']);
qa_html_theme_base::doctype();
}
}
What is going wrong?
3 - The last part I also need to include this piece of css code in qa-styles.css
.qa-part-message-list .qa-error{
margin-bottom: 5px;
padding: 10px;
color: #e74c3c;
}
.qa-part-message-list .qa-error a, .qa-warning a, .qa-notice a {
color: #e74c3c;
border-bottom: 1px dotted #fff;
}
.qa-part-message-list .qa-error a:hover, .qa-warning a:hover, .qa-notice a:hover {
color: #e74c3c;
border-bottom: 0;
}
.qa-part-message-list .qa-error {
background: #fff;
position: relative;
z-index: 999;
}
and I have no idea how to do that. Can you help me learn this? I am trying to learn how to add new tools to Q2A without changing the core.