Sponsors Replace AdSidebar

OurWork Sponsors Replace AdSidebar (?)

What (summary)

This is the backend for the page sponsorship part of TheSponsorshipAsk

Why this is important

This is an essential step toward driving revenue and demonstrating our business model.

DoneDone

  • Create user stories to better understand the whole process.
  • New table sponsors with fields sponsor_id, sponsor_name, sponsor_url, sponsor_status
  • New table page_sponsors with fields page_id, sponsor_id, priority, paid_at
  • Write web service in rails to add new sponsor, and fetch sponsorships for sponsors.
    • Write test cases for these web service methods
  • Every page that is loaded checks the sponsors table to get a list of all sponsors
  • If there are no sponsors, the default (current version) of advertising behavior
  • If there are sponsors, lists a link to the sponsor_name in the adSidebar space instead. order is:
    • Priority (highest first)
    • paid_at (oldest first)

User Story for user who is not Logged In

Display a pop up displaying the following

  • Showing what this program is all about.
  • Link to Log In
  • Link to Join Us.

User Story for Logged In Users

Page 1

  • Display the text what this program is all about.
  • A link "Continue" to the next page.

Page 2

Display the form with his personal info, advertisement links and text that will be displayed in the sponsor advertisement bar. This form will be auto filled for the users that have already sponsored some other page. If they ve sponsored multiple pages, we ll fill it with the latest information that they had submitted

  • Fields are
    • Email for dealing with the sponsorship program
    • Link text(max 25 words)
    • Link url
    • Blurb text (max 100 characters)
    • link "Next"

Page 3

Get the credit card info.

  • Credit Card Type.
  • Credit Card Number.
  • Expiration Date.
  • Name on Card.
  • Address for Card.
  • link "Sponsor"

if he clicks on the sponsor link, and the credit info is incorrect, we ll stay on this page displaying the error message.

Page 4

Congratulation, you have successfully sponsored "abc.com" for a month. We look forward to have continuing relationship with you and add more value to your business. Link to "Done"

Steps to get to DoneDone

  • verifying that the ads do not overwrite the list of sponsors by inspecting code, as we do not have google ads enabled on the local version
  • need to coordinate with other groups to merge changes
  • added one new test case to add a new page sponsor
  • change message on adding a new sponsor to page for a month
  • remove the old controller and their respective views
  • migrate the test cases to use the lib version and not the controller version
  • refactor the old two controllers to show list of sponsors and add new sponsors into the lib folder
  • register two new web services to receive requests to show list of sponsors, and the add a new sponsor.
  • showed the list of sponsors on the page by adding three lines to design.php. But tomorow, probably need to figure out how to do this work in a better way; should we write an extension?
  • figuring out where to put the code in mediawiki to display the list of sponsors for a page
  • adding the required fixtures for the tests
  • test case to verify that optional arguments do not cause a crash when executed
  • test case to verify that required arguments are given
  • test case to check that the new sponsor to be added already is a user
  • jquery 1 hr
  • changing find query to output sponsorship list according to priority
  • add appropriate messages to show in response to adding sponsorship request
  • try to make the add sponsor NOT add if you try to add the same sponsor twice to it, because one user cannot sponsor the same page twice
  • put the check that u can only sponsore an existing page
  • try to make the rhtml work if nil array is returned
  • write test cases for fetching sponsor list in various cases of wrong page id, many sponsors, no sponsors etc
  • trying to make the display look better
  • looks like the add new sponsor adds a new record to database; verifying its functionality
  • update controller to fetch sponsors instead of pagesponsor list
  • write controller function to fetch list of sponsor ids of a given page
  • cloning a new rep as the old one doesn't let the push go through
  • create table migrations
  • create models for new tables.
  • create web service skeleton.
  • write user stories as mentioned above.Understand the current status of the code base.
  • Read changes made by Arif and Arshia Irfan from git.
  • Read the source code.
  • link users table with the sponsors table.
  • create web service method to add new sponsor
  • Use rails migrations in compost to create the tables
  • Create a web services api to
    • Add a new sponsor
    • Add a page_sponsor upon payment
    • Test functionality and integration


Retrieved from "http://aboutus.com/index.php?title=Sponsors_Replace_AdSidebar&oldid=13862284"