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

Just extended Prothoughts Simple Ads Plugin

+6 votes
168 views
asked Nov 23, 2017 in Plugins by arjunsuresh
edited Nov 23, 2017 by arjunsuresh

Added more display options for Ads, option to hide ads on certain category of questions

https://github.com/arjunsuresh/q2a-simple-ads-manager

Change Log

v1.5

  • Added option to have ad after before question and question list
  • Aded option to have ad on the left end of window on large screens
  • Added option to hide all ads on certain category of questions

v1.4

  • Added option to have ad after first answer

v1.3

  • Added option to hide each ad unit based on user levels
  • Added option to hide ad on Ask page
commented Nov 24, 2017 by ProThoughts
cool! thanks!
commented Feb 12 by fahimalfarhan
this plugin not working for disable ads in soecific category

1 Answer

0 votes
answered Oct 2 by eswar22

Getting this error, how to resolve. 

Notice: Undefined variable: user_level in /home..../qa-include/qa-base.php(725) : eval()'d code on line 25

commented Oct 3 by arjunsuresh
fixed the issue; you can redownload.
commented Oct 3 by eswar22
edited Oct 3 by eswar22
Thanks Arjun, its working. But if i enable Ad before Question & Ad after Question at same time, issue is coming. Issue like Ad after Question ad is getting displayed in before and after question content.  I think you are referring Ad after Question textarea value for Ad before Question value also.

-------------
if (qa_opt('pt_q2a_ad_before_question') && $user_level <  qa_opt('pt_q2a_ad_before_question_level'))
        {
            $this->adoutput(qa_opt('pt_q2a_ad_after_question_codebox'));
        }                     
        qa_html_theme_base::q_view($q_view);
        if (qa_opt('pt_q2a_ad_after_question') && $user_level <  qa_opt('pt_q2a_ad_after_question_level'))
        {
            $this->adoutput(qa_opt('pt_q2a_ad_after_question_codebox'));
        }              
-------------

Thanks for your plugin :) ..
...