I checked this and this plugin is working for me, but with bad "name" of button. Maybe someone know how to fix it:
OVERRIDES file from plugin, line near 100:
if ( qa_is_http_post() ) {
if(qa_get_logged_in_level()>= qa_opt('qa_featured_questions_level'))
{
if(isset($_POST['feature-button']) )
{
$postid = $_POST['feature-button'];
require_once QA_INCLUDE_DIR."db/metas.php";
require_once QA_INCLUDE_DIR."db/post-create.php";
require_once QA_INCLUDE_DIR."db/post-update.php";
qa_db_postmeta_set($postid, "featured", "1");
updatefeaturedcount($postid);
qa_redirect( qa_request(), $_GET );
}
if(isset($_POST['unfeature-button']) )
{
$postid = $_POST['unfeature-button'];
require_once QA_INCLUDE_DIR."db/metas.php";
require_once QA_INCLUDE_DIR."db/post-create.php";
require_once QA_INCLUDE_DIR."db/post-update.php";
qa_db_postmeta_clear($postid, "featured");
updatefeaturedcount($postid);
qa_redirect( qa_request(), $_GET );
}
}
So - It's necessary to add
require_once QA_INCLUDE_DIR."db/metas.php";
require_once QA_INCLUDE_DIR."db/post-create.php";
require_once QA_INCLUDE_DIR."db/post-update.php";
before db_post_meta_set and clear functions . Then featuring and unfeaturing working perfect .
But I don't know how to change "name" for this button "feature" in this plugin, because it calls in LAYER:
$q_view['form']['buttons'][] = array("tags" => "name='feature-button' value='$postid' title='".qa_lang_html('featured_lang/feature_pop')."'", "label" => qa_lang_html('featured_lang/feature'));
'
So "value" is $postid , not "feature" . Anybody knows how to fix it?