Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
1.5k views
in Q2A Core by
edited by

I have a website like www.question2answer.org/qa the members have to signup to ask questions there.

 I need to create an other question page except www.domain.com/ask with other permissions , the new asking question page allows the visitors to ask question without signing up 

That because I need to create a campaign for the website and the visitor who come from the campaign can ask question without signing up 

For example the new asking question link will be www.domain.com/XXXX instead of www.domain.com/ask and I can change /XXXX from time to time knowing that 

- The developer have to create the project using his own server then send it 

Developers who want to create this plugin for me can either place a bid on the project on freelancer.com here :

https://www.freelancer.com/projects/php/Write-some-Software-13423027

Or create it for me outside freelancer for 80$

Q2A version: 1.7.4
by
You can do this in Q2A now, using Permissions.
by
I need an other question page not the same page
The permissions for the current page which is Q2A.com/ask
by
Do you want to allow visitors to ask questions regardless of permission settings? How about answers and comments? If it is only question (without answer and comment, etc), it will be relatively easy.
by
I did see your comment from along time , But I was unable to login to the website using facebook to replay you .
I need just question not comments , the website will be remain as it , just I need an other asking question page with full permissions to every one to asking question
That because I will put that URL of that page into an advertising campaign to receive more paid questions

1 Answer

+3 votes
by
selected by
 
Best answer

One solution:

1. Create anonymous-question folder under qa-plugin/.

2. Make plugin files under anonymous-question.

metadata.json​

{
    "name": "Anonymous Question",
    "description": "Allow question by anonymous",
    "version": "1.0",
    "date": "2017-04-06",
    "author": "PowerQA",
    "author_uri": "http://www.powerqa.org",
    "license": "GPLv2",
    "min_q2a": "1.5"
}

qa-plugin.php

<?php
/*
    Question2Answer by Gideon Greenspan and contributors
    http://www.question2answer.org/

    File: qa-plugin/anonymous-question/qa-plugin.php
    Description: Initiates Anonymous question plugin


    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 2
    of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    More about this license: http://www.question2answer.org/license.php
*/

/*
    Plugin Name: Anonymous Question
    Plugin URI:
    Plugin Description: Allow question by anonymous
    Plugin Version: 1.0
    Plugin Date: 2017-04-06
    Plugin Author: PowerQA
    Plugin Author URI: http://www.powerqa.org/
    Plugin License: GPLv2
    Plugin Minimum Question2Answer Version: 1.5
    Plugin Update Check URI:
*/


if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser
    header('Location: ../../');
    exit;
}

qa_register_plugin_overrides('qa-aq-overrides.php'); // 2017/04/07 ";" added

qa-aq-overrides.php

<?php
if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser
    header('Location: ../../');
    exit;
}

function qa_user_permit_error($permitoption=null, $limitaction=null, $userlevel=null, $checkblocks=true) {
    $error = qa_user_permit_error_base($permitoption, $limitaction, $userlevel, $checkblocks);
    if($permitoption == 'permit_post_q' && isset($_GET['anonymous'])) {
        if($error != 'limit')
            $error=false;
    }
    return $error;
}

/*
    Omit PHP closing tag to help avoid accidental output
*/

3. Add link

3.1 Example of "Admin" > "Pages" > "Add Link"

  • Text of link: "Ask a Question as Anonymous"
  • Position: "After tabs at top"
  • Visible for: "Anybody"
  • URL of link: "ask?anonymous"

3.2 If you hope to create link banner, you can use "Widget Anywhere" plugin@Scott.

You can override any default permission with this plugin. However, as spam risk increases, generally anonymous posting is not recommended.

by
Please check it
there is something wrong
the website become a blank  page after adding the files
by
I fixed problem. Check "2017/04/07 ";" added" comment of qa-plugin.php.
by
Great ... Thank you very much @sama55   :)
by
Creative and genius
I am a fan of you and your projects
But unfortunately your projects do not support Arabic
...