Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

[paid] Need Q2A developer for custom plugin

+3 votes
198 views
asked Mar 18 in Q2A Core by Aras Ahmed

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
commented Mar 27 by sama55
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.
commented Apr 5 by Aras Ahmed
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
answered Apr 5 by sama55
selected Apr 6 by Aras Ahmed
 
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.

commented Apr 6 by Aras Ahmed
Great ... Thank you very much @sama55   :)
commented Apr 7 by Aras Ahmed
Creative and genius
I am a fan of you and your projects
But unfortunately your projects do not support Arabic
...