https://drupal.org/node/2013909
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/bhobbs/2013909.git

This module creates two blocks to display chitika ads on a drupal page.

Copied from project page:

What this module does

This module provides you with simple to use Chitika Ad blocks for your Drupal page.

Customize your user experience by choosing the ad unit that best fits your site content and audience.

Prerequisites

Sign up for a Chitika publisher account.

Note: Until your Chitika Account is approved, you will not be able to start
earning revenue from your Chitika Ads.

Installation

Installing and customization is easy and takes fewer than five minutes.

1. Upload `/chitika/` module directory to your drupal `/modules/` directory
2. Enable the Module `Chitika` through the `Modules` menu in Drupal

Configuration

Adding your Chitika publisher information

1. Navigate to the `Modules` page and select `Configure` for the `Chitika` module
2. Enter your Chitika Username and Chitika Password that you made when signing up
for a publisher account.

Configuring your ads

1. Navigate to the `Structure->Blocks` page.
2. Select `configure` next to the Chitika blocks. By default the two ad blocks are
named `Unconfigured Chitika Ad`.
3. Configure the look of your ad and change the region of the ad.

Frequently Asked Questions

Can I use Chitika ads on the same page as Google AdSense?

Yes! Many of our publishers have actually found that Chitika ads complement their Google AdSense ads. Publishers combining the ad networks have seen a 30% boost in revenue.

Where can I find more help?

You can find more support from Chitika Support.

Review of other projects

https://drupal.org/node/2044219#comment-7660231
https://drupal.org/node/2022871#comment-7660333
https://drupal.org/node/2025505#comment-7660405

https://drupal.org/node/2050019#comment-7689383
https://drupal.org/node/2051379#comment-7690263
https://drupal.org/node/2050931#comment-7698131

https://drupal.org/node/2056543#comment-7713761
https://drupal.org/node/2050931#comment-7713927
https://drupal.org/node/2045195#comment-7714261

Comments

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://ventral.org/pareview/httpgitdrupalorgsandboxbhobbs2013909git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

bhobbs-chitika’s picture

Status: Needs work » Needs review

Made necessary changes for the automated reviewer.

RavindraSingh’s picture

Status: Needs review » Needs work

Make the following changes in .module file

Use l() for generating links. i have seen many line you are using '#description' => '<p><a href="http://support.chitika.com/customer/portal/articles/62580-tracking-the-performance-of-each-ad-unit" target="_blank">What are Channels?</a></p>',

in .install file use in below given way for drupal 7

<?php
$result = db_select('table_name', 'c')
    ->fields('c')
    ->execute()
    ->fetchAssoc();
?>

instead of db_query("SELECT name FROM {variable} WHERE name LIKE 'chitika_ads\_ad\_block\_%'");

bhobbs-chitika’s picture

Status: Needs work » Needs review

Thanks,

I changed some of the links to use l() but I also changed some to have embedded html as the below shown in l() documentation,

  t('Visit the <a href="@url">settings</a> page', array('@url' => url('admin')));

I changed the query to use db_select.

labor b’s picture

Status: Needs review » Needs work

Hi, just reviewed your project:

Line 179: There is a typo in the permission name, so only user 1 can access the settings form. => "administer site configuration"

Nothing else from me here.

bhobbs-chitika’s picture

Status: Needs work » Needs review

Thanks for the typo find.

I have fixed the issue.

bhobbs-chitika’s picture

Replaced curl request with drupal_http_request

ajayg’s picture

Status: Needs review » Needs work

I was able to install and configure the module fine. But it does not show any version information which would make it impossible to track any changes.

ajayg’s picture

Status: Needs work » Reviewed & tested by the community

Making this RTBC as the version information comes from d.o packaging script.

ajayg’s picture

How can this be approved?

klausi’s picture

We are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)

RavindraSingh’s picture

Module seems good and useful I have tested and reviewed.

klausi’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: -PAreview: review bonus +PAreview: security

manual review:

  1. chitika_ads_password: this variable should also be removed in hook_uninstall()?
  2. chitika_ads_get_ad(): javascript should be added with drupal_add_js() or #attached in render arrays. Variables hsould be passed down from PHP to JS with Drupal-settings, see https://drupal.org/node/756722
  3. chitika_ads_get_ad(): this is vulnerable to XSS exploits. If I enter a"; alert('XSS'); x = " as channel tracking I get a nasty javascript popup. You need to sanitize all user provided text before printing. Make sure to read https://drupal.org/node/28984 again. If you pass down the settings with Drupal.settings the strings get escaped properly. And please don't remove the security tag, we keep that for statistics and to show examples of security problems.

Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

klausi’s picture

Issue summary: View changes

added "Review of other projects" section

bhobbs-chitika’s picture

Status: Needs work » Needs review
Issue tags: +PAreview: review bonus

Thanks for the great review Klausi,

1. chitika_ads_password: this variable should also be removed in hook_uninstall()?

I have added this to be removed in hook_uninstall()

2. chitika_ads_get_ad(): javascript should be added with drupal_add_js() or #attached in render arrays. Variables hsould be passed down from PHP to JS with Drupal-settings, see https://drupal.org/node/756722

I tried both to use drupal_add_js() and #attached but both seemed to add the js to the header but my project required the javascript to be in the place where you want the ad to display. Is there any way that I can accomplish this in a drupal manner?

3. chitika_ads_get_ad(): this is vulnerable to XSS exploits. If I enter a"; alert('XSS'); x = " as channel tracking I get a nasty javascript popup. You need to sanitize all user provided text before printing. Make sure to read https://drupal.org/node/28984 again. If you pass down the settings with Drupal.settings the strings get escaped properly. And please don't remove the security tag, we keep that for statistics and to show examples of security problems.

I have implemented the use of check_plain() to avoid the vulnerability.

klausi’s picture

Assigned: Unassigned » kscheirer
Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus

I think drupal_add_js() only places the Javascript in the header or the footer. Since the div in chitika_ads_get_ad() has the chitika_ads-adspace class I thought the JS could attach whatever stuff to that.

But otherwise this looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

Assigning to kscheirer as he might have time to take a final look at this.

klausi’s picture

Issue summary: View changes

added more reviews

kscheirer’s picture

Assigned: kscheirer » Unassigned
Status: Reviewed & tested by the community » Fixed
Issue tags: -PAreview: review bonus

I think you can still use drupal_add_js() to add the code inline, like in this example:
drupal_add_js('jQuery(document).ready(function () { alert("Hello!"); });', 'inline');

But the module looks nice and that's not a blocking issue.

Thanks for your contribution, bhobbs-chitika!

I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

----
Top Shelf Modules - Crafted, Curated, Contributed.

salah messaoud’s picture

Congratulation for your first Drupal contribution keep it up, just a quick note

Installation
Installing and customization is easy and takes fewer than five minutes.

1. Upload `/chitika/` module directory to your drupal `/modules/` directory
2. Enable the Module `Chitika` through the `Modules` menu in Drupal

Modules always should go into sites/all/modules/ and not /modules/ which contain the core modules

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

RavindraSingh’s picture

Issue tags: -PAreview: security

Congratulation you got the full project access in drupal.org.

learn drupal 8 and prepare your module for D8 version too. good luck
@Ravin
http://w3web.in/Drupal-8-custom-module-development

RavindraSingh’s picture

Issue summary: View changes

more reviews